Subject | Re: Primary Keys - [was] Database File Size |
---|---|
Author | Alexander V.Nevsky |
Post date | 2004-05-24T08:48:23Z |
--- In firebird-support@yahoogroups.com, "David Johnson"
<d_johnson@c...> wrote:
centralized "server" that is common, but must depend on intermittent
merges for synchronization. Any database app that is used for data
gathering in a mobile environment, or any system that must be able to
function for prolonged periods in the absence of communications to a
"central" database.
Why not to build PKs like (Site_ID, Table_ID) in this case? This
not only provides uniqueness but advantages in further grouping and
identifiying "owner" of the record too.
Best regards,
Alexander.
<d_johnson@c...> wrote:
>File Size
> ----- Original Message -----
> From: Alan McDonald
> To: firebird-support@yahoogroups.com
> Sent: Sunday, May 23, 2004 6:21 PM
> Subject: RE: [firebird-support] Re: Primary Keys - [was] Database
>thinking
>
> --- In firebird-support@yahoogroups.com, "Alan McDonald" wrote:
> > > But it says something to those who are using UUIDs as PKs -
> > that itfor server
> > > gives them limitless keys for a 1000 years.
> >
> > The main attraction of UUIDS, is that they can be generated at
> > different sites without collision.
> >
>
> If you need to have the client create the PKs, that's true. But
> created PKs, integers can provide uniqueness without collisiontoo. I am
> asked many times about this and in 99% of cases integers will dothe job
> withou problem for much more than 1000 years.are also distributed systems that can, by nature of their job, have no
> Alan
>
> You are presuming that all database apps are client-server. There
centralized "server" that is common, but must depend on intermittent
merges for synchronization. Any database app that is used for data
gathering in a mobile environment, or any system that must be able to
function for prolonged periods in the absence of communications to a
"central" database.
Why not to build PKs like (Site_ID, Table_ID) in this case? This
not only provides uniqueness but advantages in further grouping and
identifiying "owner" of the record too.
Best regards,
Alexander.