Free tool

Check a database schema for design problems

Paste a schema as DBML or SQL and get a health score with a list of what a careful reviewer would flag: the missing keys, the unindexed foreign keys, the types that do not line up.

Free, no account. Your schema is converted on our server and not stored. Up to 200 KB.

What it checks

A schema can parse, load, and run for years while being wrong in ways that only show up under load or in a bug report. These are the checks, each with the reason it matters:

The checks the schema checker runs
CheckLevelWhy it matters
Reference joins different typesErrorA foreign key must have the same type as the column it references; most databases reject the constraint, and the rest compare by casting.
Table has no primary keyWarningWithout a key a row cannot be updated or deleted reliably, and most ORMs refuse the table.
Foreign key has no indexWarningPostgreSQL and SQL Server do not index a foreign key for you. Joins and deletes on the referenced table then scan this one.
Money stored as a floatWarningFloating point cannot represent most decimal amounts exactly. Use decimal/numeric with a fixed scale.
Duplicate indexWarningTwo indexes over the same columns cost a write each and serve the same reads.
Name is a reserved wordWarningA reserved word has to be quoted in every query, in at least one of PostgreSQL, MySQL and SQL Server.
Table names mix naming stylesNoteMost tables use one style and these use another. A consistent convention keeps queries guessable.
Enum is never usedNoteNo column has this enum as its type.
Table has no relationshipsNoteNothing references this table and it references nothing. That can be right (a lookup or a log), or a missing foreign key.
Very wide tableNoteMore than 50 columns usually means the table holds more than one thing.

Errors, warnings, and notes

An error is something a database will reject or silently work around, such as a foreign key whose type differs from the key it references. A warning is a design that works and will cost you later. A note is worth a look and often fine: a log table with no relationships is not a mistake, but a table that was meant to have a foreign key and does not looks exactly the same.

None of this replaces review by someone who knows the domain. It removes the part of review that is mechanical, so the conversation can be about the model.

Check every change, not just this one

In DB Planner the same checks run continuously in the Problems panel beside the diagram, so a missing index is flagged while the table is being designed and not after it has shipped. When the schema does change, the SQL migration generator writes the script and warns about the statements that lose data.

Schema checker questions

What does the schema checker look for?

10 things a reviewer would flag in a schema that otherwise works: reference joins different types, table has no primary key, foreign key has no index, money stored as a float, and more. The full list is on this page.

Can I check a SQL schema, or only DBML?

Either. Paste CREATE TABLE statements from PostgreSQL, MySQL, or SQL Server, or paste DBML. SQL is read into a schema first and then checked the same way.

How is the score worked out?

It starts at 100 and loses points for each finding, with an error costing more than a warning and a warning more than a note. The penalty is weighed against the number of tables, so one problem in a three-table schema counts for more than one in a hundred-table schema. 90 and above is Healthy, 70 and above is Fair.

Does it check my data or my queries?

No. It reads the structure only: tables, columns, types, keys, indexes, and references. It never connects to a database, so it cannot see rows, query plans, or missing statistics.

Put your schema on the board

Start on the free plan, no card needed. Pro is $5 a month when you outgrow it.

Start designing free