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 -> Tables and ring-like data structure?

Tables and ring-like data structure?

From: Ramon F Herrera <ramon_at_conexus.net>
Date: 13 Aug 2003 23:38:43 -0700
Message-ID: <c9bc36ff.0308132238.3fbd483e@posting.google.com>


I just started to design a payroll application for several different companies, some of them pay weekly, others byweekly or monthly. We have to keep the payment info for every pay period. A simple example:

  John Smith    1234.45  1/1/2003
                1188.92  1/15/2003
                1252.21  2/1/2003
                [...]
                1234.45  12/31/2003

In cases like this I find the relational paradigm too restrictive. Being a C programmer I keep on thinking on a ring-buffer like in which I dont have to move all those values from a field to the next every payday. Obviuosly I can only keep, say 52 pay periods, I could have a 52 element ring and everytime I get new data it overwrites the oldest pay period and some pointer gets to the next element (as opposed to rewriting all those current_date - 1 => current_date - 2, etc).

I recently found out about the new object features of Oracle (I knew about them, but I hadn't seen actual code) which made me think that once the "relational" constraints have been shattered, perhaps I could somehow get out of that straight jacket (sorry, relational purists, I need the performance). Perhaps I need to have an array inside the tables and somehow keep the index modulo 52?

Thanks for your experienced insight in this area...

Regards,

-Ramon F. Herrera Received on Thu Aug 14 2003 - 01:38:43 CDT

Original text of this message

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