Re: Another view on analysis and ER

From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Thu, 06 Dec 2007 15:32:48 -0800
Message-ID: <13lh1laan1uod62_at_corp.supernews.com>


Jon Heggland wrote:
> Quoth Bob Badour:

>> Keys and references are logical issues and not physical issues. Physical
>> issues affect only performance.

>
> Keys are, but key /primacy/ is not. If one ignores any performance
> differences between a primary key and any other key (as of course one
> should, although it may not be possible in current SQL systems), the
> remaining difference is merely syntactical convenience---hardly a
> logical issue.

Consider a database containing a relation containing information about 'the elements' - as in hydrogen, helium, etc.

The elements table has 3 keys (candidate keys):

	Element name
	Atomic number
	Element symbol

Now, consider what else is stored in the database. For the analysis of isotopes, the atomic number is the important key - the different isotopes of hydrogen all share the same atomic number, but have different names (deuterium and tritium) even though chemically they are all hydrogen.

For the analysis of chemical compounds, it is much more familiar to use the element symbol - more people have come across H2O and CO2 than are familiar with 1/2, 8/1 and 6/1, 8/2 (where I'm using atomic number / multiplicity in the second notation). I'm glossing over some notational inconveniences (consider the relational representation of your old friend C2H5OH, for example), but the point remains - for some purposes, the better key to use is atomic number and for other purposes, the better key to use is element symbol.

Which key to use is a logical issue here, isn't it?

-- 
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com
Guardian of DBD::Informix v2007.0914 -- http://dbi.perl.org/

publictimestamp.org/ptb/PTB-1963 sha224 2007-12-06 21:00:03
0AC762E1452FAE2896292EA605A8D66B9FEE09F8E55C0B87073F31DA
Received on Fri Dec 07 2007 - 00:32:48 CET

Original text of this message