Tree Structures and Relational Databases
There exist several other approaches for the representation of tree-structured data, be it XML or other formats, in a relational database, like Nested set model (de:Nested set, ). On the other hand, database vendors have begun to include XML support into their data structures and query features, like in IBM DB2, where XML data is stored as XML separate from the tables, or in PostgreSQL, with a XML data type and Xpath queries as part of SQL statements. These developments accomplish, improve or substitute the EAV model approach.
It should be noted, however, that the uses of XML are not necessarily the same as the use of an EAV model, though they can overlap. XML is preferable to EAV for arbitrarily hierarchical data that is relatively modest in volume for a single entity: it is not intended to scale up to the multi-gigabyte level with respect to data-manipulation performance. XML is not concerned per-se with the sparse-attribute problem, and when the data model underlying the information to be represented can be decomposed straightforwardly into a relational structure, XML is better suited as a means of data interchange than as a primary storage mechanism. EAV, as stated earlier, is specifically (and only) applicable to the sparse-attribute scenario. When such a scenario holds, the use of datatype-specific attribute-value tables than can be indexed by entity, by attribute, and by value and manipulated through simple SQL statements is vastly more scalable than the use of an XML tree structure. The Google App Engine, mentioned above, uses strongly-typed-value tables for a good reason.
Read more about this topic: Entity–attribute–value Model
Famous quotes containing the words tree and/or structures:
“It is, I fear, but a vain show of fulfilling the heathen precept, Know thyself, and too often leads to a self-estimate which will subsist in the absence of that fruit by which alone the quality of the tree is made evident.”
—George Eliot [Mary Ann (or Marian)
“The American who has been confined, in his own country, to the sight of buildings designed after foreign models, is surprised on entering York Minster or St. Peters at Rome, by the feeling that these structures are imitations also,faint copies of an invisible archetype.”
—Ralph Waldo Emerson (18031882)