Subject | RE: [IBO] Re: Multiple dbs and system wide unique keys |
---|---|
Author | Alan McDonald |
Post date | 2002-12-12T10:53:25Z |
I can understand the fear...
but I think the Y2K issue has been flogged to death..
the reality in my case is that 4 locations inserting 30,000 records a year
per table, worst case (I increase that to 100,000) means I can go on
inserting for the next 5,000 years without having my PKs clash. I think I'm
pretty safe...The last 4 years has proved my expectations quite sound, I'm
safe now for the next 6,000 years. Hope Bill Gates is still doing his best
by then :-)
Your situation may be different...
If 64bit integers had been available I might have been safe for another
15,000 years. I know I know you neer can tell.
Alan
-----Original Message-----
From: Svein Erling Tysvaer
[mailto:svein.erling.tysvaer@...]
Sent: Thursday, 12 December 2002 7:27 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] Re: Multiple dbs and system wide unique keys
At 09:52 11.12.2002 -0500, you wrote:
setting the generator at the first location to 1, the second to 2 etc. and
then make sure you increase your generator by gen_id(<generator_name>,
1000) all the time. If there is any chance you will ever get more than 1000
locations, use a higher number. Basically it is the same as what Alan
suggested, just changing your 'Y2K scare' from #items to #locations (and
then I thought it was possible to use 64-bit numbers).
Set
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
but I think the Y2K issue has been flogged to death..
the reality in my case is that 4 locations inserting 30,000 records a year
per table, worst case (I increase that to 100,000) means I can go on
inserting for the next 5,000 years without having my PKs clash. I think I'm
pretty safe...The last 4 years has proved my expectations quite sound, I'm
safe now for the next 6,000 years. Hope Bill Gates is still doing his best
by then :-)
Your situation may be different...
If 64bit integers had been available I might have been safe for another
15,000 years. I know I know you neer can tell.
Alan
-----Original Message-----
From: Svein Erling Tysvaer
[mailto:svein.erling.tysvaer@...]
Sent: Thursday, 12 December 2002 7:27 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] Re: Multiple dbs and system wide unique keys
At 09:52 11.12.2002 -0500, you wrote:
> >From: Alan McDonaldat
> >I do this by spacing my generators - that's in fact the only difference
> >between the replicated db's, the generator for tables in dbmaster start
>0I'm not favouring this solution, but your fear could be easily avoided by
> >, the generator in db2 starts at 500,000,000 an so on,
> >If course this requires that insert numbers are not going to ovetake you
>and
> >that the number of DB's is within range. The next option to to make a
> >composite PK, wher ethe genrators are all the same, but the tables jn DB
> >have a db field and generator field which combine to make the pk.
>
>Alan, the first option scares me - the same type assumptions about value
>ranges for the year portion of dates lead to the infamous Y2K scare. I
>know -2 billion to +2 billion is a lot of distinct values, but I'd still
>rather not rely on an unenforcible restriction/assumption on value ranges.
setting the generator at the first location to 1, the second to 2 etc. and
then make sure you increase your generator by gen_id(<generator_name>,
1000) all the time. If there is any chance you will ever get more than 1000
locations, use a higher number. Basically it is the same as what Alan
suggested, just changing your 'Y2K scare' from #items to #locations (and
then I thought it was possible to use 64-bit numbers).
Set
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/