Location: Database

SQL tree hierachy with the "Modified Preorder Tree Traversal" algorithm (MPTT)

Managing Hierarchical Data in MySQL
SQL tree hierachy with the "Modified Preorder Tree Traversal" algorithm (MPTT)
We all use databases to store our data around our applications, storing user settings and data received from client. If you ever had to create a category parent/child relationship in a e-commerce store for instance, this is a very good article explaining both ways and explaining the whole idea and schema of this wonderful way of easily managing a nice tree of categories that you may need for your posts, real-estate properties, products, groups, and so on.

Take in mind that this is only intended for a single parent/child approach, one to many.



http://dev.mysql.com
Rate:  

Add To Facebook Share on Twitter Add To Google Bookmarks Add To Linkedin Add To Del.icio.us Add To digg Add To Stumble Upon Add To Yahoo My Web Add To Technorati

Surfers Feedbacks

01. Great great great piece of information! / Yoni (17/02/2010)