Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: Automatic versioning of records to maintain a history

Re: Automatic versioning of records to maintain a history

From: Matthew Williams <>
Date: Tue, 28 Aug 2007 18:17:59 -0000
Message-ID: <>

Thanks for the help. If I could write this as a Rails app I most certainly would (with Oracle on the back end) but with the environment I'm in right now I'm restricted to the Oracle development tools.

I'm certainly capable of making the other table and writing the triggers, but if I can shave development time from this task I would prefer to do so.

I'll give that site you gave me a look, I still might be able to find a thing or two to help with this task.

Take care
-Matthew Williams

On Aug 28, 2:04 pm, "" <> wrote:
> On Aug 28, 10:33 am, Matthew Williams <>
> wrote:
> > I'm working with Oracle 10g and need an instance where whenever a
> > record is modified I can automatically store a copy of that record and
> > assign it a version number. So at any given time I can see a history
> > for that given record in the table.
> > I'm new to Oracle and I would like to avoid writing as much SQL as
> > possible if there is some built in functionality of trigger to do
> > this.
> > The front end of the tool is Oracle Forms.... If this were a Ruby on
> > Rails app I could simply use acts_as_versioned on my model and wham,
> > I'm all set!
> > Thanks!
> Then write a Ruby on Rails app so, wham, you're all set. Otherwise
> resign yourself to the 'tedium' of learning how to write triggers to
> populate history tables. It isn't rocket science. A copy of your
> source table, with some 'bookkeeping' columns added (such as proc_dt,
> vers_no, user_id, action) is the starting point; a before insert or
> update or delete trigger is the next step. I would visit:
> and search the relevant documentation for triggers and learn how such
> things are written. Should you have trouble you can post the code
> you've written and we can assist in fixing the errant sections.
> David Fitzjarrell
Received on Tue Aug 28 2007 - 13:17:59 CDT

Original text of this message