From the course: Access 2019 Essential Training

Unlock the full course today

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

Primary and foreign keys

Primary and foreign keys

From the course: Access 2019 Essential Training

Start my 1-month free trial

Primary and foreign keys

- In a well designed database you'll create many tables that relate back to the 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 in another table. For instance let's suppose that we want to store credit card information in our database, here's a couple of questions that you might ask when determining where to store that credit card data. Does a credit card number describe our guest themselves, and no it probably doesn't? Will every guest want us to remember their credit card number, and probably not? Will some guest have multiple credit cards on file with us? And, I'd say yes, that's a possibility. So credit card numbers are not specifically about the guest, some guest won't have any and some guest will have many. All of these answers lead me to conclude that credit card information should be stored in a different table. Lets create a new table to store credit card information and then…

Contents