Home > database >  The discussion about the order status, single field condition, or multiple field single status?
The discussion about the order status, single field condition, or multiple field single status?

Time:10-19

The order table order status plan:
(1) the order status, payment condition, delivery status [order has expanded, new state, the index set up more troublesome, need to build a composite index]
(2) unified a status value [1-10 said order status, payment, delivery status] [state of fixed value, and then add a new condition, don't feel corresponding order, easy to let other developers confuse]

Everyone is how to operate on a similar system tables (status value more of that kind of table)? Everyone a great god,,


CodePudding user response:

Suggestions separately, more readable,
A composite index is not trouble

CodePudding user response:

Is currently the state of single field as you said on the order of looked very uncomfortable
  • Related