Free Trial

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

Share this Page URL
Help

14.1 The Temporal Side of Changes > 14.1 The Temporal Side of Changes - Pg. 260

1 4 . 1 T h e Te m p o r a l S i d e o f C h a n g e s 251 before getting a divorce, and that you have to be divorced 2 months before you can remarry. Of course, you can die instantly. INSERT INTO StateChanges VALUES ('Born', 'Born', 'I', 0), -- initial state ('Born', 'Married', 'M', 216), ('Born', 'Dead', 'M', 0), ('Married', 'Divorced', 'M', 3), ('Married', 'Dead', 'M', 0), ('Divorced', 'Married', 'M', 2), ('Divorced', 'Dead', 'M', 0), ('Dead', 'Dead', 'T', 0); -- terminal state The first question is where to check for temporal violations--during insertion or with validation procedures? My answer is both. Whenever possible, do not knowingly put bad data into a schema; this should be done in the ChangeState() procedure. But someone or something will subvert the schema and you have to be able to find and repair the