For example, I have a column > shopping_cart.status; and this column status should for each record contain one of three values > “incomplete” “complete” or “shipped”. My question is, should it be my application that makes sure that these are the only values used, or do i need to build this into the domain of this attribute on the database side?
For example, I have a column > shopping_cart.status; and this column status should for
Share
Use enums thats exactly what they are meant for.
see: http://dev.mysql.com/doc/refman/5.0/en/enum.html