Seeking new owner for this high-traffic DBAzine.com site.
Tap into the potential of this DBA community to expand your business! Interested? Contact us today. |
|
Transaction Management
Reduce downtime and increase repeat sales by improving end-user experience. Free White Paper
Database Recovery
Feeling the increased demands on data protection and storage requirements? Download Free Report! |
>> State transition in this case could be represented as a hierarchy and the checking of the constraint could be done against that hierarchy, of course in another table. <<
This is not a hierarchy! The diagram did not get printed with the article, but draw it by hand. The fact that transitions can have cycles means that they cannot be modeld as a hierarchy.
>> I would manage this situation as they do with data warehouses to maintain the history using slowly changing dimensions or treating the status changes as a fact. <<
A data warehouse stores **history**, I would model it with (start_time, end_time, status) triples and assume that the history is valid (i.e. grape juce did not turn into pudding or spoilage) because it came from OLTP databases with good transition constraints.
Transition constraints look at the presetn and the allowed future, the incompleted process of change, and steer it in the allowed directions.