SCHEMASPY(1)
π SCHEMASPY(1) π
okay bestie, welcome to SCHEMASPY(1) from the General Commands Manual β this is the schemaspy page, and it's all about analyzing + graphing database schemas. buckle up, it's giving documentation but make it cute β¨
πΈ NAME πΈ
schemaspy β Tool for analyzing and graphing database schemas. periodt π
π¦ SYNOPSIS π¦
schemaspy -db dbName -o outputDir [options]
π DESCRIPTION π
okay so schemaspy is a Java-based tool that analyzes the metadata of a schema in a database and generates a visual representation of it in a browser-displayable format. it lets you click through the hierarchy of database tables via child and parent table relationships, as represented by both HTML links and entity-relationship diagrams. it's also designed to help resolve the obtuse errors that a database sometimes gives related to failures due to constraints. iconic, honestly π
schemaspy uses JDBC's database metadata extraction services to gather the majority of its information, but has to make vendor-specific SQL queries to gather some information such as the SQL associated with a view and the details of check constraints. the differences between vendors have been isolated to configuration files and are extremely limited. almost all of the vendor-specific SQL is optional. lowkey slay π¦
β¨ OPTIONS β¨
okay bestie, option time. every flag is here, no skips, no cap π
π Commonly Used Options π
-t databaseTypeβ type of database (e.g.mysql,ora,db2, etc.). use-dbhelpfor a list of built-in types. defaults toora.-db dbNameβ name of database to connect to. this flag is required. no vibes-based guessing, okay? π«Ά-u userβ valid database user id with read access. a user id is required unless-ssois specified.-s schemaβ database schema. this is optional if it's the same as user or isn't supported by your database. use-noschemaif your database thinks it supports schemas but doesn't (e.g. older versions of Informix).-p passwordβ password associated with that user. defaults to no password.-o output-dirβ directory to write the generated HTML/graphs to. this flag is required. yes, required required π-dp path-to-driversβ looks for drivers here before looking indriverPathin[databaseType].properties. the drivers are usually contained in.jaror.zipfiles and are typically provided by your database vendor.-hqβ listed right above-lq; see the next bullet for the higher/lower-quality diagram explanation.-lqβ generate either higher or lower-quality diagrams. various installations of Graphviz (depending on OS and/or version) will default to generating either higher or lower quality images. that is, some might not have the βlower qualityβ libraries and others might not have the βhigher qualityβ libraries. higher quality output takes longer to generate and results in significantly larger image files (which take longer to download / display), but the resultant Entity Relationship diagrams generally look better. it's giving "worth it but bestie your image files are huge" π
π Less Commonly Used Options π
-gv path-to-graphvizβ by default SchemaSpy expects thedotexecutable to be in thePATHenvironment variable. use this option to explicitly specify where Graphviz is installed.-desc descriptionβ displays the specified textual description on summary pages. if your description includes an equals sign then escape it with a backslash. for example:
-desc "<a href\='http://schemaspy.sourceforge.net'>SchemaSpy</a>".
-allβ evaluate all schemas in a database. generates a high-level index of the schemas evaluated and allows for traversal of cross-schema foreign key relationships. use with-schemaSpecregex to narrow-down the schemas to include.-schemas schema1,schema2β evaluate specified schemas. similar to-all, but explicitly specifies which schema to evaluate without interrogating the database's metadata. can be used with databases like MySQL where a database isn't composed of multiple schemas.-meta metafileβmetafileis either the name of an individual XML file or the directory that contains meta files. if a directory is specified then it is expected to contain files matching the pattern[schema].meta.xml. for databases that don't have schema substitute database for schema. see Providing Additional Metadata on the website for details.-connprops propsfile/-connprops key\=valueβ specifies additional properties to be used when connecting to the database. either specify a.propertiesfile (withkey=valueentries) or specify the entries directly, escaping the='s with=and separating eachkey\=valuepair with a semi-colon. yes, the escaping is a whole vibe π-i tableNamesRegexβ only include matching tables/views. this is a regular expression that's used to determine which tables/views to include. for example:-i (.*book.*)|(library.*)includes only those tables/views with'book'in their names or that start with'library'. you might want to use-descwith this option to describe the subset of tables.-I tableNamesRegexβ exclude matching tables/views. this regular expression excludes matching tables/views from the analysis. can be used in conjunction with-i.-x columnNamesRegexβ exclude matching columns from relationship analysis to simplify the generated graphs. this is a regular expression that's used to determine which columns to exclude. it must match table name, followed by a dot, followed by column name. for example:-x (book.isbn)|(borrower.address)note that each column name regular expression must be surround by()'s and separated from other column names by a|. excluded relationships will still show up on detail pages.-X columnNamesRegexβ same as-xbut excluded relationships will not show up on detail pages.-noviewsβ exclude all views.-ahicβ Allow HTML In Comments. any HTML embedded in comments normally gets encoded so that it's rendered as text. this option allows it to be rendered as HTML. spicy πΆοΈ-norowsβ don't query or display row counts.-noimpliedβ don't include implied foreign key relationships in the generated table details.-ssoβ Single Sign-On. don't require a user to be specified with-uto simplify configuration when running in a single sign-on environment.-pfpβ Prompt For Password. prompts for the password so it doesn't appear on the command line. security bestie behavior π₯-nohtmlβ only generate files needed for insertion/deletion of data (e.g. for scripts) and an XML representation of the schema.-loglevelβ specifies how verbose logging of programmatic flow should be. the levels in descending order are:severe,warning,info,config,fine,finer,finest.
π SEE ALSO π
- SchemaSpy: Graphical Database Schema Metadata Browser,
http://schemaspy.sourceforge.net/.
mwah π okay bestie, that's the whole page β from Debian and dated January 3, 2013. go graph those schemas, you absolute icon π β¨π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: schemaspy 5.0.0-bp160.1.11 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms