From the course: Access 2016 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understanding primary and foreign keys

Understanding primary and foreign keys

From the course: Access 2016 Essential Training

Start my 1-month free trial

Understanding primary and foreign keys

- In a well designed database, you'll create many tables that relate back to records in other tables. If you have data that isn't specifically about the primary theme of the table, then it's probably the case that it should go into another table. For instance, let's supposed we want to sort credit card information in our database. Here's a couple of questions that you might ask when determining whether or not to store the credit cards with the guest ID's. Does a credit card number describe our guest? Well not really. Would every guest want us to remember their credit card number? And probably not. Will some guests have multiple credit cards on file with us? And I would say yes, that's a possibility. So credit card numbers are not specifically about the guest. Some guests wont have any credit cards and some guests will have many credit cards. All of these answers lead me to conclude that credit card information should be stored in a different table from the guest information. So let's…

Contents