Ok, my situation. I have a record that has a name, type, and third description field. Now, normally name and type will uniquely identify a record. So basically, for each name, I can have a "type a", "type b", "type c", "type d" record. But on "type b" records, the description field comes into play. The third field is a sub-type and is one of a few choices.
Normally I would just expand the key from name and type to name, type, and description. But the description only applies to the "type b" records, so it would be null otherwise, and thus that will prevent me from making the description field part of my primary key.
Aside from the 3 important fields, there are about 15 others that hold the exact same data for all records. Does anyone have some ideas on what would be an appropriate way to handle this from a database design perspective?
One way would be to set the description to something like "NO_DESC" for all except the "type b" records, but I'm not too keen on doing that...
Normally I would just expand the key from name and type to name, type, and description. But the description only applies to the "type b" records, so it would be null otherwise, and thus that will prevent me from making the description field part of my primary key.
Aside from the 3 important fields, there are about 15 others that hold the exact same data for all records. Does anyone have some ideas on what would be an appropriate way to handle this from a database design perspective?
One way would be to set the description to something like "NO_DESC" for all except the "type b" records, but I'm not too keen on doing that...