Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

RE: Expand / Collapse
Author
Message
Posted Friday, March 24, 2006 6:19 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, October 11, 2006 2:29 AM
Points: 38, Visits: 1

For the biggest part I tend to agree with your statement.

I think it is a good practice to separate the enumerations within an application as opposed to throwing them on a big pile. However the article only mentions one possible solution. One of the problems with this approach arise when the descriptive values of these enumerations are used in the GUI, reporting, etc; it is very language-dependant, thus severely crippling any potential of global use.

Another situation is when the enumeration is a “behavioural” one; a finite state machine e.g. the acceptance to a meeting in outlook, defined as “Accept”, “Tentative” and “Decline”. It is very unlikely that we need to change this enumeration on the fly without the need to change any business rules / workflows depending on it. In such cases I prefer to a custom data type constrained to the proper values. The loss of meaning can be compensated by using textual representations instead of integer values. The gain implies less joins, less tables, less complex diagrams, etc.

Kind regards

   Cornelius van Berkel

Post #268212
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse