- MS Access Tutorial
- MS Access - Home
- MS Access - Overview
- MS Access - RDBMS
- MS Access - Objects
- MS Access - Create Database
- MS Access - Data Types
- MS Access - Create Tables
- MS Access - Adding Data
- MS Access - Query Data
- MS Access - Query Criteria
- MS Access - Action Queries
- MS Access - Create Queries
- MS Access - Parameter Queries
- MS Access - Alternate Criteria
- MS Access - Relating Data
- MS Access - Create Relationships
- One-To-One Relationship
- One-To-Many Relationship
- Many-To-Many Relationship
- MS Access - Wildcards
- MS Access - Calculated Expression
- MS Access - Indexing
- MS Access - Grouping Data
- MS Access - Summarizing Data
- MS Access - Joins
- MS Access - Duplicate Query Wizard
- Unmatched Query Wizard
- MS Access - Create A Form
- MS Access - Modify A Form
- MS Access - Navigation Form
- MS Access - Combo Box
- MS Access - SQL View
- MS Access - Formatting
- MS Access - Controls & Properties
- MS Access - Reports Basics
- MS Access - Formatting Reports
- MS Access - Built-In Functions
- MS Access - Macros
- MS Access - Data Import
- MS Access - Data Export
- MS Access Useful Resources
- MS Access - Quick Guide
- MS Access - Useful Resources
- MS Access - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MS Access - Create Relationships
In this chapter, we will understand the need to create relationships between related tables. One of the goals of good database design is to remove data redundancy.
To achieve that goal, you divide your data into many subject-based tables so that each fact is represented only once.
To do this, all the common fields which are related to each other are placed in one table.
To do this step correctly, you must first understand the relationship between your tables, and then specify these relationships in your Access database.
Why Create Table Relationships?
MS Access uses table relationships to join tables when you need to use them in a database object. There are several reasons why you should create table relationships before you create other database objects, such as forms, queries, macros, and reports.
To work with records from more than one table, you often must create a query that joins the tables.
The query works by matching the values in the primary key field of the first table with a foreign key field in the second table.
When you design a form or report, MS Access uses the information it gathers from the table relationships you have already defined to present you with informed choices and to prepopulate property settings with appropriate default values.
When you design a database, you divide your information into tables, each of which has a primary key and then add foreign keys to related tables that reference those primary keys.
These foreign key-primary key pairings form the basis for table relationships and multi-table queries.
Let us now add another table into your database and name it tblHRData using Table Design as shown in the following screenshot.
Click on the Save icon as in the above screenshot.
Enter tblHRData as table name and click Ok.
tblHRData is now created with data in it.