Relationships
We support 2 ways of creating relationships:
- Typing DBML code (docs)
- Interacting directly on the diagrams itself, by dragging from field to field.
Change the header color for the table. Useful to highlight key tables, or differentiate between them quickly.
The below defines a 1-n relationship between countries.code
to users.country
Ref: countries.code < users.country;
// or use inline relationships
Table users {
id int [primary key]
country int [ref: > countries.code] // many-to-one
...
}