pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Fons Rave <fonzzz@xs4all.nl>
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: Records exactly the same.
Date: Mon, 23 Jul 2001 08:26:50 -0700
Message-ID: <web-89764@davinci.ethosmedia.com> (raw)
In-Reply-To: <9jbrpj$r67$1@news1.xs4all.nl>

Fons,

> Well, I started with "I'm a beginner". But I'm sure there's no reason
> NOT to
> accept two records that are exactly the same. In the example I gave,
> it is clear
> that the information I want to store can contain two records that are
> exactly
> the same; doing the same thing, on the same day, for the same amount
> of time. In
> this case it is the technical structure that doesn't want it like
> that. So I
> have to change it to make it work.

Yes, there is a reason not to accept them.  And the requirement is
conceptual, not technical -- that is, the way relational databases work
-- *all* relational databases -- is founded on 12 concepts, one of which
is the uniqueness of relations (records).

Or, to phrase it another way, if your design allows identical records
(person, task, time period) then how are *you* going to seperate
illegitimate duplicate data-entry from legitimate identical records?
You can't, and the questionable accuracy of your tables will haunt you
for years.

I'm trying to save you months of pain & suffering here by conveying a
very important concept in database design, one I learned the hard way. 

For a more exhaustive explanation of the necessity of uniqueness and
primary keys, please pick up a copy of Fabian Pascal's "Practical Issues
in Database Design."

-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







view thread (8+ messages)  latest in thread

Message-ID: <web-89764@davinci.ethosmedia.com>
Permalink:  ../web-89764@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-89764@davinci.ethosmedia.com

 · 

reply

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, fonzzz@xs4all.nl
  Subject: Re: Re: Records exactly the same.
  In-Reply-To: <web-89764@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