[vienna.pm] [ANNOUNCE] GraphViz::ISA 0.01
marcel at codewerk.com
Sat May 19 07:02:25 CDT 2001
* * * vienna-pm-list * * *
GraphViz::DBI - graph database tables and relations
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:
new( [$dbh] )
Constructs the object; also creates a GraphViz object. The
constructor accepts an optional open database handle.
Sets the database handle.
Returns the database handle.
Checks the database metadata whether the argument is a valid table
Determines whether the field belonging to the table is a foreign key
into some other table. If so, it is expected to return the name of
that table. If not, it is expected to return a false value.
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.
This method goes through all tables and fields and calls appropriate
methods to determine which tables and which dependencies exist, then
hand the results over to GraphViz. It returns the GraphViz object.
* Test with various database drivers to see whether they support the
* Provide the possibility to name edges to specify the type of
relationship ('has-a', 'is-a', etc.).
None known so far. If you find any bugs or oddities, please do inform
Marcel Grünauer <marcel at 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.
We are Perl. Your table will be assimilated. Your waiter will adapt to
service us. Surrender your beer. Resistance is futile.
-- London.pm strategy aka "embrace and extend" aka "mark and sweep"
You are subscribed to vienna-pm-list as Marcel Grunauer <marcel at codewerk.com>
More information about the Vienna-pm