Monday, October 8, 2007

When do you use SNAPSHOT?

Business requirements:

The Manager must view the current state of the data in SaleProduct database at the end of business day. He must be able to view the data state of any day within last 5 days. A single field in the database will not be updated more than once per day. However, it might be updated on any day. The Manager can rollback the changes if necessary.

Solution:

Create 1 scheduled job: occurs at end of each day: create a snapshot
Another scheduled job to remove snapsots that are more than 6 days old.