Interview Questions   Tutorials   Discussions   Programs   

Cognos - Difference between surrogate Key and Primary Key?

asked mar September 29, 2014 01:18 PM  

Difference between surrogate Key and Primary Key?


1 Answers

answered By vishnoiprem   0  

Data warehouses commonly use a surrogate key to uniquely identify an entity. A surrogate is not generated by the user but by the system. A primary difference between a primary key and surrogate key in few databases is that PK uniquely identifies a record while a SK uniquely identifies an entity.

E.g. an employee may be recruited before the year 2000 while another employee with the same name may be recruited after the year 2000. Here, the primary key will uniquely identify the record while the surrogate key will be generated by the system (say a serial number) since the SK is NOT derived from the data.

   add comment

Your answer

Join with account you already have



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!