Back to all posts

What to Test in a Schema Compare Tool Before You Buy

For the DBA or architect with a trial licence and a week to decide which schema compare tool the team buys.

On this page

DbSchema moves one reviewed schema change from development to staging to production, even when your team runs more than one database engine. It keeps the design in a model file in Git. It compares that file with each environment and lists every difference before it writes any SQL. You can edit the script before it runs. That makes DbSchema the compare tool worth paying for. DbSchema Pro costs $294 once per user, and the free Community Edition lets you check the connection first.

Six tests decide the purchase: the engines a tool reads, the design file, the review, dropped columns, the licence and the free tier. Run them on your own schema, not on a vendor sample. The differences that matter show up on the tables your team already argues about.

Run the compare end to end on your own schema

A schema compare takes two definitions of a schema. It returns the actions that make the target match the source. Microsoft's documentation for Schema Compare in the MSSQL extension for Visual Studio Code shows the same shape. Either side can be a live database, a .dacpac file or a SQL project. You can exclude single actions before you apply them or generate a script.

  1. Pick the source: a live database, a saved model file or a folder of DDL scripts.
  2. Pick the target, usually the environment you deploy to next.
  3. Run the compare and time it on your real object count.
  4. Read the differences object by object, and exclude what should not ship.
  5. Generate the script, read it, and only then apply it.

Step four separates the tools. Some return only a script, so you review SQL. Others list tables, columns, indexes and foreign keys, so you review the schema. On a release with forty differences, a colleague can check the second kind.

Flow from a model file in Git through compare and review, where each difference goes to the model, is ignored or goes to the database, to an editable SQL script that Execute runs on development, staging and production one at a time
Figure 1In DbSchema Pro one reviewed change in the model file reaches each environment through its own compare and script, and the databases change only when you press Execute.

In DbSchema the review happens in the Synchronization Dialog. Database → Selective Refresh Model Schemas from Database lists each difference. For each one, you decide whether to update the model or push the change. Commit in the database then writes the SQL, and you can edit it before you click Execute. Until Execute, only the model file changes.

DbSchema Synchronization Dialog listing each difference between the model and the database, with a merge or commit direction per object

Shortlist a tool that reads every engine you run

Start with the engines. A tool that reads only SQL Server leaves your PostgreSQL and MongoDB databases unchecked. DbSchema connects over JDBC to more than 100 SQL and NoSQL databases. It reverse-engineers each one into a diagram and saves the design as a .dbs XML file you commit to Git. Then it compares that file with a live database and generates the migration script.

The free Community Edition connects, draws the diagrams and runs the SQL editor. The saved model file and schema synchronization need Pro.

Redgate SQL Compare covers SQL Server. It adds an SSMS add-in and also compares backups, snapshots and script folders. Devart's dbForge Compare Bundle for SQL Server sells schema and data comparison together, and Devart sells its Studio products one engine at a time. Navicat Premium manages many engines from live connections. pgAdmin, DBeaver and DbVisualizer browse and query, each with its own scope of schema diff. Linux and macOS teams can read the Redgate SQL Compare alternatives that run there.

Teams that standardize on one visual tool often weigh DBeaver alternatives at the same time. The modeling question and the diff question tend to have the same answer.

Check how the diff engine handles order and drops

A diff engine reads the system catalog on both sides. It builds an object graph and derives the statements that reconcile them. Those are the ALTER TABLE, CREATE INDEX and DROP CONSTRAINT lines you would otherwise write by hand. Check four things during the trial.

TestWhat to check
OrderForeign keys, indexes and constraints must be created and dropped in a sequence the target accepts. A wrong order fails halfway through a release.
GranularityWhether you can exclude one column, or only a whole table.
Destructive actionsWhat happens to a dropped column. Redgate says SQL Compare warns about data loss before you deploy. In DbSchema the generated SQL is in front of you and stays editable until it runs.
Where the result goesA diff you run once, or a design you keep.

What to see: the destructive-actions row is the one that costs data on release day, so test it first.

DbSchema keeps the design. The model is an XML file next to the application code. A schema change arrives in a pull request as a diff a reviewer can read. The migration script generated from it goes into the same commit. Turning that diff into a safe migration script is a test of its own.

Generated migration script in DbSchema's Execute Script dialog, with the ALTER and CREATE statements shown before they run

Price the licence over three years, not one

None of the commercial compare tools is free. The licence models differ enough to change the three-year number.

Redgate sells SQL Compare as a one-year subscription. Its product page lists $327 per user for one to four users. Redgate's licensing documentation adds a second cost: the command line in an automated delivery pipeline needs a Flyway Enterprise or SQL Toolbelt licence.

