Databases

E-Commerce Cart vs Order Lifecycle Schema

ER Diagrams · made in Skemio

ER diagram illustrating relations between products, carts, cart items, orders, and order items with price snapshot fields.
ER diagram illustrating relations between products, carts, cart items, orders, and order items with price snapshot fields.

What it shows

  • Live carts reference current catalog prices; orders snapshot immutable values.
  • Store historical unit prices and taxes directly on the order item record.
  • Soft-delete cart lines on checkout completion to avoid orphan locks.

The takeaway

Never reference live product pricing from finalized order items. Always snapshot transactional state.

More er diagrams