Storing Hierarchical Data in a Database
Whether you want to build your own forum, publish the messages from a mailing list on your Website, or write your own CMS: there will be a moment that you'll want to store hierarchical data in a database. And, unless you're using a XML-like database, tables aren't hierarchical; they're just a flat list. You'll have to find a way to translate the hierarchy in a flat file.
Van Tulder, Gijs. SitePoint (2004). Design>Web Design>Information Design>Databases