Content deleted Content added
No edit summary |
No edit summary |
||
Line 3:
==Motivation==
The
An alternative solution is the expression of the hierarchy as a parent-child relation. Celko called this the [[adjacency list model|adjacency list model.]] If the hierarchy can have arbitrary depth, the adjacency list model does not allow the expression of operations such as comparing the contents of hierarchies of two elements, or determining whether an element is somewhere in the subhierarchy of another element. When the hierarchy is of fixed or bounded depth, the operations are possible, but expensive, due to the necessity of performing one [[Join (relational algebra)#Joins and join-like operators|relational join]] per level. This is often known as the [[bill of materials]] problem.{{citation needed|date=November 2011}}
Hierarchies may be expressed easily by switching to a [[graph database]]. Alternatively, several resolutions exist for the relational model and are available as a workaround in some [[relational database management system]]s:▼
▲Hierarchies may be expressed easily by switching to a [[graph database]]. Alternatively, several resolutions exist for the relational model and are available as a
* support for a dedicated [[hierarchy data type]], such as in SQL's [[hierarchical query]] facility;
|