e-shop implementation: Status for Orders?

Posted by Guillermo on Stack Overflow See other posts from Stack Overflow or by Guillermo
Published on 2009-07-15T12:03:13Z Indexed on 2010/04/02 14:13 UTC
Read the original article Hit count: 409

Hello Again my fellow programmers out there,

I'm designing and programming from scratch a online shop. It has a Module to manage "Orders" that are recieved via the frontend.

I'm needing to have a status to know whats happening with an order in s certain moment, let's say the statuses are:

  • Pending Payment
  • Confirmed - Awaiting shipment
  • Shipped
  • Cancelled

My question is a simple one, but is very important to decide on the store design, and is: What would you do so store this status: Would you create a column for it in the Orders table or would you just "calculate" the status of each order depending if payments has been recieved or shipments has been made for every order? (except I suppose for a is_cancelled column)

What would be the best approach to model this kind of problem?

PD: I even wish in the future to have these statuses configurable buy other clientes using the same software..

© Stack Overflow or respective owner

Related posts about database-design

Related posts about data-modeling