Each record (row) must be uniquely identified within the table.
Primary keys cannot be modified or updated throughout the life of the database. If the primary key must be updated because it was not selected properly, the entire row must be deleted and recreated. If the record has dependent records or children in other tables, which have children in other tables, deleting the record is an affair by itself. So encoding meanings in the value of the primary key is a dangerous practice that must be discontinued. For example the following candidate for identifying a citizen is not valid: the first three characters encode the city of residence, the next three digits encode the religion and the last seven digits are the unique home telephone number. All pieces of this candidate key are subject to change.
No comments:
Post a Comment