This article needs additional citations for verification. (April 2018)
The onion model is a graph-based diagram and conceptual model for describing relationships among levels of a hierarchy, evoking a metaphor of the layered "shells" exposed when an onion (or other concentric assembly of spheroidal objects) is bisected by a plane that intersects the center or the innermost shell. The outer layers in the model typically add size and/or complexity, incrementally, around the inner layers they enclose.
An onion diagram can be represented as an Euler or Venn diagram composed of a hierarchy of sets, A1...Ak (but perhaps potentially or conceptually infinite) where each set An+1 is a strict subset of An (and by recursion, of all Am where in each case m > n). (Some applications of the concept, however, may fail to benefit from the mathematical and otherwise rigorous properties of the model.)
The onion model in computing is used as a metaphor for the complex structure of information systems. The system is split into layers to make it easier to understand. A simple example is to start with the program, operating system and hardware layers. Each of these layers can then be subdivided.