Optimal SCD type 2 design
Page 1 of 1 • Share •
Optimal SCD type 2 design
I am wondering if there are advantages or an optimal way to design dimension? Specifically, is a single "effective_date" attribute ok? Or do you recommend a start_date and end_date? Is it necessary to have a "current_flag" indicator or can you just use the max(effective_date) to get that?
Take customer for example,
customer_id <-- surrogate key
custno <-- natural key
effective_date
cust_email
Take customer for example,
customer_id <-- surrogate key
custno <-- natural key
effective_date
cust_email
kjfischer- Posts: 21
Join date: 2011-05-04
Re: Optimal SCD type 2 design
At a minimum you should have "begin effective date" and "end effective date" fields for each row. Designate a special far-future value such as 2999-12-31 to place in the "end effective date" field for current records. Any BETWEEN queries you do to pull records as-of a particular point in time will work OK, and you could use WHERE End_Effective_Date = #2999-12-31# to select current rows.
That said, many modelers also implement an "is current" indicator flag to faciliate identification of current rows.
That said, many modelers also implement an "is current" indicator flag to faciliate identification of current rows.
VHF- Posts: 220
Join date: 2009-04-28
Location: Wisconsin, US
Similar topics» Yes/No type questions asked in Symnatech
» House Design 001
» Does logo design cost really matter
» Design a Logo That Best Suits Your Business
» The advantage of a simple logo design process
» House Design 001
» Does logo design cost really matter
» Design a Logo That Best Suits Your Business
» The advantage of a simple logo design process
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum