When might I want to use a surrogate key?

A. A surrogate key is a key that has no meaning other then uniquely identifying a row in the table -it contains no meaningful business information.

Reasons you might use one :-

1. There is no "good" primary key.
2. The obvious primary keys are awkward to use.
3. The obvious primary key is used in foreign key relationships and will require updating 


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish