dbdiagram.io - A Database Diagram Designer Built for Developers and Analysts

Starting as a feature developed by our interns to help our customers visualize their database schemas on holistics.io  (Business Intelligence Platform), we found an opportunity to release dbdiagram.io as a standalone tool to support and contribute to the data community.

That’s how dbdiagram.io was built, as a quick and simple database designer which is optimized for data analysts and developers, to help them design database diagrams using just their keyboard.

Read more about dbdiagram.io

How dbdiagram.io makes your life better 😌

0. It’s free — Free to design, Free to share

1. Smooth experience — Designed with Data Analysts and Developers in mind

As Data Analysts and Developers, we all know the truth that sometimes relying on a mouse just doesn’t work. Based on this, while other tools focus on the experience of having to x2-click to create a table, x2-click to create a field and x2-click to change the value, dbdiagram.io brings you an experience where typing is just enough. Let’s see how it works:

The UI/UX: Just simply open dbdiagram.io on your browser and start designing your diagram

  • The Toolbar — To manage your diagrams, import, export, login and share with others
  • Code Editor — Where you add tables, fields and relationships, simple rule, you type the diagram appears ✨
  • Diagram — To zoom in/out, move your diagram

Create Tables and Fields: To create tables and fields, follow the syntax below and type into your code editor on the left

//Syntax
Table tablename {
  field1 type PK
  field2 type
  ...
}

//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
}

Create Relationships: When you need your mouse, you have the option of using your mouse. For the relationships, it’s more intuitive to interact wth the diagram, so we support creating relationships both by typing the code and by dragging from field to field

//3 Relationship Types
   <   one-to-many
   >   many-to-one
   -   one-to-one
   -   
//Long-form syntax
Ref name-optional { table1.field1 < table2.field2 }

//Short-form syntax
Ref name-optional: table1.field < table2.field2

//Example
Ref users.country < countries.code

2. Import and Export on demand

  • Visualize your database within seconds, by importing in your existing PostgreSQL or MySQL scripts
  • Export to PDF/PNG/SQL Scripts or Share easily with others
  • Since we are using DSL (Domain-specific Language) we can easily add Import/Export for other databases later, please feel free to let us know what you'd like to see! 👐

3. Tips

  • 🖱Double-clicking on any table label will navigate you to the definition of your table code
  • 💾 Ctrl/Cmd + S to save your project
  • 🤔 If the code editor is too small, drag the edges to make it bigger

Sample Database Diagrams

With the mission to contribute more to the community, we also hope that the community uses dbdiagram as a tool to share their project with others. Here are some sample database schemas that we have designed.

👉 Sample E-commerce Schema

👉 Sample Airbnb Schema

If you love it, please spread your love with the hashtag #dbdiagram! Feel free to add your feedback here!

Originial Source: https://hackernoon.com/dbdiagram-io-a-database-diagram-designer-built-for-developers-and-analysts-975f310d4f13