SQLT-DIAGRAM(1)
πΈ NAME πΈ
sqlt-diagram β aka SQLT-DIAGRAM(1), from the User Contributed Perl Documentation corner β automatically creates a diagram from a database schema. Iconic behavior, honestly π
.
β¨ SYNOPSIS β¨
./sqlt-diagram -d|-f|--from|--db=db_parser [options] schema.sql
The options, bestie β¨
-o|--outputβ Output file name (defaultSTDOUT)-i|--imageβ Output image type ("png"or"jpeg,"default"png") β yes, the comma is living inside the quotes in the original, Iβm not touching it π«Ά-t|--titleβ Title to give the schema-c|--colsβ Number of columns-n|--no-linesβ Donβt draw lines--font-sizeβ Font size ("small,""medium,""large,"or"huge,"default"medium")--gutterβ Gutter size between tables--colorβ Add colors--show-fk-onlyβ Only show fields that act as primary or foreign keys--natural-joinβ Perform natural joins--natural-join-pkβ Perform natural joins from primary keys only-s|--skipβ Fields to skip in natural joins--skip-tablesβ Comma-separated list of table names to exclude--skip-tables-likeβ Comma-separated list of regexen to exclude tables--debugβ Print debugging information
π¦ DESCRIPTION π¦
This script will create a picture of your schema. Only the database driver argument (for SQL::Translator) is required. If no output file name is given, then the image will be printed to STDOUT, so you should redirect the output into a file. Very βtrust the processβ of it all π.
The default action is to assume the presence of foreign key relationships defined via REFERENCES or FOREIGN KEY constraints on the tables. If you are parsing the schema of a file that does not have these, you will find the natural join options helpful. With natural joins, like-named fields will be considered foreign keys.
This can prove too permissive, however, as you probably donβt want a field called name to be considered a foreign key π.
So you could include it in the skip option, and all fields called name will be excluded from natural joins. A more efficient method, however, might be to simply deduce the foreign keys from primary keys to other fields named the same in other tables. Use the natural-join-pk option to achieve this. Slay π
.
π AUTHOR π
Ken Youens-Clark <kclark@cpan.org>.
Made with perl v5.42.0, dated 2024-12-12 β thatβs the source/version and date, bestie, and thatβs the whole manual page era πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-SQL-Translator 1.660.0-bp160.1.11 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms