Dear Monks,

I hope I am not abusing this forum too much as my problem is not strictly a Perl-problem but I hope on some feedback anyway.

We are currently designing a system where we will persist Moose-based object in an Oracle-database (probably using DBIx::Class), but we do not only want to store the current state of the objects but also keep a history of their previous states.

The question now is how to do this.

One of the approaches to such problems I have seen consists in adding some "version"-column to all the tables holding versionized data that gets incremented with every new version, the current version then being the one with the highest version-value. Current data can then be made available via a view that suppresses all the historic rows.

Is that the way to do it or are there better ways?

Assuming this is the way to go, I can see several options of implementing it, e.g.

- implement it yourself in Perl

- do with triggers in PL/SQL

- use Oracle Workspace Manager

What would be the different pros and cons?

I would like to avoid being locked into Oracle technology, but as I do not realistically expect this application ever to be migrated to something else I could accept a lock-in to proprietary technology if it makes my live easier...

In particular I have never used the Workspace Manager, but it could be exactly what we need - is there anyone that could share his experiences?

Many thanks!


In reply to database historisation by morgon

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.