Managing Hierarchical Data in MySQL

By Mike Hillyer (Technical Writer for MySQL AB and lives in Alberta, Canada.)

Source: http://www.mysql.com

About these ads

2 Comments

  1. Dharmesh said,

    September 30, 2011 at 6:29 am

    Hey you are brilliant in SQL query.. thanks for helping me for select parent category and child category which is inside the parent category..

    Again thanks,

  2. September 23, 2012 at 12:25 am

    I was using nested sets but found that is there was an error, it was very difficult to fix the data. Apparently there is a class in the Zend framework that handles error correction but I have yet to use it.

    Adjacency sets are definitely easier to deal with but there is a hit on performance. It is not an issue if you only have a few hundred nodes however.

    I wrote a PHP class for managing adjacency classes. You can download it here:

    http://www.pdvictor.com/?sv=&category=just+code&title=adjacency+model


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: