Re: [GENERAL] using ID as a key

From: Marten Feldtmann <marten(at)feki(dot)toppoint(dot)de>
To: sevo(at)ip23(dot)net
Cc: davidb(at)vectormath(dot)com, pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] using ID as a key
Date: 2000-02-07 17:17:41
Message-ID: 200002071717.SAA03101@feki.toppoint.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> davidb(at)vectormath(dot)com wrote:
> >
> > Hi Sheila,
> >
> > For general database design considerations (not specific to Postgres) I
> > disagree with the others on the use of serials and sequences. These
> > things never migrate well from platform to platform, they often break, and
> > dealing with them is a nightmare if you ever have to do any bulk data
> > copying.
> > ID generation ought to be handled programmatically.
>
> At the server? This is what OIDs do - alas, these are even less portable
> than serials and sequences. At the client interface? Nice, as long as
> you have a single user database. In a multiuser environment, generating
> and maintaining a unique ID externally to the database is close to

The are algorithm out there which handles this problem very well and
perhaps much better than a database can do and they define a key in a
complete portable way and it needs only some queries to the database
at the beginning of your application and for further key generation
the's no further communication needed in a multi-user environment.

The algortihm are available, the software is available and there's
no need for the database to offer this special feature ... but of
course it's another feature ("marketing") and it's more handy to use
if you do many "manual" sql execution rather then using this
database in an application environement.

I've described such an algorithm on a pgsql list ("High-low algorithm")
some weeks ago. Papers are out in the internet - they are mostly described
in papers which talk about "object - rdbms" mapping.

Marten


In response to

Browse pgsql-general by date

  From Date Subject
Next Message kaiq 2000-02-07 17:30:37 Re: [GENERAL] using ID as a key
Previous Message Marten Feldtmann 2000-02-07 17:06:18 Re: [SQL] Re: [HACKERS] Proposed Changes to PostgreSQL