December 2010
Intermediate to advanced
363 pages
12h 21m
English
The concept of versioning is familiar enough in the filesystem, where many Version Control Systems exist to preserve consecutive copies of files. The concept is less familiar, however, when applied to database tables (even though those tables do technically reside in files).
Such a system can add measurably to your ability to prevent data loss, however. It has the additional advantage of permitting a rollback to any previous version, as well as allowing users with appropriate privileges to view all versions of a given record. (Normally, only the most recently updated version of a record is the one that will be selected.)
We will use a shadow table, similar to the one we proposed for deleted records in the previous section, to hold ...