Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Sequences
"Jawahar Rajan" <jrajan_at_nc.rr.com> wrote in message news:<xrgOb.238915$Vu5.17444252_at_twister.southeast.rr.com>...
> Daniel
>
> Thanks for your suggestion. Usually a skip of numbers happen if there is a
> rollback. we validate all our data before commiting and then we use a
> trigger to get the next sequenxt into the table fires before insert.
> I could keep track of skipped sequences if needed.
> The reson I use a sequence as a Key is because the other values that I have
> for example SiteID and PatientNum are unique but sometimes they are entered
> incorrecly by a person using an web iterface and the we need to go and
> change the value. if the SiteID or PatientNum are primary keys that are
> references in other child tables then it s a royal pain in the ***** to
> change the vlaue. By using A sequence as the Primary key I can then make
> corrections other table values ablit still painfull but easier than changing
> a primary key
>
> Thanks again all
>
> Jawahar
>
The above sounds like good practice, but it doesn't match what you
said earlier:
> > >>>On Fri, 16 Jan 2004, jrajan_at_nc.rr.com wrote:
> > >>>
> > >>>
> > >>>>Due to the nature of our work skipping sequences is not a good
> > >>>>practice.
The sequence is an arbitrary number as far as your application is conserned. So missing a few in the sequence shouldn't be a problem.
Have a good day.
Ed
Received on Thu Jan 22 2004 - 12:17:11 CST
![]() |
![]() |