Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

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: <fitzjarrell_at_cox.net>
Date: Tue, 28 Aug 2007 11:40:58 -0700
Message-ID: <1188326458.917562.124140@l22g2000prc.googlegroups.com>


On Aug 28, 1:17 pm, Matthew Williams <matthew.d.willi..._at_gmail.com> wrote:
> 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, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
>
>
>
> > On Aug 28, 10:33 am, Matthew Williams <matthew.d.willi..._at_gmail.com>
> > 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:
>
> >http://tahiti.oracle.com
>
> > 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- Hide quoted text -
>
> - Show quoted text -

'Shaving development time' is one thing, having other people do your work for you under the GUISE of 'shaving development time' is another.

I have no problem assisting you with this task, but I will not write it for you. The online documentation is an excellent source for the information you need. After you get started writing this if you still have problems post again and I will be happy to assist you.

David Fitzjarrell Received on Tue Aug 28 2007 - 13:40:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US