In this ER diagram representing an eCommerce platform, users register with unique identifiers, names, and emails, managing multiple addresses. They place orders containing various products using carts associated with their accounts, each order linked to a payment method and amount. Shipping details are recorded for orders, allowing multiple shipments for a single order.

erd-ecommerce-full.png

Edit this diagram in Gleek

E-commerce website diagram code in Gleek

User

    UniqueIdentifier id PK "User's unique identifier"

    string name "User's name"

    string email UK "User's email address"

Order

    UniqueIdentifier orderId PK "Order's unique identifier"

    UniqueIdentifier userId FK "Foreign key to User"

Product

    UniqueIdentifier productId PK "Product's unique identifier"

    string productName "Product's name"

    int quantity "Quantity of the product"

Payment

    UniqueIdentifier paymentId PK "Payment's unique identifier"

    int amount "Payment amount"

    string method "Payment method"

Address

    UniqueIdentifier addressId PK "Address's unique identifier"

    string street "Street address"

    string city "City"

    string state "State"

    string postalCode "Postal Code"

    string country "Country"

Cart

    UniqueIdentifier cartId PK "Cart's unique identifier"

    UniqueIdentifier userId FK "Foreign key to User"

Shipping

    UniqueIdentifier shippingId PK "Shipping's unique identifier"

    UniqueIdentifier orderId FK "Foreign key to Order"

    Address details "Shipping address details"

User{1}-has-{1..n}Address

User{1}-has-{01}Cart

Order{1}-uses-{01}Cart

Order{1}-has-{1..n}Shipping

User {1}-places-{1..n} Order

Order {1}-contains-{1..n} Product

Order {1}-has-{1} Payment

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

Student management system entity-relationship diagram

Online shopping entity-relationship diagram

Banking system entity-relationship diagram

Online doctor appointment system ER diagram

Inventory management system ER diagram

Library management system ER diagram

Travel management system Er diagram

Product management system ER diagram

College management system ER diagram

Simple order process entity-relationship diagram