GraphViz::Dbi::General project

GraphViz::Dbi::General is a perl module which draws a diagram of a database schema (i.e. foreign key relationships between tables) given a DBI handle.

This is a subclass of GraphViz::DBI, that extends it so that:

  1. it will work with any database with a driver that supports the foreign_key_info method (GraphViz::DBI relies on a naming convention to identify foreign keys)
  2. it provides a way of specifying the name of the schema you're interested in (which makes it possible to use this with postgresql, otherwise you get a *huge* graph dominated by pg_catalog and possibly the information_schema, if you're using postgresql 8.0).
Here's the documentation for GraphViz::Dbi::General, extracted from the pod (through the magic of Pod::Simple::HTMLBatch).

You can browse the code itself in web page form:

Here's some sample output, from a project I'm currently working on:

Radio Lens


GraphViz::Dbi::General version 0.1 has just been uploaded to CPAN, and we've already discovered the first typo!

The next version is planned to include some real tests. They'll be postgresql-specific tests, that should automatically be skipped if postgres is not present (or if anything else seems wrong). The installing user will (most likely) have to supply connection information.

Joseph Brenner, 06 Apr 2005