Schemaspy
Database documentation built easy
Install / Use
/learn @schemaspy/SchemaspyREADME
SchemaSpy is a database metadata analyzer. It helps your database administrators and developers visualize, navigate and understand your data model. With an easy-to-use HTML-based report, traversing the entity-relationship diagram has never been simpler. Our product showcase is available at http://schemaspy.org/sample/index.html.
Installation
SchemaSpy is a standalone application without GUI. Just download the latest JAR file or Docker image and you're ready to go! To use SchemaSpy from Maven, please see the Maven chapter below.
# replace '6.2.4' with latest version
curl -L https://github.com/schemaspy/schemaspy/releases/download/v6.2.4/schemaspy-6.2.4.jar \
--output ~/Downloads/schemaspy.jar
For unreleased bug fixes and features-in-progress, download our snapshot JAR or use Docker tag
snapshot
Maven
SchemaSpy releases two types of JAR files: a bare-bone JAR and a fat JAR including all dependencies. Both JARs are published to Maven Central. The fat JAR is also attached to releases on GitHub. The "maven central" badge at the top of this page will take you straight to the latest version on Maven Central.
The Maven GAV of the two artifacts is as follows:
- bare-bone JAR:
org.schemaspy:schemaspy:<version> - fat JAR:
org.schemaspy:schemaspy:<version>:app← note theappclassifier
Quick start
Let's assume you're using PostgreSQL (11 or later). First, download their JDBC driver.
curl -L https://jdbc.postgresql.org/download/postgresql-42.5.4.jar \
--output ~/Downloads/jdbc-driver.jar
Then run SchemaSpy against your database and you're ready to browse it in
DIRECTORY/index.html.
java -jar ~/Downloads/schemaspy.jar \
-t pgsql11 \
-dp ~/Downloads/jdbc-driver.jar \
-db DATABASE \
-host SERVER \
-port 5432 \
-u USER \
-p PASSWORD \
-o DIRECTORY
If you aren't using PostgreSQL, don't panic! Out of the box, SchemaSpy supports
over a dozen different databases. List them by using -dbhelp. Still not enough?
As long as your database has a JDBC driver you can
plug it in
to SchemaSpy.
Documentation and FAQs
We host our documentation on Read the Docs. Be sure to check out the section on troubleshooting common problems.
Main use cases
SchemaSpy covers a lot of use cases for database analysis and documentation. Be sure to check out the guides provided by the community later in this README.
On-demand database documentation
The preferred way to document databases is through entity-relationship (ER) diagrams. However, drawing these diagrams manually is such a time-consuming and error-prone process that we hardly ever draw them in practice. When the diagrams are drawn, they rarely stay up-to-date. With SchemaSpy, this is no longer a problem. The diagrams can be generated quickly and even as a part of your CI/CD workflow to ensure it's always up to date.
Your database in numbers
SchemaSpy can collect various kinds of interesting statistics to describe the shape and form of your database's structure. Drill down deeper into these statistics directly in the report or export them to excel or CSV for further QA analysis.
Keep the data confidential
Nowadays, a company's data can be their most valuable asset. Since SchemaSpy only reads structural information, it works just as well on an empty database replica. This means that the report can be shared for third party analysis without fear.
Detect sub-optimal constructs
SchemaSpy incorporates knowledge about best practices in database design. It can locate and report anomalies such as missing indexes, implied relationships, and orphan tables.
Community
Welcome to the SchemaSpy community! Just reading this file or using the tool means that you're a part of our community and contributing to the future of the project. We're grateful to have you with us!
Some of our community members have put extra effort into sharing SchemaSpy with more people, asked their companies to provide financial aid, or decided to improve the software. We wish we had the space to thank each of you individually because every Github star, tweet or other activity reminds us that our work is appreciated.
Special thanks
For creating the first five versions of SchemaSpy:
For perpetuating SchemaSpy ever since:
For creating tutorials and guides for the community:
- :brazil: Documentando seu banco postgres com schemaspy by Thiago Amaral Monteiro
- :cn: SQLite 可视化SQLite数据库Schemaspy by Geek Tutorial
- :czech_republic: Automatické vytvoření dokumentace k databázi s využitím nástroje SchemaSpy by Pavel Tišnovský
- :de: Datenbank-Analyse mit SchemaSpy by Michael Jentsch
- :de: Quick Tipp: Eine Datenbank Struktur verstehen mit Hilfe von schemaspy by von Irving Tschepke
- :es: :arrow_forward: Ejemplo de Uso de schemaspy by MGS Educación, Tecnología y Juventud
- :es: :arrow_forward: Generar modelo desde una base de datos con schemaSpy by Inforgledys
- :es: Cómo documentar tus bases de datos con SchemaSpy by Jesus Jimenez Herrera
- :es: ¿Y si documentamos la base de datos? ... SchemaSpy al rescate by Víctor Madrid
- :fr: :arrow_forward: Une DOC AUTOMATIQUE avec SchemaSpy (et SYMFONY et GITLAB) by YoanDev
- :fr: Documentation automatique d’une App Symfony avec SchemaSpy et GitLab ! by YoanDev
- :fr: Documenter une base de données avec SchemaSpy by Data 4 Everyone!
- :jp: SchemaSpyでデータベースのドキュメントを生成してみた By 坂井裕介
- :jp: SchemaSpyでER図を生成する By @onozaty
- :portugal: :arrow_forward: SchemaSpy - fácil de usar e já salvou meu emprego! By Dev Multitask
- :portugal: Documentando bancos com Schemaspy By Krisnamourt Silva
- :thailand: แนะนำ SchemaSpy เครื่องมือทำเอกสาร Database by @icegotcha
- :vietnam: Hướng dẫn sử dụng SchemaSpy by Pham Xuan Dung
- :open_book: Building Microservices: Designing Fine-Grained Systems by Sam Newman
- :open_book: Continuous Integration, Delivery, and Deployment by Sander Rossel
- :open_book: Java Power Tools by John Ferguson Smart
- :open_book: Learning PostgreSQL by Salahaldin Juba et al.
- :open_book: Monolith to Microservices: Evolutionary Patterns to Transform Your Monolith by Sam Newman
- :open_book: The Productive Programmer by Neal Ford
- :arrow_forward: [SchemaSpy Data Dictionary Tool for Research Datasets](https://www.you
Related Skills
cursorrules
A collection of .cursorrules
claude-code-ultimate-guide
2.0kA tremendous feat of documentation, this guide covers Claude Code from beginner to power user, with production-ready templates for Claude Code features, guides on agentic workflows, and a lot of great learning materials, including quizzes and a handy "cheatsheet". Whether it's the "ultimate" guide to Claude Code will be up to the reader :)
agent-toolkit
1.1kA curated collection of skills for AI coding agents. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.
learn-agentic-ai
4.0kLearn Agentic AI using Dapr Agentic Cloud Ascent (DACA) Design Pattern and Agent-Native Cloud Technologies: OpenAI Agents SDK, Memory, MCP, A2A, Knowledge Graphs, Dapr, Rancher Desktop, and Kubernetes.


