This ER diagram represents a store sales system. One customer picks zero or many products and makes zero or many purchases. The store can have zero or many products. The store could sell from zero to many products. Additionally, one merchant could make none to many sales.

Store sales system

Order system diagram code in Gleek

Customer
int phoneNumber
int customerNumber
string Name
string Address
Product
int Price
int Type
string Manufacturer
Store
string Name
string Address
Merchant
string Name
string Address
int staffNumber
Sales
string Product
int priceTotal

Customer {1}–{0..n} Product
Customer {1}–{0..n} Sales
Product {0..n}–{1} Store
Product {0..n}–{0..n} Sales
Store {0..n}–{0..n} Sales
Merchant {1}–{0..n} Sales

About ER diagrams

We often make an entity-relationship (ER) diagram, ERD, or entity-relationship model, in the early stages of designing a database. An ERD is perfect for quickly sketching out the elements needed in the system. The ERD explains how the elements interact. ER diagrams can be shared with colleagues. Their simplicity makes them ideal even for non-technical stakeholders.

Similar ER diagram examples

Online store entity-relationship diagram

Hospital management system entity-relationship diagram

Simple order process entity-relationship diagram