<aside> 💡 This page is deprecated. Please use https://dbdiagram.io/docs
</aside>
dbdiagram.io is a free, simple tool to draw database diagrams (ERDs) by typing DSL code. dbdiagram uses the popular DBML (Database Markup Language).
dbdiagram.io uses DBML as our syntax for defining database. DBML is open-sourced markup language used to define database schema structure. DBML is also developed by the team behind dbdiagram.
Please refer to https://www.dbml.org/docs/ for the full list of syntaxes available.
To create tables and fields, use the Table
definition syntax (docs)
//Example
Table users {
id int [PK]
email varchar
gender varchar
relationship varchar
dob datetime
country int
}
Table countries {
code int [PK]
name varchar
continent_name varchar
}
We support 2 ways of creating relationships:
Change the header color for the table. Useful to highlight key tables, or differentiate between them quickly.