SCD type 2 - Valid To Date Value? 12/31/9999 or Null?
2 posters
Page 1 of 1
SCD type 2 - Valid To Date Value? 12/31/9999 or Null?
Hello all,
While populating Effective End Date (Valid to date) for current record, is it better to put a largest possible end date value of 12/31/9999, or is it better to insert a null value. One advantage of inserting 12/31/9999 as end date is that oracle 'between' function can be used effectively while doing a search on date range.
I just want to find out if there are any drawbacks of inserting 12/31/9999 as end date value. I would also like to know if there are any advantages of populating null value? I did search on the forum for an answer but I couldn't find one.
Appreciate your response.
While populating Effective End Date (Valid to date) for current record, is it better to put a largest possible end date value of 12/31/9999, or is it better to insert a null value. One advantage of inserting 12/31/9999 as end date is that oracle 'between' function can be used effectively while doing a search on date range.
I just want to find out if there are any drawbacks of inserting 12/31/9999 as end date value. I would also like to know if there are any advantages of populating null value? I did search on the forum for an answer but I couldn't find one.
Appreciate your response.
kinu008- Posts : 2
Join date : 2010-04-28
Re: SCD type 2 - Valid To Date Value? 12/31/9999 or Null?
Common practice is to use some known future date as the expiration date for a current record. So, if your database accepts 12/31/9999, then use that (or 12/31/2999 if 9999 is too large). Always use the same date throughout to make it easy to find the current row.
Do not use a null. It only complicates things when you try to find a row using a BETWEEN expression. Also, databases usually do not include null values in their indexes, making it more difficult (slower) to locate them.
Do not use a null. It only complicates things when you try to find a row using a BETWEEN expression. Also, databases usually do not include null values in their indexes, making it more difficult (slower) to locate them.
kinu008- Posts : 2
Join date : 2010-04-28
Similar topics
» Best way to implement date ranges in schemas (fact 1 valid "from" date1 "to" date 2)
» scd2 effective date, end date data type
» Type-2 Dates as Date Data Type ?
» How to handle date field with a null value in the fact table ?
» Initial date of effective date column for SCD 2 implementation
» scd2 effective date, end date data type
» Type-2 Dates as Date Data Type ?
» How to handle date field with a null value in the fact table ?
» Initial date of effective date column for SCD 2 implementation
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum