MySQL Forums
Forum List  »  PHP

Re: Best Mysql structure
Posted by: Peter Brawley
Date: June 19, 2013 11:38PM

> What would be the best structure

It's a tree. Most often, the most efficient storage model is an edge list, but edge list queries need recursive logic so they must be coded in sprocs.

Because of that requirement, some sqlers like Joe Celko's nested sets tree model, which doesn't require recursion so doesn't require sprocs, but a single update or insert in a nested sets tree can require a rewrite of half or more of the tree, so the nested sets model is not efficient for trees that will change often.

For discussion & examples see www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html.

Options: ReplyQuote


Subject
Written By
Posted
June 17, 2013 11:10AM
June 19, 2013 10:51PM
Re: Best Mysql structure
June 19, 2013 11:38PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.