DBML
DBML creates database schemas from tables, fields, enums, indexes, and references.
Use this type
Use DBML to document relational data models with a concise schema language.
Source format
The source format is Database Markup Language. Enter the source in the diagram.zip editor.
Syntax essentials
- Declare a table with a
Tableblock. - Declare one field on each line.
- Put field settings in square brackets.
- Use
Refto define a relationship.
Example
Table users {
id integer [primary key]
name varchar
}
Table diagrams {
id integer [primary key]
user_id integer
}
Ref: diagrams.user_id > users.id
Rendered exampleDrag to pan. Use the wheel or controls to zoom.