Globally Unique IDs, was Re: [SQLObject] Re: SQLObject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Bud P. B. <bu...@si...> - 2003-04-11 07:38:06
|
On 11 Apr 2003 01:37:10 -0500 Ian Bicking <ia...@co...> wrote: > > Another thought in this context is that PostgreSQL already inserts an > > object id column for every table. But maybe it's not a good idea to > > use since other dbms don't have equivalents... > > > > One thing on my wishlist would be to (optionally) create a globally > > unique id for the object. That could be controlled by an additional > > option "globallyUnique=True" that would go together with PrimaryKey, > > Unique, or alternateID (i.e., everything that implies Unique). > > You mean add OIDs onto the databases that don't have it. MiddleKit does > this, and it's one thing that annoyed me about it, though I can > understand the motivation. It's an interesting idea, but I'm not sure > how to make it work within the bounds of SQL, and in a way that's both > useful and transparent. Nope, the second paragraph I wrote above is totally independent of the first... To reword it in a more clear way (hopefully), I thought that instead of a relatively short integer for id that makes it unique in the table (or maybe the database?), to use a much longer id that is globally unique (at least with a very high probability). This is called different names by different people... There are algorithms around to do it. They typically take things like the MAC address of the machine and the time into account... The benefit of globally unique id's is that it makes future database mergers and restructuring in organizations MUCH easier... --b /----------------------------------------------------------------- | Bud P. Bruegger, Ph.D. | Sistema (www.sistema.it) | Via U. Bassi, 54 | 58100 Grosseto, Italy | +39-0564-411682 (voice and fax) \----------------------------------------------------------------- |