Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I've actually had the idea (but no motivation in the way of a project) to do this in SPOPS. This would take the form of an extra table:
(There would likely be problems with the width of this primary key but I'd probably restrict the object_id to 150 characters or so.... implementation issue.) After every update that happens to the object, we create a rule that saves the object state to the database with an incremented version number using Storable if you can be Perl-only, XML if you want to be cross-platform. Fetching all versions of an object would be simple, and in the (hopefully unlikely) event of a primary key modification, we can do an update to ensure the information is migrated properly. Having a single table with all versions is attractive as long as you don't need to search on a feature of the versioned content -- for instance, finding all users that at one time had a first name of 'Steve'. It also insulates you from future schema changes, since you don't care about the schema at all. I'd think you could also do this using whatever persistence framework you want with something like Class::Observable or Class::Trigger. Chris In reply to Re: Version Control in Database Applications
by lachoy
|
|