From: Josh Berkus <josh@agliodbs.com>
To: postgresql_sql@kaiserdigital.com
To: pgsql-sql@postgresql.org
Subject: Re: GUID in postgres
Date: Fri, 26 Oct 2001 13:00:04 -0700
Message-ID: <web-492993@davinci.ethosmedia.com> (raw)
In-Reply-To: <004501c15e50$ffd4df20$0c00a8c0@mouse>
"Kaiserdigital":
> Why would you want to use two columns when you use could one? Two
> columns in each table would clutter your scheme as well as your
> procedures.
It's a relational integrity issue. A GUID, by definition, contains two
pieces of information:
1. The local primary key
2. The server unique ID
As such, RDBMS design principles (the Second Normal Form, I believe,
correct me if I'm remebering wrong) mandates that they be kept in two
columns.
This is a pet peeve of mine, as DB vendors and beginner DBA's today seem
to be in a rush to embrase "non-atomic" fields willy-nilly, abandoning
20 years of accumulated RDBMS wisdom.
> It doesn't matter if you change the network card. The GUIDs will
> still
> be unique. The MAC does not make the GUID unique on any given server.
> The rest of the GUID generation function accomplishes this task. All
> that is accomplished by incorporating the MAC into the GUID is
> uniqueness between machines.
Makes sense if you have an open-ended network of machines so that a
simple numbering sequence won't work. With 3 servers, "1", "2", "3"
work just as well, and don't have the 12-byte overhead of a MAC address.
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, postgresql_sql@kaiserdigital.com
Subject: Re: GUID in postgres
In-Reply-To: <web-492993@davinci.ethosmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox