• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

eg/H03-May-2022-12741

lib/GraphViz/H03-May-2022-22681

t/H27-Mar-2010-693463

ChangesH A D27-Mar-20101.1 KiB2822

INSTALLH A D27-Mar-2010505 2815

LICENSEH A D27-Mar-201017.8 KiB378292

MANIFESTH A D27-Mar-2010474 2828

MANIFEST.SKIPH A D27-Mar-2010476 4339

META.jsonH A D27-Mar-20101.1 KiB4442

META.ymlH A D27-Mar-2010800 3534

Makefile.PLH A D27-Mar-20101.6 KiB4835

READMEH A D27-Mar-20103.2 KiB9368

dist.iniH A D27-Mar-2010154 86

README

1NAME
2    GraphViz::DBI - Graph database tables and relations
3
4VERSION
5    version 1.100860
6
7SYNOPSIS
8      use GraphViz::DBI;
9      my $dbh = DBI->connect('...', '...', '...');
10      print GraphViz::DBI->new($dbh)->graph_tables->as_png;
11
12DESCRIPTION
13    This module constructs a graph for a database showing tables and
14    connecting them if they are related. While or after constructing the
15    object, pass an open database handle, then call "graph_tables" to
16    determine database metadata and construct a GraphViz graph from the
17    table and field information.
18
19    The methods described here are defined by this class; all other method
20    calls are passed to the underlying GraphViz object:
21
22METHODS
23  new([$dbh])
24    Constructs the object; also creates a GraphViz object. The constructor
25    accepts an optional open database handle.
26
27  set_dbh($dbh)
28    Sets the database handle.
29
30  get_dbh()
31    Returns the database handle.
32
33  get_tables()
34    Returns the tables defined in the database.
35
36  is_table($table)
37    Checks the database metadata whether the argument is a valid table name.
38
39  is_foreign_key($table, $field)
40    Determines whether the field belonging to the table is a foreign key
41    into some other table. If so, it is expected to return the name of that
42    table. If not, it is expected to return a false value.
43
44    For example, if there is a table called "product" and another table
45    contains a field called "product_id", then to indicate that this field
46    is a foreign key into the product table, the method returns "product".
47    This is the logic implemented in this class. You can override this
48    method in a subclass to suit your needs.
49
50  graph_tables()
51    This method goes through all tables and fields and calls appropriate
52    methods to determine which tables and which dependencies exist, then
53    hand the results over to GraphViz. It returns the GraphViz object.
54
55FEATURE IDEAS
56    *   Test with various database drivers to see whether they support the
57        metadata interface.
58
59    *   Make each table a vertical port with dependencies using those ports.
60
61    *   Provide the possibility to name edges to specify the type of
62        relationship ('has-a', 'is-a', etc.).
63
64INSTALLATION
65    See perlmodinstall for information and options on installing Perl
66    modules.
67
68BUGS AND LIMITATIONS
69    No bugs have been reported.
70
71    Please report any bugs or feature requests through the web interface at
72    <http://rt.cpan.org/Public/Dist/Display.html?Name=GraphViz-DBI>.
73
74AVAILABILITY
75    The latest version of this module is available from the Comprehensive
76    Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a
77    CPAN site near you, or see <http://search.cpan.org/dist/GraphViz-DBI/>.
78
79    The development version lives at
80    <http://github.com/hanekomu/GraphViz-DBI/>. Instead of sending patches,
81    please fork this project using the standard git and github
82    infrastructure.
83
84AUTHOR
85      Marcel Gruenauer <marcel@cpan.org>
86
87COPYRIGHT AND LICENSE
88    This software is copyright (c) 2001 by Marcel Gruenauer.
89
90    This is free software; you can redistribute it and/or modify it under
91    the same terms as the Perl 5 programming language system itself.
92
93