Hello,
How do we model these objects ?
Scenario 1: Price changes in a time period
EffectiveDate ExpiryDate Price
2009-01-01 2009-01-31 800$
2009-02-01 Null 900$
So, if the price changes to 910$ on 2009-02-15, then the system should automatically update the expiry date on the previous effective price to 2009-02-14, to keep it consistent.
Scenario 2: No price specified between 2009-02-01 to 2009-02-28
EffectiveDate ExpiryDate Price
2009-01-01 2009-01-31 800$
2009-03-01 Null 900$
So, if new price is specified for 2009-02-15 onwards , then the system should automatically set the expiry date on the record to be inserted to 2009-02-28, because already a record effective from 2009-03-01 exists.
Please suggest an effective way to handle these scenarios to model my framework, or are there any frameworks around that can do this .
Thanks