A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Understanding Primary Keys



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are Primary keys needed in child tables? Nevie and Phil Database Design 2 January 16th, 2005 07:23 AM
Logical question on primary keys... Access rookie Database Design 4 January 8th, 2005 11:26 AM
Using Primary Keys Jodie General Discussion 1 July 14th, 2004 08:49 PM
Choosing Primary and Foreign Keys A.V.H New Users 8 May 23rd, 2004 09:12 PM


All times are GMT +1. The time now is 04:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.