In short
A schema is most often installed from the catalog — OMOP CDM, MIMIC —, imported as a ZIP or from a git repository, duplicated or created blank. Its page shows an overview with counters and the DDL, as a diagram or as text; the mapping has a page of its own.
Getting a schema
Four routes, from the quickest to the longest.
Install from the catalog
The common case. OMOP CDM 5.3 and 5.4, MIMIC-III and MIMIC-IV are published and install in seconds, DDL and mapping included. The Catalog tab of the import dialog.
Import a ZIP or clone a git repository
To pick up a colleague’s schema, or another site’s. Cloning from git needs server mode; the ZIP works everywhere.
Duplicate an existing schema
Start from OMOP to describe your local variant. The original stays untouched.
Create a blank schema
For an in-house model that resembles nothing published. Only the name is required; the DDL and the mapping are filled in afterwards.
A schema’s page
Three tabs, plus the usual Readme, License and Versioning behind the More menu.
Overview
Four counters — tables, foreign keys, indexes, mapped tables — and the readme. Each counter is clickable and leads to the matching tab.
The first three counters read the DDL as text
They come from parsing the DDL, not from executing it. A DDL that declares a primary key inside the CREATE TABLE rather than through an ALTER TABLE won’t be counted, even though it is perfectly valid. The counter is a landmark, not an audit.
DDL
Two views, with a switch at the top left. This tab opens on the diagram.
- Diagram — tables as boxes, columns with their key roles, relationships as lines. You can drag tables around to make it readable, and the layout is kept. A Filter button hides the parts you don’t care about.
- Source — the text editor, with a table of contents on the left listing tables, keys and indexes, and a search field. Clicking an entry scrolls to it.
Cmd/Ctrl+Ssaves.
Groups gather related tables under a name and a colour — “Clinical Data”, “Vocabularies”. They are what make a model like OMOP, with its dozens of tables, actually readable. They also drive the diagram’s automatic layout until you have arranged one by hand.
Write one column per line
The diagram splits a CREATE TABLE body line by line. Put several columns on one line and only the first will appear — in the diagram and in the counters. The DDL still executes correctly: only the drawing is truncated.
The DDL must be written in DuckDB-compatible SQL: it is genuinely executed when an empty database is created from the schema.
Mapping
This is where tables are given a role: which relation carries the patients, the hospitalizations, the notes, the dictionaries, the events and the drugs. Seven sub-tabs, a form or SQL per relation, and a check that verifies what each relation returns — all of it is covered in Mapping a schema.
See a real schema
The demo contains the OMOP and MIMIC schemas. OMOP CDM 5.4 is the most telling: dozens of tables, grouped and coloured, with a complete mapping.
A few limits worth knowing
- A schema’s name is stored in the interface language. A schema named in French will show in French to an English-speaking user. Nothing is translated automatically.
- The identifier is frozen after creation. The name can be changed at any time.
The limits specific to the mapping are listed in Mapping a schema.
Going further
- Schemas — what a schema is, and why Linkr needs one.
- Mapping a schema — the relations, the form, the SQL and the contract.
- Databases — attaching a schema to a database, or creating an empty database from its DDL.
- Community catalog — where OMOP and MIMIC come from.