Flowgraph Studio vs SchemaSpy: Designing a database before it exists

SchemaSpy documents a database that exists. Flowgraph Studio helps you design and review the ER model before the first migration, then draw what was built.

Comparisons · · 4 min read

Flowgraph Studio is our product. We've tried to describe the other tools fairly, from their own documentation as of November 2026.

A database report can tell you which foreign keys exist. It can't settle a product question the team hasn't decided yet.

Say an access-review feature needs to record which people or resources were reviewed, and what was decided for each. The schema doesn't exist. The team is still deciding whether an empty review is valid, and whether a decision belongs to the whole review or to each item.

SchemaSpy and Flowgraph Studio fit different stages of that work. Knowing the stage makes the comparison much more useful.

A proposed access-review model links reviews to review items and subjects, then moves through implementation to database documentation
The proposal explains the intended relationships. A database report later checks what was built.

SchemaSpy starts from a database that exists

SchemaSpy analyses a database's metadata and produces an HTML report you can browse, with entity-relationship diagrams. It also reports anomalies such as missing indexes, implied relationships and orphan tables. It works with any database that has a JDBC driver, reads only the structure (so it can run against an empty copy), and is available as a JAR or a Docker image under the LGPL and GPL.

Its strength is that it shows what's really there. A generated report can reveal tables and relationships that a hand-maintained overview has forgotten.

The report still needs reading. A missing constraint may be deliberate, an unfinished migration, or a rule enforced in the application. A picture of the database can't tell those apart on its own.

A proposal needs room for open questions

Before anything is deployed, draw the model as a proposal. A review contains review items; each item refers to a subject and holds the decision for that subject.

erDiagram
  REVIEW ||--o{ REVIEW_ITEM : contains
  SUBJECT ||--o{ REVIEW_ITEM : "is reviewed in"
  REVIEW {
    uuid id PK
    string status
    date due_on
  }
  REVIEW_ITEM {
    uuid id PK
    uuid review_id FK
    uuid subject_id FK
    string decision
  }
  SUBJECT {
    uuid id PK
    string kind
    string name
  }

The key question is whether a review can exist before its items are added. If it can, the relationship has to allow zero items at that stage, which is what ||--o{ says. A separate business rule can stop anyone completing an empty review.

That difference gets lost when a diagram tries to encode every lifecycle rule in cardinality alone. Put the transition rules in the text beside it, and let the ER view focus on the relationships.

Flowgraph supports the model under discussion

Flowgraph Studio edits Mermaid ER diagrams as code or on the canvas. In Manual mode you move entities, draw a relationship with a + and pick the cardinality at each end, edit attributes, and mark keys, while the code is written for you. The relationship cheat sheet explains each end symbol.

During a review, someone can add REVIEW_ITEM, arrange the entities, and show the resulting Mermaid. Keep the source with the proposal, save a named version at each decision ("Decision per item, agreed"), and Compare with current in version history shows what changed inside each entity and at each end of each relationship.

The Mermaid is a design document. It doesn't guarantee the database will match. Migrations, constraints and application code still need their own implementation and checks.

Use both views after the first migration

Once the schema exists, compare it with the intended model. Flowgraph can help here too: From a SQL schema turns pasted DDL or a pg_dump --schema-only file into an ER diagram in your browser, and importing the repository replays its SQL migrations in order, or reads a Prisma schema, to draw the data model as it is now. Both list any statement they skipped. That gives you the implemented model as Mermaid, to compare with the proposal side by side.

SchemaSpy goes further on the live database: it reads the deployed metadata directly and reports anomalies such as missing indexes. Look at the key relationships first. Did each review item get its reference to the review? Can a subject appear in more than one review? Where is the per-item decision stored?

Differences may be legitimate. The implementation may add an audit table, or separate operational data from history. Record why, rather than forcing the report and the design to hold identical detail.

The useful comparison is between meaning and implementation, not between two pictures with the same number of boxes.

Let the lifecycle guide the choice

Use Flowgraph Studio when the team is designing an ER model and needs a reviewable Mermaid view of its decisions, and later a drawing of what the migrations built. Use SchemaSpy when you need documentation of a running database, straight from its metadata.

For the access-review feature, that suggests an order: agree on the relationships, implement them, then check the deployed schema. Keeping the proposal and the report connected helps future engineers see both what was intended and what was built.

More from the blog

Follow the blog by RSS