Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What kind of relationship that I can create here?

Status
Not open for further replies.

taoday

Technical User
Jun 6, 2006
1
VN
Ok, here is the situation: I have 2 tables : "Events" and "Participants". The Participants are the persons who attend the "Events". What I want to do is when I creat a new record in the "Events" table, the name of the participants would be update in the "Participants" table. I'm not sure what kind of relationship in this case I should create?
 
Study Normalization and Relationships before you proceed to build an Access database.
You have a many-to-many relationship: an Event can have many participants and one participant can go to many events. NO relational database management system, like Access, likes this situation. So, to resolve this, you will create a "junction table" to create two one-to-many's.
You will have three tables: tblEvents, tblPart., tblAttend.
The tblAttend will look like this:
AttendID Primary key
EventID Primary key of tblEvent
PartID Primary key of tblPart.
DateAttended Any COMMON fields to both Event and Particip.

Then in query, you will connect tblEvent to tblAttend through EventID AND tblPart. to tblAttend through PartID. This creates two one-to-many's and retreiving info is now quite easy.

Warning: if you don't study or take courses in Access, you'll have major problems down the road.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top