Re: HELP: How to generate sequential Primary Keys on a master-detail form?
From: Frank <fbortel_at_home.nl>
Date: Sun, 07 Apr 2002 18:12:22 +0200
Message-ID: <3CB06FE6.9020405_at_home.nl>
>
> until you rollback -- then you have a gap. If you use sequences, you will have
> a gap -- 100% probability.
>
> I agree with the "rubbish" part however -- the rubbish part is the supposed
> technical need for gap free sequential numbers which seems to be a hold over
> from the days when you had a 100% paper based system and a person physically
> assigned document numbers or such one a time. gap free sequential numbers just
> *don't scale* -- the imply and enforce serialization.
>
>
>
>
>
> --
> Thomas Kyte (tkyte_at_us.oracle.com) http://asktom.oracle.com/
> Expert one on one Oracle, programming techniques and solutions for Oracle.
> http://www.amazon.com/exec/obidos/ASIN/1861004826/
> Opinions are mine and do not necessarily reflect those of Oracle Corp
>
>
Date: Sun, 07 Apr 2002 18:12:22 +0200
Message-ID: <3CB06FE6.9020405_at_home.nl>
Thomas Kyte wrote:
> In article <6asrau4lfelqqtptocr3h3hqbt1ccdncth_at_4ax.com>, Sybrand says...
>
>>On Mon, 01 Apr 2002 16:09:51 GMT, IF <tlfbi98_at_terra.es> wrote: >> >> >>>We have a master-detail form and we need to generate sequential >>>primary keys values for the records of the master block just before >>>inserting them into the database. >>> >>>We cannot use Oracle Sequences because we cannot lose any value in the >>>sequence. Therefore, in order to generate the sequential values for >>>the primary key, we have to use a value stored in another table. >>> >>rubbish. Create sequence ... nocache ordered. >> >>
>
> until you rollback -- then you have a gap. If you use sequences, you will have
> a gap -- 100% probability.
>
> I agree with the "rubbish" part however -- the rubbish part is the supposed
> technical need for gap free sequential numbers which seems to be a hold over
> from the days when you had a 100% paper based system and a person physically
> assigned document numbers or such one a time. gap free sequential numbers just
> *don't scale* -- the imply and enforce serialization.
>
>
>
>
>>Regards >> >> >>Sybrand Bakker, Senior Oracle DBA >> >>To reply remove -verwijderdit from my e-mail address >>
>
> --
> Thomas Kyte (tkyte_at_us.oracle.com) http://asktom.oracle.com/
> Expert one on one Oracle, programming techniques and solutions for Oracle.
> http://www.amazon.com/exec/obidos/ASIN/1861004826/
> Opinions are mine and do not necessarily reflect those of Oracle Corp
>
>
But some (financial/tax) systems *require* gap-free sequences!
Frank van Bortel Received on Sun Apr 07 2002 - 18:12:22 CEST