Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 14: State Transition Graphs > 14.1 The Temporal Side of Changes - Pg. 259

250 CHAPTER 14: STATE TRANSITION GRAPHS INSERT INTO MyLife (previous_state, current_state, start_date) VALUES (NULLIF (in_change_state, most_recent_state), in_change_state, CASE WHEN in_change_date < = (SELECT MAX(start_date) FROM MyLife) THEN NULL ELSE in_change_date END); This is not easy to read or to get error messages that tell you if the in_ change_date is invalid in that it violates the time sequence. 14.1 The Temporal Side of Changes What is still missing is the temporal aspect of state changes. In this example, the (`Born', `Married') change would have to deal with the minimum age of consent. The (`Married', `Divorced') change often has a legal waiting period. While technically a business rule, you know that no human being has lived over 150 years, so a gap that size is a data error. The terminal and initial states are instantaneous, however. Let's add more