Conventional database engineers had studied four models for solving the problem to store hierarchical data in a database. They are:
- Adjacency List Model
- Path Enumeration Model
- Nested Set Model
- Closure Table Model
Common thing about each model, is to add some columns into RDB table for storing hierarchical data. Columns to be added are classified in two types by its roles. These are as:
- Hierarchical Structure Columns
- Search Efficiency Columns
(1) Hierarchical Structure Columns
Necessary to store the hierarchical data in RDB table. Also used as a column to specify a search conditions in a finding query.
(2) Search Efficiency Columns
To be added for increasing the search efficiency. These are added when can not write a efficient finding query by hierarchical structure columns. If the purpose is only to save hierarchical data in a database, it is not necessary. Depending on the model, there is a case that does not use "search efficiency column".