DEV Community

Discussion on: How Do You Design a Shopping Cart Database for E-Commerce?

danjessen profile image
Dan Jessen 🍉 • Edited

This is nice and all, but flawed. Order info (order_details, order_items, order user information) all needs to be immutable.

Everytime a user or a product changes data .. all your old orders become invalid. Since they no longer show the correct info for who or what was purchased at the given time. And that can cause issues.

Imagine changing price of a product and someone comes in for returns. Or a customer claiming they never got their goods.

gibbiv profile image
Robert Gibb

Thanks for your feedback, Dan. We will direct this point in an edit.