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
I have a flat file, want to reverse the contents of the flat file
Differentiate between source qualifier and filter transformation?
Enlist some properties of sessions.
What is transformation?
rank() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid order by case when opt2.dm_market_flg in ('Y', 'U') then 1 else 2 end, lkp.contact_rank) as rank1, case opt2.contact_type when 'Buyer' then row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc, ship_to_flg desc , last_order_dt desc) when 'Decision Maker' then row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc , last_quote_dt desc , mailability_score desc , source_ranking desc) when 'Influencer' then row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc, mailability_score desc, source_ranking desc) when 'Payer' then row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc, mailability_score desc, source_ranking desc) --elu 05/28/2013 else row_number() over (partition by opt2.dim_plat_site_id, opt2.dim_site_opt_sid, lkp.contact_rank order by has_name_flg desc, mailability_score desc, source_ranking desc) end rank2 row_number() over (partition by opt3.dim_plat_site_id, opt3.dim_site_opt_sid order by rank1,rank2) as "rank", case when "rank"<= opt3.maximum_value then 'Y' else 'N' end as include_flg
Explain the shared cache and re-cache?
how to construct simple biogas digerter? please show me detail drawing and specification of simple biogas construction?
What is the difference between stop and abort in informatica
What is depict expression change?
What is workflow? What are the components of workflow manager?
what is unit testing?tell me proceedure
Explain what are the different versions of informatica?
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
Is it possible to create multiple domains on a single Informatica server?
What is joiner change?