Hi all

I am trying to figure out if this is possible, and if so, the best strategy to try to accomplish it

The scenario is as follows... I have a database controlled by an API and I have a complex system that runs pipelines (where a pipeline is a module defining how different scripts run in a given order, some in parallel, some sequentially, etc...) and these scripts writes in the database.

Something like:

Script1 / \ Controller/ \ Script --> Script2 --> API ==> DBI => DB \ / \ Script3 /

What I would like to do is to record (for example in a new table of the final database) all the changes in this database with information about the change itself, the component of the pipeline that made it (every script has an ID) and the time of the change.

The idea is to provide the system with "undo" operations or restore the DB to a given point in the pipeline.

Probably the best place to try to add this is at the API level. Everytime a change in the database is requested, try to grab the required information and update the "log" table. I don't know if mysql or the DBI module can be used to accomplish this at the DBI level.

Anyway... Any thoughts on this would be welcome

Thanks in advance,

citromatik


In reply to Log changes in a database (DBI) by citromatik

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.