What is the difference between warehouse key and surrogate key?



What is the difference between warehouse key and surrogate key?..

Answer / jaspreet banga

Surrogate key concept:- Surrogate keys are generated by
system and they identifies unique 'ENTITY'! yes its entity
and not record ,while primary key is used for finding
unique record.

Let me give you a simple classical example for surrogate
key:

On the 1st of January 2002 Employee 'E1' belongs to
Business Unit 'BU1' (that's what would be in your Employee
Dimension). This employee has a turnover allocated to him
on the Business Unit 'BU1' But on the 2nd of June the
Employee 'E1' is muted from Business Unit 'BU1' to Business
Unit 'BU2.' All the new turnover have to belong to the new
Business Unit 'BU2' but the old one should Belong to the
Business Unit 'BU1.'

If you used the natural business key 'E1' for your employee
within your datawarehouse everything would be allocated to
Business Unit 'BU2' even what actualy belongs to 'BU1.'

If you use surrogate keys you could create on the 2nd of
June a new record for the Employee 'E1' in your Employee
Dimension with a new surrogate key.

This way in your fact table you have your old data (before
2nd of June) with the SID of the Employee 'E1' 'BU1.' All
new data (after 2nd of June) would take the SID of the
employee 'E1' 'BU2.'

You could consider Slowly Changing Dimension as an
enlargement of your natural key: natural key of the
Employee was Employee Code 'E1' but for you it becomes
Employee Code Business Unit - 'E1' 'BU1' or 'E1' 'BU2.' But
the difference with the natural key enlargement process is
that you might not have all part of your new key within
your fact table so you might not be able to do the join on
the new enlarge key -> so you need another id.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Informatica Interview Questions

What are the ETL tools available in DWH?

6 Answers   Mphasis,


explan ur project architecture?

0 Answers   TCS,


if i hv 6 table as source table but can i make 12 as a dim table and 6 as fact table belongs to that src table.

0 Answers   iGate,


what is parallel querying and what r hints.

1 Answers  


explain about unit testing? in real time?

0 Answers   L&T,






Differentiate between a repository server and a powerhouse?

0 Answers  


In which transformation you cannot drag ports into it?

0 Answers   Informatica,


in my source i have 100 records, and 3 targets, i want to load 1st record into 1st target,2nd record into 2nd target,3rd record into 3rd target again 4th target into 1st target and vice versa,how to achieve this?

3 Answers   Thomson Reuters,


why we need informatica

2 Answers   HCL,


How can you recognise whether or not the newly added rows in the source r gets insert in the target ?

2 Answers  


What are the out put files that the informatica server creates during the session running?

2 Answers  


What is enterprise data warehousing?

0 Answers  


Categories