paint-brush
Designing Database Diagrams Effortlessly with Open-Source ERDL Languageby@tws
312 reads
312 reads

Designing Database Diagrams Effortlessly with Open-Source ERDL Language

by twsSeptember 18th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Database Diagram supports both open-source languages like ERDL and DBML, giving users the flexibility to choose their preferred modeling language for designing database diagrams.
featured image - Designing Database Diagrams Effortlessly with Open-Source ERDL Language
tws HackerNoon profile picture


What started as a tool I developed to simplify visualizing complex database schemas quickly grew into a platform that aims to help developers and data analysts alike. The vision was simple: to create an intuitive, keyboard-friendly database design tool that anyone could use, without the friction of cumbersome clicks or endless UI navigation.


The tool supports both open-source languages like ERDL and DBML, giving users the flexibility to choose their preferred modeling language for designing database diagrams. Whether you're a fan of DBML's expressive syntax or prefer the simplicity of ERDL, the tool seamlessly integrates both.


How It Works:

  • User-Friendly UI/UX: Just open DatabaseDiagram.com and start typing your schema—your diagram appears instantly, making design fast and easy.
  • The Toolbar: Manage diagrams, import/export schemas, and share your designs with a click.
  • Code Editor: Type out your database schema and see your diagram take shape in real-time. The syntax is straightforward—just type, and the diagram is generated.
  • Visual Diagram: Zoom, pan, and navigate through your diagram effortlessly.


Creating Tables and Fields:

You can define tables and fields directly in the code editor. Here's the syntax to help you get started:

Define a table


Creating Relationships in ERDL:


  • < one-to-many. e.g: Customer.id < Order.Id
  • many-to-one. e.g: Order.Id > Customer.id
  • one-to-one. e.g: Customer.id - Address.id
  • <> many-to-many. e.g: authors.id <> books.id


eg. CustomerID int FK > Customer.CustomerID


Defining table relationships


Import and Export Options Whether you're working with PostgreSQL or MySQL, you can import your existing scripts to instantly visualize your database. Export your diagrams to PDF, PNG, or SQL scripts to share with your team or integrate into your workflow.


I’m constantly working on improving DatabaseDiagram.com, and feedback from the community has been invaluable in shaping its evolution. If you love the tool, spread the word and share your feedback!