For nodes being in the same table, the simplest approach is to have a ParentID that references the parent node's key. Compound keys require more "toParent" columns, but think about using a generated key instead perhaps. Use zero or null for the top-most. That is all that is needed to encode a tree, but there are others ways some claim are faster. Anyhow, here are some wiki topics:

[link|http://www.c2.com/cgi/wiki?TreeInSql|http://www.c2.com/cgi/wiki?TreeInSql]

[link|http://www.c2.com/cgi/wiki?RelationalAndTrees|http://www.c2.com/cg...elationalAndTrees]