I've tried for years working on it, and I even wrote a programming language (Kira: http://www.mathgladiator.com/projects/kira/ ) to solve this problem. I can attest that the problem... well, sucks.
If you want to get off the ground, then using a RDBMS isn't the way to go. The way I would recommend is to use object graph serialization then as the problems arise, use a database to index. I wrote about this here: http://blog.mathgladiator.com/2010/08/guide-to-databases-in-...