View Single Post
  #1  
Old January 20th, 2005, 06:18 PM
Khai
external usenet poster
 
Posts: n/a
Default Understanding Primary Keys

table1
eID as long (autonumber)
miscinfo as text
moreinfo as text

table2
eID as long?
e2ID as long?
yetmoreinfo as text

Say I had multiple table2's for each table1. Would eID in table2 be set to
the same value in table1.eID, and then, would that mean e2ID would be a
unique key on it's own, labeled PK? Is this where Foreign Keys are? So
table1.eID and table2.eID equal each other?

I understand the reasoning for PK's - but having trouble understanding the
concept and how exactly they relate to another table. =/

in the example relationship dbase at
http://members.iinet.net.au/~allenbrowne/AppHuman.html (I found that in
another post here in the group), it has GroupTypeID listed in tblGroup and
tblGroupType. Say they're long autonumbers, do you defined tblGroupID as
Long (Autonumber), or just as Long, and on Creation, set it to
tblGroupType.GroupTypeID ? Then, if that were the case, how would you pull
up all tblGroups in a form that were listed to tblGroupType.GroupTypeID?

*wandering around in circles*
DPHarr, hopeful database creator.