Home > Software > Data-Warehouse > Informatica
Interview Questions   Tutorials   Discussions   Programs   

Informatica - What is a surrogate key? Why we use it in a mapping? Give an example.




447
views
asked marvit September 20, 2014 08:02 AM  

What is a surrogate key? Why we use it in a mapping? Give an example.


           

1 Answers



 
answered By vishnoiprem   0  
A surrogate key in a database is a unique identifier for either an entity in the modeled world or an object in the database. The surrogate key is not derived from application data.
for eg.
Customer purchase the product in Sydney by 1000/- if he again purchase by 2000/- in Delhi not in Sydney then we have to
create another record in that table with same cust_id but here cust_id is having primary key so we are unable to
create a new record for suppose if you update the record you got the wrong information as 1 jones 3000 Delhi so eliminating this we are maintain the another column like
cust_no as surrogate key (unique value)and removes p.k in cust_id.surrogate key is like an index.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert