Is there a proper way to store a hierarchy in a relational database?
primaryKey | nodeName | parentNodePrimaryKey | nodeLevel
I could then ask for everything ordered by nodeLevel so I could read it
into a data structure in my program, starting at the root level and
working my way down (so that when adding a node it's parent would
always exist already). However I'd also need to efficiently (it would
happen often) ask for a node and only it's parent nodes, can I do this
with mysql without having to get 'parentNodePrimaryKey' and make
anotehr query to ...