All templates
Software architectureER diagramdatabase designcrow's foot

ER diagram: e-commerce data model

Entity-relationship diagram for an e-commerce platform with crow's foot notation, primary/foreign keys, and join tables.

The prompt

ER diagram for an e-commerce platform using crow's foot notation. Entities and key attributes: Customer (id PK, email unique, name, created_at), Order (id PK, customer_id FK, total_cents, status, placed_at), OrderItem (id PK, order_id FK, product_id FK, quantity, unit_price_cents, with composite unique on order_id+product_id), Product (id PK, category_id FK, name, sku unique, price_cents), Category (id PK, name), ShippingAddress (id PK, customer_id FK, street, city, state, postcode, country). Relationships: Customer has many Orders and many ShippingAddresses. Order has many OrderItems. OrderItem references Product. Product belongs to Category. Show typical indexes on Order.customer_id, Order.placed_at, and Product.category_id.

What it generates

An ER diagram with all entities, attributes, primary and foreign keys, cardinalities, and unique constraints.

When to use it

For documenting a relational data model — onboarding new engineers, planning a schema change, or producing audit-friendly database documentation.

Generate this diagram in seconds

Copy the prompt above, sign in for free, and paste it into the generator.

Related software architecture templates