With that approach you lose the ability to have multiple branches though, as you will only have one active version.

Unless you store fulltext for BOTH the original and current version, with all intermediate versions being diffs up from the original. With a previous_version column you can have multiple branches (for example in case of simultaneous updates). To get an intermediate version, you start with the diff for that version, get all diffs from all previous_versions and then the base fulltext, and apply the diffs in order to the base fulltext.

The latest version has a diff, a previous_version AND fulltext of the post. When there is an update, the fulltext is stripped off. The new (current) version can be diffed against that fulltext first, list the formerly current version as previous_version and store its own fulltext.


In reply to Re^2: Revision control in relational databases by ryantate
in thread Revision control in relational databases by Your Mother

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.