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: how to implement a circular buffer in a table

Re: how to implement a circular buffer in a table

From: Steve Jones <stevej_at_proact.net>
Date: Thu, 16 Aug 2001 09:57:40 +0100
Message-ID: <3b7b8b86_1@nnrp1.news.uk.psi.net>


The relational model as it stands does not support any ordering of records in a table. Thus, the head would not overwrite the tail unless you engineeried it using some kind of counter. This might require a procedure to run on a trigger each time you try to add to the table. This might select a new 'key' number from a sequence, insert the record into the table, compute the value of the oldest record which is allowed in the table and then delete all record with a key less than that value.

Steve

"oofoof" <oofoofoof_at_ureach.com> wrote in message news:894b11eb.0108151314.cb4cb38_at_posting.google.com...
> I'm looking to design a table that has a fixed size.
> When the table reaches this size, new records added
> to the table will replace the oldest records, thus
> creating a circular buffer. How do I implement this
> efficiently?
Received on Thu Aug 16 2001 - 03:57:40 CDT

Original text of this message

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