Design and Manage MarkLogic Databases Visually with DbSchema

DbSchema lets you design, manage, and document MarkLogic 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 MarkLogic database, and deploy changes. DbSchema also includes a data editor, query builder, and HTML5 documentation - everything you need in one tool.

DbSchema Database Designer

Download DbSchema Download MarkLogic JDBC Driver

Multi-Model Architecture: Forests, Databases, and HTTP Servers

MarkLogic is an enterprise multi-model database that unifies document storage, full-text search, RDF triple store graph queries, and relational-style row access through the Optic API in a single platform. Storage is organized into forests — physical on-disk partitions that hold document fragments — which are attached to named databases. Applications connect to databases through HTTP Application Servers, each configured with a port, authentication scheme, and default query evaluator (XQuery or JavaScript). DbSchema connects to MarkLogic via the MarkLogic XCC connector and introspects the row-view schema exposed by the Optic API, rendering the TDE (Template-Driven Extraction) view definitions as schema diagrams. This gives teams a visual representation of the relational projection layered over MarkLogic's document content.

Writing Optic API and SQL Queries in the SQL Editor

MarkLogic's Optic API exposes a SQL-compatible interface over TDE views, allowing standard SELECT, JOIN, and aggregation queries to be executed against document content that has been projected into a relational schema via TDE templates. DbSchema's SQL editor connects over the Optic SQL endpoint and provides auto-completion for TDE view names and column names, making it straightforward to write queries that join projected document fields without learning XQuery. For users working with MarkLogic's SPARQL graph queries, the editor also supports submitting SPARQL statements against the configured triple store, enabling exploration of RDF triples alongside tabular Optic queries in the same session.

DbSchema SQL editor writing Optic API SQL queries against MarkLogic TDE views

Browsing Document Collections and Relational Data

The DbSchema data explorer lets you browse rows from MarkLogic TDE views interactively, applying filter and sort operations that translate to Optic API row queries under the hood. This provides a familiar relational browsing experience over what is fundamentally a document store, making it easy for data engineers to validate that TDE templates are projecting the correct fields from the underlying JSON or XML documents. For bitemporal MarkLogic databases, the explorer surfaces the system and valid time columns exposed by the bitemporal template, allowing time-travel queries to be executed directly from the data explorer interface.

Browsing MarkLogic TDE view rows and document projections with DbSchema data explorer

Connection Setup and JDBC URL

To connect DbSchema to MarkLogic, register the MarkLogic XCC connector JAR (com.marklogic.xcc.spi.XccDriver) in DbSchema's driver manager. The JDBC URL format is jdbc:marklogic://localhost:8000/Documents, where port 8000 is the default MarkLogic HTTP Application Server port and Documents is the name of the target database. Provide a MarkLogic admin or application-user username and password with the required document and Optic API privileges in the connection dialog. For HTTPS-enabled application servers, adjust the port to the HTTPS listener and append SSL configuration parameters. Ensure that the target MarkLogic database has at least one TDE template deployed so that DbSchema can introspect schema objects.

MarkLogic multi-model schema documentation with TDE views and RDF graphs generated by DbSchema

Why Teams Use DbSchema with MarkLogic

  • Visualize MarkLogic TDE view schemas as relational diagrams to communicate the document-to-relational projection to SQL-oriented data consumers.
  • Write and test Optic API SQL queries against TDE views in DbSchema's SQL editor with column name auto-completion, reducing reliance on XQuery expertise.
  • Browse projected document data in the data explorer to validate TDE template correctness after updating document schemas or ingestion pipelines.
  • Generate schema documentation for MarkLogic TDE views and RDF graphs to support data governance and compliance programs.
  • Manage connections to multiple MarkLogic databases and HTTP Application Servers from a single DbSchema project file.
  • Use DbSchema's offline schema model to design new TDE view templates and review them with the team before deploying to MarkLogic.