You can use your favorite social network to register or link an existing account:
Or use your email address to register without a social network:
Sign in with these social networks:
Or enter your username and password
Forgot your password?
Yes, please link my existing account with for quick, secure access.
No, I would like to create a new account with my profile information.
The video demo, Demo: Set the relationship between 2 tables, is live on Office Online. This seven minute video gives enough information so that the user can intelligently select these options:
I think this video is a great resource for anyone new to Access.
Comments: (7) Collapse
I learned helpful things about referential integrity. What I want to know though, how is there two primary keys in the "Enrollments" table? Is that possible? Also, when the CourseNumber primary key field in the "Curriculum" table is dragged to the CourseNumber primary key field in the "Enrollments" table and the relation ship is created, it creates a one to many relation ship rather than a one to one. When ever you relate a primary key to another primary key, doesn't it alway create a one to one relationship?
I've included my e-mail in the Name field of this form, please e-mail me back.
Thank you.
You can’t actually have two primary keys in the table, and it would not make sense at all. However, you are most certainly allowed to have two fields or even more fields combined together to make up one unique primary key. For example I could use the person’s first name, last name, and the person’s date of birth as a primary key. (you simply Highlight all three fields in the table design mode, and then hit the primary key button). The above of course then answers your 2nd question of how the setting from curriculum to enrollment is not a one to one relationship, because in the table enrollments, the course number is not the primary key ( it does have a primary key icon beside it, but you can tell that there is two fields that have such an icon). Therefore the field coursenumber is not the primary key field. In fact this means course number is just a plain Jane regular long number field, which also happens to be the foreign key to the table curriculum. Albert D. Kallal
Thats what I thought, I asked the questions because in the video demo the two joined fields in the Enrollments table have the "KEY" symbol next to them when they are actually Foreign keys (not Primary keys).
It was a good question on your part since a lot of people don’t realize that you can use compound keys in your applications. I should also point out that you can also make an index on several fields at the same time, and also set that index as to be unique. This type of index can be used to prevent certain duplicate information from being placed in a table (and you don't necessarily have to make that index a primary key if you don't want to). Albert D. Kallal
Thank you for your replies Albert. Have you watched the video? I don't think that the two fields (CourseNumber and StudentID) in the "Enrollment" table are compound keys. They have a gold KEY symbol next to them that looks exactly like the Primary key symbol. That was why I asked the question about two primary keys, the video actually shows what appears to be two primary keys in the Enrollment table. When you set up a compound key it doesn't actually put a key symbol next to it. If you watch the video, jump to about the middle of it and you will see what I mean. Thank you again for your replies.
Albert, I see what you mean now. Thank you :)
You'd be better of reading a book than watching this video. A book about relational database design, that is.
Comments: (loading) Collapse