in reply to Revision control in relational databases

Hi.

One approach is to store a VERSION column for each piece of content which you store in the database, and just store the whole lot each time. So rather than taking a diff, you just store everything. Don't over-engineer if your problem is very simple.

That said, this isn't very scalable. Obviously, storing the first revision once, then just subsequently storing context diffs against version 1 is much cheaper in terms of storage. Have a look at Text::Diff on CPAN for a simple interface to Algorithm::Diff for strings (text).

Cheers,

-- Dave :-)


$q=[split+qr,,,q,~swmi,.$,],+s.$.Em~w^,,.,s,.,$&&$$q[pos],eg,print
  • Comment on Re: Revision control in relational databases