GraphViz::DBI - graph database tables and relations |
GraphViz::DBI - graph database tables and relations
use GraphViz::DBI; print GraphViz::DBI->new($dbh)->graph_tables->as_png;
This module constructs a graph for a database showing tables and
connecting them if they are related. While or after constructing the
object, pass an open database handle, then call graph_tables
to
determine database metadata and construct a GraphViz graph from the
table and field information.
The following methods are defined by this class; all other method calls are passed to the underlying GraphViz object:
set_dbh($dbh)
get_dbh()
is_table($table)
For example, if there is a table called ``product'' and another table contains a field called ``product_id'', then to indicate that this field is a foreign key into the product table, the method returns ``product''. This is the logic implemented in this class. You can override this method in a subclass to suit your needs.
graph_tables()
None known so far. If you find any bugs or oddities, please do inform the author.
Marcel Grünauer <marcel@codewerk.com>
Copyright 2001 Marcel Grünauer. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl(1), GraphViz(3pm).
GraphViz::DBI - graph database tables and relations |