Natural key
From Free net encyclopedia
Revision as of 07:33, 6 November 2005; view current revision
←Older revision | Newer revision→
←Older revision | Newer revision→
In relational model database design, a natural key is a candidate key that has a logical relationship to the attributes within that row.
The main advantage of a natural key over a surrogate key, which has no such logical relationship, is that it already exists; there is no need to add a new, unnatural column to your schema.
The main disadvantage of choosing a natural key is that it may need to change if your business requirements change. For example, if you have chosen CustomerNumber as the primary key for a customer, and, subsequently, CustomerNumber becomes alphanumeric instead of numeric, then as well as changing the type of the column, you will need to make changes to all other tables where CustomerNumber is used as a foreign key.