View Single Post
  #15  
Old January 23rd, 2008, 02:42 PM posted to comp.databases.ms-access, comp.databases.theory,microsoft.public.access, microsoft.public.access.tablesdbdesign,microsoft.public.sqlserver
JOG
external usenet poster
 
Posts: 30
Default Separate PK in Jxn Tbl?

On Jan 23, 2:20 pm, JOG wrote:
On Jan 23, 9:05 am, Jamie Collins wrote:



On Jan 23, 1:41 am, "Tony Toews [MVP]" wrote:


I always use an autonumber PK and a uniqui index set on the two FK fields.


Why? No particular good reason. One of my database rules is that all tables have
an autonumber primary key.


The theorists will argue. I don't care.


Would you care for a pragmatist to offer a counter argument?


I never seek to add columns where an attribute does not exist in the
reality being modelled; sometimes I do end up adding something
'artificial' but only when there is a "good data modelling" reason for
doing so.


In the scenario described, there is a two-column "all key" table which
means it is in 5NF. From a "data modelling" point of view I can't see
a case for adding an 'artifical key'.


To the OP, I agree with this point of view. Again from a totally
practical standpoint, it is nonsense adding an artificial key would
not "make it slightly easier to delete records", because when
something changes in the real world, you need that data that made up
the 'original' superkey to know which row to delete anyhow.


That should have read "from a totally practical standpoint, adding an
artificial key would not 'make it slightly easier to delete
records'".


I'd ignore anyone who claims to be telling you based on a purely
"practical" /or/ purely theoretical standpoints. Its always important
to be aware of both extremes, and balance them in order to work out
how to best get the job done.



Jamie.


--