extracting info from Unix database to construct a visual diagram

Ok heres the situation,
We use Solaris 8 at work with Sybase for the db. I need to be able to easily create visual diagrams of some of our more complex systems. I've been using Visio which is such a manual process and takes a while.

I was thinking maybe using Visio somehow in conjunction with sql queries or something else like Apache. I'm not really sure, I was wondering if anyone else has done this before

Any info you can spare would be much appreciated

Thanks in advance