1SQLT-DIAGRAM(1)       User Contributed Perl Documentation      SQLT-DIAGRAM(1)
2
3
4

NAME

6       sqlt-diagram - Automatically create a diagram from a database schema
7

SYNOPSIS

9         ./sqlt-diagram -d⎪-f⎪--from⎪--db=db_parser [options] schema.sql
10
11         Options:
12
13           -o⎪--output        Output file name (default STDOUT)
14           -i⎪--image         Output image type ("png" or "jpeg," default "png")
15           -t⎪--title         Title to give schema
16           -c⎪--cols          Number of columns
17           -n⎪--no-lines      Don't draw lines
18           --font-size        Font size ("small," "medium," "large," or "huge,"
19                              default "medium")
20           --gutter           Gutter size between tables
21           --color            Add colors
22           --show-fk-only     Only show fields that act as primary
23                              or foreign keys
24
25           --natural-join     Perform natural joins
26           --natural-join-pk  Perform natural joins from primary keys only
27           -s⎪--skip          Fields to skip in natural joins
28           --debug            Print debugging information
29

DESCRIPTION

31       This script will create a picture of your schema.  Only the database
32       driver argument (for SQL::Translator) is required.  If no output file
33       name is given, then image will be printed to STDOUT, so you should re‐
34       direct the output into a file.
35
36       The default action is to assume the presence of foreign key relation‐
37       ships defined via "REFERENCES" or "FOREIGN KEY" constraints on the
38       tables.  If you are parsing the schema of a file that does not have
39       these, you will find the natural join options helpful.  With natural
40       joins, like-named fields will be considered foreign keys.  This can
41       prove too permissive, however, as you probably don't want a field
42       called "name" to be considered a foreign key, so you could include it
43       in the "skip" option, and all fields called "name" will be excluded
44       from natural joins.  A more efficient method, however, might be to sim‐
45       ply deduce the foriegn keys from primary keys to other fields named the
46       same in other tables.  Use the "natural-join-pk" option to achieve
47       this.
48

AUTHOR

50       Ken Y. Clark <kclark@cpan.org>.
51
52
53
54perl v5.8.8                       2007-10-24                   SQLT-DIAGRAM(1)
Impressum