Subject | RE: [firebird-support] Unique keys without gaps (was: Key violation on Primary/Unique key constraint INTEG_55/30 on table(s) ) |
---|---|
Author | David Johnson |
Post date | 2006-03-14T13:27:25Z |
... and do read this article.
On Wed, 2006-03-15 at 00:06 +1100, Helen Borrie wrote:
> At 11:44 PM 14/03/2006, you wrote:
> >On Tue, 2006-03-14 at 12:21 +0000, Si Carter wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > I have a question: How can I get straight numbers without
> > > > gaps safely?
> > >
> > > Why would you want to unless this is for invoicing or something
> > > similar?
> > >
> >Sarbanes Oxley - accounting standards.
>
> But you would NOT use numbers that are subject to external
> constraints as keys. No accounting standard is allowed to override
> best practice in database design. Invoice numbers that are subject
> to a business rule that requires contiguity carry semantic meaning
> and therefore violate a vital consistency/durability rule if used as
> primary keys.
>
> You *can* maintain unbroken (or, rather, auditable) series for use to
> satisfy a business rule, and store them as a non-key or alternate key
> column. There are various ways to achieve that - and incrementing
> the Max(SacredNumber) is not one of them. Just as tinkering with
> generators is not one of them.
>
> If you'd like to read a paper on the subject, see
> www.ibobjects.com/TechInfo.html, "An Auditable Series of Numbers".
>
> ./helen.ACID-police
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
> SPONSORED LINKS
> Technical support
> Computer technical
> support
> Compaq computer
> technical support
> Compaq technical
> support
> Hewlett packard
> technical support
> Microsoft technical
> support
>
>
> ______________________________________________________________________
> YAHOO! GROUPS LINKS
>
> 1. Visit your group "firebird-support" on the web.
>
> 2. To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
> 3. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>
> ______________________________________________________________________
>