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           --skip-tables      Comma-separated list of table names to exclude
29           --skip-tables-like Comma-separated list of regexen to exclude tables
30           --debug            Print debugging information
31

DESCRIPTION

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

AUTHOR

52       Ken Youens-Clark <kclark@cpan.org>.
53
54
55
56perl v5.34.1                      2022-05-10                   SQLT-DIAGRAM(1)
Impressum