Managing Hierarchical Data in MySQL

On the MySQL developer’s support site, Mike Hillyar has an article on hierarchies in relational databases. “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.”

As I pointed out last week in Chris Date’s interview, it may not be intuitively obvious that flat files linked with relations are appropriate for structures like this, but in fact this is what they were made for. Relational databases excel at storing complex structures, as long as the designer understands the structure they are trying to represent. Despite a questionable start, Mike goes on to write an interesting and insightful article.

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.