|
||||||
|
Access Video Quiz X1.2 By Richard Rost Primary Key Field Purpose in Microsoft Access? What is the main purpose of a primary key? Welcome to another Microsoft Access Video Quiz. You will be asked five expert-level questions to test your knowledge of primary keys, foreign keys, one-to-many relationships, AutoNumber fields, data types, relational tables, and indexed fields. Answer each question, check your score, and see how well you know Microsoft Access. Recommended CoursesWant More?Keywords
|
||||||||||||
| Age | Subject | From | |
| 4 days | Post Your Quiz Score Here! | Michael Duncan | |
More Information
Transcript
Today's quiz is for expert or intermediate-level users. I'll ask you five questions, give you a few seconds to think about each one, then I'll reveal the answer. Keep track of your score. We'll see how you did at the end. Are you ready?
Here we go.
Number one, what's the main purpose of a primary key?
In an Access table, is it to uniquely identify each record, to store a copy of related records, to automatically create forms, or to sort records alphabetically?
That's to identify each record uniquely, of course.
Question two, a customer could have many contact records. Where should the customer ID foreign key normally be stored?
In the customer table only, in the contact table, in both tables as separate primary keys, or in a report instead of a table?
That's going to be in the contact table. In a one-to-many relationship, the foreign key goes on the many side. That would be the contact table.
Question three, if a primary key is an AutoNumber field, what field type should its matching foreign key usually be?
Short text, AutoNumber, long integer, or date/time?
That's going to be a long integer. If the primary key is an AutoNumber, the foreign key should be a number of type long integer.
Question four, why is it usually better to store a shipping method ID in an order record instead of repeatedly typing in the shipping method name?
IDs make the table use more columns. It avoids inconsistent duplicate names and makes changes easier. Access can't store text in related tables, or shipping methods can only be used once.
That's B. It avoids inconsistent duplicate names and makes changes easier.
Question five, what does setting a field's Indexed property to Yes, No Duplicates accomplish?
It allows only one blank value in the table, it automatically makes the field an AutoNumber, it prevents two records from having the same field value, or it creates a relationship with every table.
And that's C. It prevents two records from having the same field value.
How'd you do? Did you get all five? Did you lead the fleet to a new Earth, or did you forget what side the Cylons are even on?
If you missed any of these topics, these and a lot more are covered in my Access Expert Level 1 class, Lesson 2 on relational tables.
So thanks for playing. Post your score in the comments down below, and until next time, live long and prosper, my friends.Intro
Quiz
A. To uniquely identify each record
B. To store a copy of related records
C. To automatically create forms
D. To sort records alphabetically
Q2. A customer can have many contact records. Where should the CustomerID foreign key normally be stored?
A. In the customer table only
B. In the contact table
C. In both tables as separate primary keys
D. In a report instead of a table
Q3. If a primary key is an AutoNumber field, what field type should its matching foreign key usually be?
A. Short Text
B. AutoNumber
C. Long Integer
D. Date/Time
Q4. Why is it usually better to store a shipping method ID in an order record instead of repeatedly typing the shipping method name?
A. IDs make the table use more columns
B. It avoids inconsistent duplicate names and makes changes easier
C. Access cannot store text in related tables
D. Shipping methods can only be used once
Q5. What does setting a field's Indexed property to Yes, No Duplicates accomplish?
A. It allows only one blank value in the table
B. It automatically makes the field an AutoNumber
C. It prevents two records from having the same field value
D. It creates a relationship with every table
Answers: 1-A; 2-B; 3-C; 4-B; 5-C
DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.Summary
Question 1: What is the main purpose of a primary key in an Access table?
A primary key uniquely identifies every record in the table. No two records can share the same primary key value. It is not used to copy related records, automatically create forms, or sort records alphabetically.
Question 2: A customer can have multiple contact records. Where should the CustomerID foreign key normally be stored?
The CustomerID foreign key belongs in the Contact table. This is a one-to-many relationship: one customer can be associated with many contacts. In a one-to-many relationship, the foreign key is stored on the many side, which is the Contact table.
Question 3: If a primary key is an AutoNumber field, what data type should the matching foreign key normally use?
The foreign key should be a Number field with a Field Size of Long Integer. Although an AutoNumber field appears as a number, its corresponding foreign key must be configured as a Long Integer Number field. It should not be Short Text, AutoNumber, or Date/Time.
Question 4: Why is it generally better to store a ShippingMethodID in an order record instead of repeatedly entering the shipping method name?
Using a ShippingMethodID avoids inconsistent duplicate names and makes maintenance easier. For example, if you need to rename a shipping method, you make the change once in the shipping methods table instead of changing it in every order record. This helps preserve data consistency and follows proper relational database design.
Question 5: What does setting a field's Indexed property to Yes, No Duplicates do?
It prevents two records from having the same value in that field. This is useful when a field must contain unique values, such as an email address, account number, or other identifier. It does not make the field an AutoNumber, create relationships automatically, or limit the table to only one blank value in all situations.
If you got all five questions correct, excellent work. If you missed any, review the concepts of relational tables, primary keys, foreign keys, data types, lookup values, and unique indexes. These topics, along with many others, are covered in Access Expert Level 1, Lesson 2 on relational tables.
You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends.Topic List
Foreign keys in one-to-many relationships
AutoNumber keys and Long Integer foreign keys
Using IDs to avoid duplicate lookup values
Unique indexes with No DuplicatesArticle
Primary Topics
Secondary Topics
|
| |||
| Keywords: Access Video Quiz, primary key, foreign key, one-to-many relationship, AutoNumber primary key, long integer foreign key, relational tables, indexed yes no duplicates, unique index, duplicate values, lookup table, shipping method ID, database normalization PermaLink Do You Know the Main Purpose of a Primary Key Field in Microsoft Access? Video Quiz X1.2 |