DbSchema lets you design, manage, and document Couchbase 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 Couchbase database, and deploy changes. DbSchema also includes a data editor, query builder, and HTML5 documentation - everything you need in one tool.
Download DbSchema Download Couchbase JDBC Driver
Couchbase is a distributed multi-model database that blends document storage, key-value access, and a full SQL query language called N1QL into a single platform. Data is organized into a three-level hierarchy: buckets represent the top-level storage unit with its own memory quota and replication settings, scopes provide a logical namespace within a bucket, and collections hold the actual JSON documents. DbSchema connects via the Couchbase JDBC driver and introspects this hierarchy, rendering scopes and collections as a schema diagram. You can visualize the inferred JSON field structure for each collection, annotate field descriptions, and produce documentation that captures the data model at every level of the hierarchy.
N1QL is Couchbase's SQL++ dialect that extends standard SQL to operate on JSON documents, supporting
nested path expressions, UNNEST for arrays, and USE KEYS for primary-key
lookups. DbSchema's SQL editor connects over the N1QL query service and provides auto-completion for
bucket, scope, and collection names as well as inferred field paths. You can write joins across
collections, aggregate nested arrays with UNNEST, and use Couchbase's Index Advisor
recommendations directly from within DbSchema. Results are displayed in a tabular grid that flattens
nested JSON for easy reading, with the ability to copy rows or export them to CSV.
The DbSchema data explorer lets you browse Couchbase collection contents without writing N1QL. You can apply filter predicates to restrict the result set, page through large collections, and inspect the JSON field structure for any document row. This is invaluable when validating that application writes are producing the expected document shape or when debugging data quality issues in a specific scope. The explorer respects Couchbase's RBAC permissions, showing only the collections and fields that the connected user is authorized to access.
To connect DbSchema to Couchbase, register the Couchbase JDBC driver
(com.couchbase.jdbc.CouchbaseDriver) in DbSchema's driver manager. The JDBC URL format
is jdbc:couchbase://localhost:8093, where port 8093 is the default port for
the Couchbase Analytics service — JDBC connectivity requires the Analytics Service to be enabled on
the cluster. Provide a Couchbase username and password with the necessary RBAC roles in the connection
dialog. For production clusters, use the node hostname or load-balancer address instead of
localhost. Cross-datacenter replication (XDCR) is configured separately in the Couchbase
web console and does not affect JDBC connectivity.
UNNEST, nested paths, and joins in the SQL editor before embedding them in application code.