Commit 581b7cae authored by zYne's avatar zYne

--no commit message

--no commit message
parent 54361297
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
+ Object relational mapping + Object relational mapping
+ Mapping relations + Mapping relations
+ Working with objects + Working with objects
+ Hierarchical data
+ Configuration + Configuration
+ DQL (Doctrine Query Language) + DQL (Doctrine Query Language)
+ Native SQL + Native SQL
......
+++ Introduction +++ Introduction
+++ Adjacency list +++ Adjacency list
+++ Nested set +++ Nested set
+++ Materialized path +++ Materialized path
\ No newline at end of file +++ Examples
Most users at one time or another have dealt with hierarchical data in a SQL database and no doubt learned that the management of hierarchical data is not what a relational database is intended for. The tables of a relational database are not hierarchical (like XML), but are simply a flat list. Hierarchical data has a parent-child relationship that is not naturally represented in a relational database table.
For our purposes, hierarchical data is a collection of data where each item has a single parent and zero or more children (with the exception of the root item, which has no parent). Hierarchical data can be found in a variety of database applications, including forum and mailing list threads, business organization charts, content management categories, and product categories.
In a hierarchical data model, data is organized into a tree-like structure. The tree structure allows repeating information using parent/child relationships. For an explanation of the tree data structure, see [http://en.wikipedia.org/wiki/Tree_data_structure here].
There are three major approaches to managing tree structures in relational databases, these are:
* the adjacency list model
* the nested set model (otherwise known as the modified pre-order tree traversal algorithm)
* materialized path model
These are explained in more detail in the following chapters, or see
* [http://www.dbazine.com/oracle/or-articles/tropashko4 http://www.dbazine.com/oracle/or-articles/tropashko4]
* [http://dev.mysql.com/tech-resources/articles/hierarchical-data.html http://dev.mysql.com/tech-resources/articles/hierarchical-data.html]
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment