Skip to content

dbdiagram.io

dbdiagram.io draws how database tables fit together from a written description called DBML. Use it to plan or explain the structure before working with actual records.

Visit dbdiagram.io

What does the line between two tables mean?

A line describes how rows in one table relate to rows in another. For a fictional shop, each order can point to the customer who placed it. The drawing describes the structure. Use a database client when you need to browse actual orders.

Start by writing table and field names in DBML, a text format for describing structure. You can also import supported SQL table definitions. You do not need to connect a database for this workflow.

Who can see a diagram before and after you share it?

Current plans make new diagrams private by default. Publishing a public link lets anyone with the link view it. Check the actual sharing setting before sending the link, and use invented table names if the diagram is only a practice example.

A schema can reveal private design details even without customer rows. Use only descriptions approved for upload. If you cannot verify who can see a real diagram, share a cleaned image through an approved location instead.

What can you keep when you leave the diagram tool?

Keep the original DBML text so the design can be edited again. The pricing page lists SQL export and image formats such as PDF and PNG on Free, with up to ten diagrams and doc projects. Check the target database before using the generated SQL.

An image preserves the drawing for reading. SQL represents a proposed database structure. Neither contains the rows from a running database.

How would you show which customer placed an order?

Draw two fictional tables on paper. Do not upload a schema, connect a database or share a link.

  1. Give each table a clear purpose
    Use Customers for people and Orders for purchases. Put a customer ID field on each order.
  2. Draw one relationship
    Connect the customer ID in Orders to the ID in Customers. Sketch two orders pointing to one customer.
  3. Explain what is missing
    Ask whether the sketch shows what the customer bought. It describes where that information would belong, without giving the actual records.