trees.ps contains an explanation of the Genealogical Representation of Trees in Databases which is being used in ldb_sqlite3. Note that we use fgID representation with 4 bytes per level, so we can represent 6.5E+08 subclasses of any object class. This should be adequate for our purposes. :-)