CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
πŸŒ™β˜€οΈ
Log inStart free
Home/Templates/Student Projects (College Reports)

πŸŽ“ Student Projects (College Reports) Β· Database ERD

Online Shopping System ER Diagram

The core e-commerce schema: customers, addresses, products, categories, carts, orders, order items, payments and reviews.

More Student Projects (College Reports) templates

Drawing diagram…

What this diagram shows

  • Order items hold the price at the time of purchase
  • Customer addresses kept separately
  • Reviews linked to both customer and product

Prompt used

ER diagram for an online shopping system: Customer with Addresses; Category and Product (sold by a Seller, with price and stock); Cart and CartItem; Order (placed by a customer to an address) with OrderItems storing quantity and unit price; Payment for an order; Review of a product by a customer.

Mermaid code
erDiagram
  CUSTOMER ||--o{ ADDRESS : has
  CUSTOMER ||--|| CART : owns
  CART ||--o{ CART_ITEM : contains
  PRODUCT ||--o{ CART_ITEM : "added as"
  CATEGORY ||--o{ PRODUCT : groups
  SELLER ||--o{ PRODUCT : sells
  CUSTOMER ||--o{ ORDERS : places
  ADDRESS ||--o{ ORDERS : "delivered to"
  ORDERS ||--|{ ORDER_ITEM : contains
  PRODUCT ||--o{ ORDER_ITEM : "ordered as"
  ORDERS ||--o| PAYMENT : "paid by"
  CUSTOMER ||--o{ REVIEW : writes
  PRODUCT ||--o{ REVIEW : receives
  CUSTOMER {
    int customer_id PK
    string name
    string email
  }
  ADDRESS {
    int address_id PK
    int customer_id FK
    string city
    string pincode
  }
  SELLER {
    int seller_id PK
    string name
    string gstin
  }
  CATEGORY {
    int category_id PK
    string name
  }
  PRODUCT {
    int product_id PK
    int category_id FK
    int seller_id FK
    string name
    decimal price
    int stock
  }
  CART {
    int cart_id PK
    int customer_id FK
  }
  CART_ITEM {
    int cart_id FK
    int product_id FK
    int quantity
  }
  ORDERS {
    int order_id PK
    int customer_id FK
    int address_id FK
    date ordered_on
    string status
  }
  ORDER_ITEM {
    int order_id FK
    int product_id FK
    int quantity
    decimal unit_price
  }
  PAYMENT {
    int payment_id PK
    int order_id FK
    decimal amount
    string method
  }
  REVIEW {
    int review_id PK
    int customer_id FK
    int product_id FK
    int rating
  }

Related templates

Use CaseStudent Projects (College Reports)

Library Management System Use Case Diagram

Who uses a college library system and what each of them can do: members, the librarian and the system administrator.

Database ERDStudent Projects (College Reports)

Library Management System ER Diagram

The database of a library system: books and their copies, authors, members, loans, reservations and fines, with keys and cardinality.

Data FlowStudent Projects (College Reports)

Library Management System Data Flow Diagram (Level 1)

How data moves through a library system: members and the librarian, the main processes, and the data stores they read and write.

Class UMLStudent Projects (College Reports)

Library Management System Class Diagram

The main classes of a library system with attributes, methods and UML relationships.

SequenceStudent Projects (College Reports)

Library Management System Sequence Diagram (Issue a Book)

The steps when a member borrows a book: checks, loan record and the copy status update.

Use CaseStudent Projects (College Reports)

Online Examination System Use Case Diagram

What students, examiners and the administrator do in an online examination system.