What is the difference between warehouse key and surrogate key?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

difference between repository database and repository service?

832


can we override a native sql query within informatica? Where do we do it?

867


What is the benefit of partitioning a session?

881


Quickly characterize reusable change?

905


Difference between Target-based loading and constraint-based loading?

754


How to load the name of the current processing flat file along with the data into the target using informatica mapping?

962


What is sq transformation?

852


Explain the aggregator transformation?

854


Explain the code page compatibility?

836


I need the output file in the below format using Informatica. __0946684800__ 6 1 3 1 5 1 6 1 10 1 6 10 Pos State Time Split AgentID Reason Spaces Code in Code Spare state ______ ___ _____ ______ __________ ______ 1234 14 0 4321 3103 abcd 4321 15 5 123452 3150 Can someone help please?? We need the data in space-delimited, fixed ASCII format .

1697


What is olap (on-line analytical processing?

826


What is the main purpose of Unconnected lookup other than updating slowly changing dimensions? or In which case u use Unconnected lookup?

6878


hi friends ... i have insurance project(informatica),can you please tell me how many table and mappings we need to use?and explain me.. thank you

9450


What is meant by a domain?

845


Mine is Insurance Domain, So interviewer asked about terms like underwriting, disbursement amt, Reinsurance

1792