DbSchema lets you design, manage, and document CockroachDB databases. Create ER diagrams, define tables and columns, and generate SQL scripts - with or without a live database connection.
Use Git to share the design, compare it with the CockroachDB database, and deploy changes. DbSchema also includes a data editor, query builder, and HTML5 documentation - everything you need in one tool.
Download DbSchema Download CockroachDB JDBC Driver
CockroachDB is a distributed SQL database that speaks the PostgreSQL wire protocol and replicates data across nodes using the Raft consensus algorithm. Its schema model includes column families — groupings of columns stored together for access locality — and zone configurations that control data placement across regions. DbSchema connects via the PostgreSQL JDBC driver and exposes the full CockroachDB schema for visual design, documentation, and synchronization.
DbSchema reads tables, foreign keys, indexes, and column family definitions from CockroachDB's information schema and renders them as interactive ER diagrams. You can design multi-region schema layouts, annotate tables with notes, and export diagrams as HTML documentation for your distributed systems team.
The DbSchema SQL editor connects directly to a CockroachDB cluster and supports the full PostgreSQL-
compatible SQL dialect that CockroachDB implements, including SHOW RANGES,
SHOW ZONE CONFIGURATIONS, and other cluster-management statements. Multiple editor
tabs let you run queries against different databases within the same cluster simultaneously.
CockroachDB's online schema change mechanism applies DDL changes without locking tables, but keeping development and production schemas aligned still requires tooling. DbSchema compares two CockroachDB connections — or a saved schema file against a live cluster — and generates the PostgreSQL-compatible DDL needed to resolve differences.
CockroachDB listens on port 26257 by default and accepts connections from any PostgreSQL JDBC driver,
which DbSchema downloads automatically. The JDBC URL format is
jdbc:postgresql://host:26257/dbname?sslmode=require. CockroachDB Serverless clusters
require the full connection string from the CockroachDB Cloud console, which includes the cluster SNI
header (options=--cluster=cluster-name) embedded in the URL. For CockroachDB Dedicated,
download the cluster's CA certificate and reference it with the sslrootcert parameter.