Re: Beginner help needed
Posted in 1995
In article <40drod$29d@news.snowcrest.net> pnsoehl@snowcrest.net "Patrick Soehl" writes: > > > > In relations - I am having a hard time understanding the difference in > >foriegn key and primary key, if both have or are the same attribute. In > >the example given, what they call the foreign key acts like what I would > >consider the primary key and vice versa.... > > > > ...snip... > > A primary key must be unique because the postulators of the relational > calculus and algebra said so... An id you stop to think about it, a table holding (for example) information about the counties of England should only hold each county once - there is only one Hertfordshire! This would be a primary key. If you were also holding information about towns in England, you may well want to include a code for which county they are in (county == state), and clearly there are many towns in each county. -- ============================================================================ Sally Woolrich | This mail contains my personal sally@excelsis.demon.co.uk | views not those of my employer! ============================================================================