Re: Re: D308-E9AF-4C11 : CONFIRM from pgsql-sql (subscribe) - Mailing list pgsql-general

From Oliver Elphick
Subject Re: Re: D308-E9AF-4C11 : CONFIRM from pgsql-sql (subscribe)
Date
Msg-id 200107272028.f6RKSvGn003352@linda.lfix.co.uk
Whole thread Raw
In response to Re: D308-E9AF-4C11 : CONFIRM from pgsql-sql (subscribe)  (Gonzo Rock <GonzoRock@Excite.com>)
List pgsql-general
Gonzo Rock wrote:
  >Is one recommended over the other??? Sure appreciate the commentary before I
      > get in too deep with all these tables.

The second sounds OK, but only if the chosen field is truly a candidate key.
"Customer" does not sound like one - suppose you have two 'John Smith's?
This is why most real-world applications use unique numbers or codes.
Of course you could (probably) differentiate the 'John Smith's by address,
but then the address has to be typed in as well as the name.  A code is
much easier.

It all depends on the nature of the data.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "But the wisdom that is from above is first pure, then
      peaceable, gentle, and easy to be intreated, full of
      mercy and good fruits, without partiality, and without
      hypocrisy."     James 3:17



pgsql-general by date:

Previous
From: "Brent R. Matzelle"
Date:
Subject: PostgreSQL to Dia program
Next
From: Ryan Mahoney
Date:
Subject: Re: RE: [SQL] Database Design Question