SQL
Give the column nobody can explain a rule the database can actually carry.
Quickstart · Get it working.
Your First DDL Transform Should Write Nothing: a SQL Quickstart
The most accurate description of your data is almost certainly a `CREATE TABLE` statement sitting in a migrations folder. It is reviewed, versioned, and executable - and it is legible to exactly one kind of consumer. Getting it out of that folder and into a data contract, a JSON Schema, or another vendor's dialect is usually where the accuracy stops.
API · Drive it from the Integration API.
Four Routes, One Envelope: SQL DDL on the CoreModels Transform API
| Route | Role | What it touches | |---|---|---| | `POST /graph/transform/schema/import/{projectId}` | Admin | writes the DDL's model into the project | | `POST /graph/transform/schema/export/{projectId}` | Viewer | reads the project, returns `CREATE TABLE` text | | `POST /graph/transform/schema/map/{projectId}` | Viewer (`ai`: Editor) | nothing - stateless, source in, target out | | `POST /graph/transform/plan/execute/{projectId}` | Viewer | nothing - replays a stored plan |
MCP · Drive it from an agent.
Teaching an Agent to Read DDL: the transform_schema MCP Tool
A partner attaches `subscriber_dump.sql` to a ticket. Backticks, an `ENUM`, a `DATETIME`, and one column named by a DBA who shouts. Your canonical model is a JSON Schema in a repo. Somebody has to reconcile the two, and historically that somebody spent an afternoon in a diff viewer.
Automation · Put it in CI.
Commit the Plan, Not the Guess: SQL Conversion Pipelines That Repeat
Database teams solved schema-as-code years ago. DDL lives in git, migrations get reviewed, nobody types `ALTER TABLE` into production by hand. Then the schema has to leave the database - become a JSON Schema for the API team, a contract for the platform team, DDL for a second warehouse - and the discipline evaporates into a conversion script that one person ran once on a laptop.
Deep dive · Understand what it does.
No Annotation Slot: How the SQL DDL Coder Carries Meaning, and Where It Stops
Every other format on the CoreModels transform surface has somewhere to put meaning. JSON Schema has `x-` keywords. Avro has custom attributes. LinkML has `slot_uri` and `meaning`. OWL *is* meaning. SQL DDL has a name, a type, and a handful of constraints - and no annotation slot at all.
Why this matters
The case for SQL — the problem it fixes and what changes when it is fixed — is on coremodels.io.
Read the SQL guides →