Home » RDBMS Server » Server Utilities » Querry.
Querry. [message #73929] Wed, 04 August 2004 03:39 Go to next message
bipin
Messages: 6
Registered: December 2001
Junior Member
I would like to Know what a "surrogate key functionality" in oracle means.please provide the related information also on this.
Re: Querry. [message #73938 is a reply to message #73929] Thu, 05 August 2004 06:35 Go to previous message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
This is nothing but a method of Simplyfying Unique/Primary Keys.
Generally the best choice for the unique identifier is an attribute which is inherent to the entity and therefore unique, minimal, not null, and stable.For example, fingerprints, retinal patterns etc.

A surrogate key is a sequence identifier assigned by the business. For e.g. employee, a sequence identifier called employee identifier would be assigned to an employee after checking the last name, first name, date of birth, and social security number data elements. The surrogate key will always be known when the entity is created, the key is unique, it is minimal, it is never null, and it is the most stable since it is controlled within the confines of the domain of interest and the business.

If not this sequence no then you would have tried to make combination of Emp Last Name,First Name Address etc. as a Compsite Primary key which cannot ensure that it will be Unique & not null.
Even if it is unique then also you need create Lond queries while joining with Other tables & will need to store the complete composite Key in all the Referenced tables.

HTH
Regards
Himanshu
Previous Topic: Import data only
Next Topic: bulk insert in dynamic sql
Goto Forum:
  


Current Time: Wed Dec 25 07:30:54 CST 2024