The fertile forest model for hierarchical data in a database on CakePHP plugin
This plugin is an implementation of the Fertile Forest Model for CakePHP 3.x.
We know four models for storing hierarchical data in a database.
- Adjacency List Model
- Path Emuneration Model
- Nested Sets Model (Nested Intervals Model)
- Closure Table Model
Fertile Forest Model (= FF Model) is the fifth Model for storing hierarchical data in database. Stew Eucen who is Japanese database engineer discovered it. FF Model has some excellent features than each conventional model.
Many libraries of framework use "Nested Sets Model" for storing hierarchical data in RDB. However, we got the new model now. I think that Nested Sets Model will be replaced by FF Model in Future. My plan is that CakePHP 4.x contains ForestBehavior.
You can learn more about Fertile Forest Model at:
This is the plugin for CakePHP 3.x. Core files are only two as:
This is minimum component to use Fertile Forest Model for your projects.
I confirmed this model operation by the environments:
- PHP 5.6.3
- CakePHP 3.1.0
- MySQL 5.6.23
This plugin contains demo pages for using FertileForestBehavior. You can experience Fertile Forest Model through the demo. Please see:
If you find a bug, or want to contribute an enhancement or a fix, please send a pull request according to GitHub rules.
Please post in your SNS:
We got the new model for storing hierarchical data in a database.
Stew Eucen did it!
Copyright © 2015 Stew Eucen, released under the MIT license