Database Reference
In-Depth Information
F IGURE 8.7
A two-table solution for storing product attributes
Remember that everything comes with a cost; in this case, gaining flex-
ibility causes us to lose the structure offered by specifying the attributes in
columns. This could make it harder to compare two similar products. Each
situation is different, and there is no right or wrong answer here. You must
do what makes sense in your situation.
Incorrect Data Types
Choosing incorrect data types, either because you are being lazy or be-
cause of bad requirements gathering, can be a serious problem when it
comes time to implement. The most common thing we have run into is
creating entities that have a ton of varchar columns and nothing else. The
varchar columns can store everything from strings to numbers to dates and
are often also the PK or an FK.
Why is this bad? Shall we list the reasons?
 
Search WWH ::




Custom Search