BA Prince the B.A.

Home / draw.io for Business Analysts

ER Diagram in draw.io With Crow's Foot Notation

ER Diagram in draw.io With Crow's Foot Notation

Watch on YouTube Subscribe

Draw an entity relationship diagram with crow's foot notation for free in draw.io. Learn how to turn on the Entity Relation shapes, add entities with keys and attributes, pick the right crow's foot line, and fix a many-to-many with a junction entity, using an online shop.

Step by step

Data on one page

  1. ER diagrams. An ER diagram shows what data a system keeps and how it connects. Business analysts use it to agree on the data with the team. Here's the one we'll draw for our online shop.
  2. Blank diagram. Start a blank diagram in draw.io.
  3. ER shapes. Click more shapes, tick entity relation, and click apply.

Entities

  1. Entity. An entity is a thing we keep data about. Drag in the entity box and name it with a singular noun. Customer.
  2. Keys. Double click the attributes and type them. The primary key comes first. It's the ID that makes each customer unique.
  3. Entity. Add a second entity for the order.
  4. Keys. An order keeps the customer ID. That's a foreign key. It sits on the many side, and it links each order to one customer.

Crow's foot lines

  1. Crow's foot. Now the relationship. Click customer, hold control and click order, then click the line one mandatory to many optional. One customer places zero or many orders.

Many to many

  1. Many to many. An order has many products, and a product is on many orders. That's many to many. Never draw it straight. First add the product entity. Give the product its key and a few attributes.
  2. Junction entity. Then put a junction entity between them. Order item. One row for each product on an order. It holds both foreign keys, the order ID and the product ID, plus the quantity.
  3. Two one-to-many. Connect order to order item with one mandatory to many mandatory. Every order has at least one line. And connect product to order item with one mandatory to many optional. A product may not be ordered yet.
  4. The finished diagram. Click away to see the finished diagram. The many to many is now two simple one to many lines.

Recap

  1. The rules. So, name entities with singular nouns, put the primary key first, put the foreign key on the many side, and turn every many to many into a junction entity. Subscribe for more draw.io tips for business analysts.

More in draw.io for Business Analysts