Devart sells the dbForge Compare Bundle for SQL Server in Standard and Professional editions. Professional adds version control comparison and the command line. Devart offers a subscription or a perpetual licence. Its ordering page says a subscription becomes inaccessible when it ends, while a perpetual licence keeps working.

DbSchema Pro is a one-time purchase of $294 per user, before taxes. The first year of updates is included. After that, updates cost $75 a year and are optional. Over three years with every update, Pro comes to $444 per user. A monthly plan costs $29.40, and personal and education licences cost less.

Two bars: one Pro seat bought once with updates in years two and three costs 444 USD over three years, 36 monthly payments cost 1,058.40 USD
Figure 2Over three years, a Pro seat bought once costs 444 USD with every update, against 1,058.40 USD paid monthly.

The Community Edition stays free with no time limit. Test it first. It tells you whether your engines are read correctly before you spend anything.

Ask what the tool keeps above the physical schema

Database design has three levels, from the ANSI/SPARC three-schema architecture of 1975[1]. The external schema is what one application sees, such as its views. The conceptual schema is the entity-level structure of the whole database. The internal schema is the physical layout: files, indexes, storage types and partitions.

Every diff engine works at the internal level, because that is where the catalog is. So ask what a tool does with the level above. That is where a naming decision or a split table is still cheap to change. DbSchema Architect keeps logical and conceptual models that do not depend on one engine. You generate the physical schema from them for whichever engine the project uses.

One test follows from this. Rename a column in the design, compare against a copy, and read the script. A tool that drops the column and adds a new one loses the data in it. This single case separates the tools more sharply than anything else on the list.

Run the test on SQL Server from any operating system

Here is the test to run against your own SQL Server instance, from Windows, macOS or Linux:

  1. Open DbSchema, choose Microsoft SQL Server, and enter the host, port and user in the Connection Dialog.
  2. Let DbSchema reverse-engineer the schema into the local model.
  3. Save the model as a .dbs file and commit it to your branch.
  4. Change a column type or an index on the diagram while disconnected. The live database stays untouched.
  5. Open Database → Selective Refresh Model Schemas from Database against staging and read the differences.
  6. Generate the SQL, remove what you want to exclude, and run it against staging only.

Only step six writes to SQL Server. Run it twice: once against a staging copy, and once against a database someone changed by hand. The second run shows how the tool reports drift it did not create. Working offline in a model file between runs keeps the test safe. A SQL Server design tool follows the same route from staging to production.

Before you sign, put the security questions for a schema sync tool to each vendor as well.

Buy the tool that passed the six tests

ToolEnginesDesign file in GitFree tierLicence
DbSchema100+ SQL and NoSQL.dbs XML model fileCommunity, no time limitOne-time per user, or monthly
Redgate SQL CompareSQL ServerScript folders and snapshotsTrial onlyAnnual subscription per user
dbForge Compare BundleSQL Server; other engines are separate productsSnapshots; version control in ProfessionalTrial onlySubscription or perpetual
Navicat PremiumSeveral relational and NoSQLNone, live connections onlyTrial onlyMonthly, yearly or perpetual

What to see: DbSchema is the row with a design file for every engine and a free tier with no time limit.

Choose DbSchema when the fleet is mixed, when the design has to live in Git, and when reviewers would rather read a diagram than a script. One licence covers every engine it supports. Its schema tasks can also be scripted in Groovy and run from a CI pipeline.

Then buy the tool that passed the six tests on your schema. Download DbSchema, reverse-engineer the database you planned to test anyway, and compare it with staging. Logical and conceptual design needs Architect.

Frequently asked questions

What is a database schema compare tool?

It takes two definitions of a schema and returns the DDL that makes the target match the source. One side can be a saved design file. In DbSchema that file is a .dbs XML model you version in Git.

Is Redgate SQL Compare free?

No. Redgate offers a trial, not a free edition. The DbSchema Community Edition is free with no time limit. The licence section above has the per-user price and the extra licence a pipeline needs.

How do I test what a diff tool does with a destructive change?

Drop a column in your model, compare against a staging copy, and read the script before you run it. In DbSchema the SQL stays editable in the Synchronization Dialog until you click Execute.

Can I compare schemas without a live database?

Yes, when the design lives in a file. DbSchema compares two .dbs model files directly. That is how you diff a feature branch against the production model without opening a connection.

What are the three types of schema?

The external schema is the user view. The conceptual schema is the entity-level structure. The internal schema is the physical storage layout. A diff engine reads the internal one.

Sources

  1. docs.teradata.com

Test the diff on your own schema first

DbSchema reverse-engineers your database over JDBC, keeps the model in a Git-versionable .dbs file, and shows the differences side by side before it generates the migration script. Community Edition is free; schema synchronization is Pro.