Is using one database column for each attribute in an ER-model considered best practice?
I do maintenance on legacy code, and I see a lot of multiple attributes, as well as business logic squeezed into single database columns, and I wonder if there is ever any good reason for doing so.
Example is using prefixes for integer values, say a customer ID where the first two digits represent the customer state, and the following digits, the actual id of the customer. Thus storing two attributes in one field. Another example is using negative customer ID:s for customers that have ended their business, thus storing also information on whether the customer is active or not. Etc etc.