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

permutations of mapplet

0 Answers   TCS,


How can you use an Oracle sequences in Informatica? You have an Informatica sequence generator transformation also. Which one is better to use?

1 Answers  


I have the source like col1 col2 a l b p a m a n b q x y How to get the target data like below col1 col2 a l,m,n b p,q x y

2 Answers   DELL,


Issue with Update override at Target table in Informatica.

2 Answers  


a flat file having 1 laks records. if i want convert excel file what happen. (bcz a exccel sheet having 65536 colums but flat files one lak columns). how to get one laks colums in excel sheet .

2 Answers   TCS,






What is lookup transformation?

0 Answers  


Hi frndz, "while i am going to run the infotmatica power designer,he ask the id and password ",then i enterd the id and passwd , at that time i got the error as " failed to connect repository " ?

3 Answers  


Explain direct and indirect flat file loading (source file type) - informatica

0 Answers   Informatica,


when we dont use aggregator in mapping ?

2 Answers   CSC,


Please let me know how to make encryption and decryption with example?

0 Answers  


whether Sequence generater T/r uses Caches? then what type of Cache it is

7 Answers   Accenture,


What is native users?

0 Answers  


Categories