in reply to Decomposing a database's structure
Are all the relations specified properly with FK declarations in the DDL, or are you talking about dumping SQL queries during runtime to see what tables are actually being used and joined?
I've written a rather nice table and SP graphing tool that parses DDL. It supports Sybase/SQL Server and MySQL currently, I don't know how close that is to DB2 syntax.
It's not actually released yet, but I could throw a tarball your way if you like.
In Section Seekers of Perl Wisdom