holistics / dbml

Database Markup Language (DBML), designed to define and document database structures

Home Page:https://dbml.dbdiagram.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DBML - Database Markup Language

Build Status npm @dbml/core npm @dbml/core downloads npm @dbml/cli npm @dbml/cli downloads

DBML (database markup language) is a simple, readable DSL language designed to define database structures.

For more information, please check out DBML homepage

Benefits

  • It is simple, flexible and highly human-readable
  • It is database agnostic, focusing on the essential database structure definition without worrying about the detailed syntaxes of each database
  • Comes with a free, simple database visualiser at dbdiagram.io
  • Also comes with a free database documentation app at dbdocs.io

Example

Example of a database definition of a simple blogging site:

Table users {
    id integer
    username varchar
    role varchar
    created_at timestamp
}

Table posts {
    id integer [primary key]
    title varchar
    body text [note: 'Content of the post']
    user_id integer
    created_at timestamp
}

Ref: posts.user_id > users.id // many-to-one

Community Contributions

About

Database Markup Language (DBML), designed to define and document database structures

https://dbml.dbdiagram.io

License:Apache License 2.0


Languages

Language:JavaScript 90.9%Language:TypeScript 3.7%Language:ANTLR 3.6%Language:PEG.js 1.0%Language:TSQL 0.4%Language:Ruby 0.4%Language:SCSS 0.0%