Greetings monks. I'm in the early planning stages for a database application that will be written in Perl. One requirement that I know will be present is version control. Users will need to ability to do exclusive checkouts and checkins, as well as examine past versions of objects and revert the object to a past state. The objects are complicated enough that they will require several tables to store. Users will be doing the normal list, edit, view, save stuff with them aside from the versioning actions.

When I first encountered the problem my mind jumped to CVS. I'll just hack up a database-to-CVS bridge and handle it that way, thought I. But as I think about it further, I'm not sure that's a good idea. There's a large impedance mismatch between records in a database and files in CVS.

An alternative might be to have a version column in every table. The problem with this is that the primary key for each column is now (foo_id, version) rather than just (foo_id). I fear this will complicate the rest of the application enormously. Join tables in particular would become much less useful. It's so much nicer if a single integer is enough to identify a record.

Any bright ideas floating around in the monestary? Feel free to meditate on this one for a while - the application is at least a couple months away from implementation.

-sam


In reply to Version Control in Database Applications by samtregar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.