This is an extremely boring post asking a question. If you want to constrain the values of a particular attribute of an entity in a table, is the best way to relate an entity that lists all the different values of that attribute in a separate table, or to put a check on the attribute as dicussed in chpater 6.
During my group's discussion with Professor Gibson on Tuesday we talked about creating the entity "category" in our project on a newspaper, where the category is the type of story (news, sports, etc.) in the story table. I didn't know about the check command, and am wondering if this is preferred.
We could say "Alter Table Story Add Check (Category In ('News,' 'Editorial', 'Column', 'Feature'));"
Thoughts?
Comments