/tools

Data-model designer

Design entities, attributes, keys and relationships. Switch between logical names and physical PostgreSQL names, then export your model or a new-schema DDL draft. Everything stays in this browser.

Use each form’s Save button to apply edits. Exports use the saved model; they pause while a form has unsaved edits. Selecting another item or undoing restores its saved values.

Model diagram

Select a node to edit it. Drag nodes to move them; drag the background to pan. Focus a node and use arrow keys to move it, or Enter to select. Relationship arrows point from the referencing child to the referenced parent. Labels show parents per child and children per parent, at constraint-check time.

Design review

Relationships / foreign keys

Column pairs

Each row maps a child column to a parent column. The parent set must be a declared primary or unique key. This designer requires matching base types; some other PostgreSQL-compatible type pairs are deliberately outside its scope.

Open model JSON

Import a model exported by this designer (up to 1 MB). The current model can be restored with Undo. SQL parsing and database discovery are handled by the existing schema explorer; this editor uses its own explicit model format.

Scope and PostgreSQL references

Logical names and descriptions annotate the same entities and relationships as the physical model. They are not an independent conceptual model. The physical subset supports ordinary tables, a fixed type list, NOT NULL, integer/bigint identities, one primary key, unique keys and MATCH SIMPLE foreign keys with selected actions and deferral. NULLS DISTINCT is the default. The diagram does not require a parent to have any children.

DDL is for a new design, not an existing-database migration. It creates all tables before keys and foreign keys, so cyclic references are supported. Existing schemas, objects, permissions and server-specific limits require review. No SQL is executed here. CHECK/default/generated expressions, custom types, views, indexes, partitions, inheritance, collations, RLS and triggers are outside this model.

Draft errors stay editable and block DDL preparation. Warnings need review but do not block it. Identifiers are quoted and checked against the standard 63-byte limit. Models allow 100 entities, 1,000 total columns, 100 columns per entity and 500 relationships; keys allow 32 columns. The diagram shows up to 40 entities and 12 columns per node; JSON and the inspector retain the full model. Undo/Redo keeps 20 revisions in memory. Reload clears the model; export JSON to save it.

Keys and constraints · CREATE TABLE