https://github.com/holistics/dbml
Database Markup Language (DBML), designed to define and document database structures
https://github.com/holistics/dbml
dbx
Last synced: 14 days ago
JSON representation
Database Markup Language (DBML), designed to define and document database structures
- Host: GitHub
- URL: https://github.com/holistics/dbml
- Owner: holistics
- License: apache-2.0
- Created: 2019-03-24T05:00:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-01T12:20:52.000Z (21 days ago)
- Last Synced: 2025-04-01T19:09:39.918Z (21 days ago)
- Topics: dbx
- Language: JavaScript
- Homepage: https://dbml.org
- Size: 17.4 MB
- Stars: 3,087
- Watchers: 40
- Forks: 183
- Open Issues: 113
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-rainmana - holistics/dbml - Database Markup Language (DBML), designed to define and document database structures (JavaScript)
- my-awesome - holistics/dbml - 04 star:3.1k fork:0.2k Database Markup Language (DBML), designed to define and document database structures (JavaScript)
- awesome-starred - holistics/dbml - Database Markup Language (DBML), designed to define and document database structures (others)
- jimsghstars - holistics/dbml - Database Markup Language (DBML), designed to define and document database structures (JavaScript)
README
# DBML - Database Markup Language
[](https://github.com/holistics/dbml/actions/workflows/test.yml)
[](https://www.npmjs.org/package/@dbml/core)
[](https://npm-stat.com/charts.html?package=@dbml/core)
[](https://www.npmjs.org/package/@dbml/cli)
[](https://npm-stat.com/charts.html?package=@dbml/cli)
DBML (database markup language) is a simple, readable DSL language designed to define database structures.For more information, please check out [DBML homepage](https://dbml.dbdiagram.io)
## 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](https://dbdiagram.io)
- Also comes with a free database documentation app at [dbdocs.io](https://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
* [Emacs Mode for DBML by ccod](https://github.com/ccod/dbd-mode)
* [Vim Plugin for DBML by jidn](https://github.com/jidn/vim-dbml)
* [VSCode Plugin for DBML by duynvu](https://marketplace.visualstudio.com/items?itemName=duynvu.dbml-language)
* [Python parser for DBML by Vanderhoof](https://github.com/Vanderhoof/PyDBML)
* [FloorPlan: Android's Room to DBML by julioz](https://github.com/julioz/FloorPlan)
* [Go parser for DBML by duythinht](https://github.com/duythinht/dbml-go)
* [DbmlForDjango: Converter between Django models.py and DBML](https://github.com/hamedsj/DbmlForDjango)
* [parseServerSchema2dbml: Converter between ParseServer MongoDB \_SCHEMA collection and DBML by stepanic](https://github.com/stepanic/parse-server-SCHEMA-to-DBML)
* [dbml-renderer: A DBML CLI renderer](https://github.com/softwaretechnik-berlin/dbml-renderer)
* [dbml-parser: A DBML parser written on PHP8 by Butschster](https://github.com/butschster/dbml-parser)
* [Kacher: Laravel's Database Schemas to DBML by Arsanandha Aphisitworachorch](https://github.com/aphisitworachorch/kacher)
* [d365fo-entity-schema: Generate DBML from Dynamics 365 Finance and Operations](https://github.com/noakesey/d365fo-entity-schema)
* [Treesitter for DBML](https://github.com/dynamotn/tree-sitter-dbml)
* [DB2Code: Generate DBML from Maven](https://github.com/alberlau/DB2Code)
* [dbml-java: A DBML parser written on Java 17 by Nils Wende](https://github.com/nilswende/dbml-java)
* [SchemaToDbml: A gem that generates DBML from Rails schema.rb by Ricardo Ribeiro](https://github.com/ricardojcribeiro/schema_to_dbml)
* [Snowflake DBML Generator by Ryan Rozich](https://github.com/ryanrozich/snowflake-dbml-generator)
* [prisma-dbml-generator: Generate DBML schema from Prisma Schema by Marc Stammerjohann](https://github.com/notiz-dev/prisma-dbml-generator)
* [C# parser for Dbml by Niels Bosma](https://github.com/Ivy-Interactive/Ivy.Dbml.Parser)