As some comments already said it, one solution is to use a new primary key
For example (following the example of @onedaywhen), let's say that exists the table Books that store a list of books and we "used" to determine the ISBN as the primary key. However, some authors committed the mistake of typed a wrong ISBN so, they asked for change the ISBN, it involved the next tasks:
- create a new registry in the table Books
- point all references from the old ISBN to the new ISBN. (*)
- And finally, delete the old registry from the table Books.
(*) this could be trivial to find all the references for a database model that uses Foreign Keys but some models lacks of it.
Table Books
ISBN is the primary key
NAME is a simple field.
etc.
We change it as
Table Books
InternalBookId as the primary key
ISBN as a simple field or an indexed field.
NAME is a simple field.
etc.
Where the new InternalBookId could even been a autonumeric value.
The cons about it:
it adds a new field that uses more space / resource.
it could requires to rewrite the entire model.
the new model could be less self explained.
The pro
- Allows to mutate the "primary key".
- Allows to even drop or refactoring the "primary key", for example, to change Books to ISBN-13 is so simple as to drop the older column and to create a new one
New table:
Table Books
InternalBookId as the primary key
ISBN13 is a new field.
NAME is a simple field.
etc.