Am I about to step into a world of hurt? This seems really logical to me; is there some widely known better way?
There is *nothing* illogical about it, but also there is *nothing* relational about it, hence you'll find you're not benefitting from the normal speeds of an RDBMS, and you can expect that the DB will probably be significantly slower than your own hand-written implementation would be. Possibly a *lot* slower, depending upon vendor. There is little reason for an R
DBMS to be optimized for non-Relational
. (although, off the top of my head, a lot of the common ones like MySQL are so frequently abused like this that they do have some support for it. Even with MySQL though, IME, that support is SO little that it's fairly rapidly outclassed by a quick n dirty manual implementation using flat files. Really)
All I'm trying to say is ... if you do trees with RDB's, you can throw out the window all the conventional wisdom on "DB's are faster and better than the manual flat files you'll come up with, by a long way". They're still safer, since they still have transactions, and binary logs, etc - but can be very slow.