Ecommerce / Free editable template

ER diagram for an online shopping system template

An entity relationship diagram shows the tables a system stores and how they link, which makes it the natural starting point for an ecommerce database. This example models an online shop with nine entities, from customer and order to product variant, payment and shipment, each with its primary and foreign keys and its one-to-many relationships marked.

No account needed · Opens as your own editable page

Preview the er diagram for an online shopping system

View full-size preview ↗
ER diagram for an online shopping system example showing nine entities with key fields, primary and foreign keys, one-to-many relationships labelled
Everything in this example is editable. Replace the labels, move the shapes and adapt the layout to your work.

How to use this template

  1. Start from the order

    Most questions an online shop asks lead back to the order, so place it centrally and connect customers, items, payments and shipments to it. This shows which records must exist before anyone can place an order.

  2. Decide where data lives

    Keep stock on the variant rather than the product, because each size and colour sells separately. Copy the price onto every order item so past orders keep the price the customer actually paid.

  3. Add the entities you need

    Extend the model with tables such as discounts, reviews, returns or wishlists. Draw each new link with its cardinality before writing a migration, so the team agrees on the rules first.

Questions about this template

Can I add a reviews or discounts table?

Yes. Copy an entity box, list its key fields with primary and foreign keys, and connect it with a labelled one-to-many line, for example product to review.

Do I need an account to use it?

No. Open the template and edit it in your browser. Your work saves on this device. An account is optional if you want to sync your workspace.

Can I export the finished diagram?

Yes. Use Export in the editor to save a PNG, SVG or PDF, or download an editable .epicdraw backup.