1-1 relationship between tables in ACCESS

1-1 relations are used to link a record from one table to one and only one record in another table.

One-to-one relationships are created when both connection fields are primary keys or have unique constraints.

For further clarification, continue with the database and the tables we created in the previous lesson. First, go to the Database Tools tab.

1-1 relationship between tables in ACCESS Picture 1
New tblHR Data table is created

Click on Relationships option .

1-1 relationship between tables in ACCESS Picture 2
The Show Table dialog box appears

Select the Members panel and tblHRData, click Add to add both tables to the working screen and then close the Show Table dialog box .

1-1 relationship between tables in ACCESS Picture 3
Both tables tblNhanvien and tblHRData are added to the screen

To create a relationship between these two tables, use the mouse to click and hold the NhanvienID field in the tblNhanvien table , drag the connection to the field you want to connect to in table tblHRData. When you release the mouse, Access will open the following window:

1-1 relationship between tables in ACCESS Picture 4
Drag the two NhanvienID fields of the two tables together to display the Edit Relationships dialog box

This window relates to the tblNhanvien 's NhanvienID and NhanvienID of tblHRData. Click on the Create button and now these two tables are connected, establishing a relationship with each other.

1-1 relationship between tables in ACCESS Picture 5
Two tables after establishing a relationship will show up like this

This relationship is automatically saved by Access without saving . Recently we have created the most basic relationship, next, choose each table to see if there is anything different from the beginning.

You open the table tblNhanvien.

1-1 relationship between tables in ACCESS Picture 6
The tblNhanvien table has not seen a change

Normally on the left side of each record, you will see a small plus sign by default. When creating a relationship, Access automatically adds a child datasheet to the table.

1-1 relationship between tables in ACCESS Picture 7
A child datasheet appears when you click on the small plus sign before the record

Click the plus sign and you will see information related to the records available on the tblHRData table .

1-1 relationship between tables in ACCESS Picture 8
Enter the required information right in this datasheet

Click on the Save icon and open tblHRData, you will see the entered data already here.

1-1 relationship between tables in ACCESS Picture 9
Data entered directly in tblNhanvien table are connected and appear in table tblHRData

Previous article: Establish relationships between tables in Access 2016

Next lesson: 1-n relationship between tables in ACCESS

3.9 ★ | 9 Vote

May be interested

  • MS Access 2003 - Lesson 39: Analyzing tablesMS Access 2003 - Lesson 39: Analyzing tables
    access includes a very powerful tool that you can use to analyze data in one or more tables.
  • MS Access 2003 - Lesson 15: Create an initial tableMS Access 2003 - Lesson 15: Create an initial table
    in this section, you are ready to create a table for the new database. in chapter 2, you used the table wizard to create tables easily. this not only shows that creating a table manually is difficult; but it is a sure way to understand the table.
  • Work with data in Access 2016Work with data in Access 2016
    in the previous lesson, you became familiar with the access 2016 interface as well as the opening and closing of the basic database. this article will continue to go deeper into access 2016 around the content of working with data in access 2016.
  • MS Access 2003 - Lesson 12: Working with a tableMS Access 2003 - Lesson 12: Working with a table
    you have learned how to create and design tables in access. and now it's time to learn how to manipulate all tables.
  • Create data queries in Access 2016 from simple to complexCreate data queries in Access 2016 from simple to complex
    the query allows to retrieve information from one or more tables based on the search conditions you defined. in this lesson, you will learn how to create queries on a simple table and query on multiple tables in access 2016.
  • How to Slow Down a RelationshipHow to Slow Down a Relationship
    sometimes, you might feel like a relationship is moving too quickly – whether that means physically or emotionally. it's important to remember that a relationship is an agreement between two people. you don't need to go along with...
  • How to Link Tables in AccessHow to Link Tables in Access
    microsoft access allows tables and databases to connect with each other. this capability can increase your efficiency and easily spread information that is required for multiple departments or reports. you can make changes in the original...
  • MS Access 2003 - Lesson 8: Change information in the tableMS Access 2003 - Lesson 8: Change information in the table
    in the previous section, you learned how to use the datasheet view mode to enter information for the table. the datasheet view mode also allows you to edit available information quickly and easily.
  • How to Make a Relationship BetterHow to Make a Relationship Better
    after all the effort it takes to get into a quality relationship, it may seem like the hard work is over once you start dating someone. however, a healthy relationship is like a living, breathing thing — it takes constant care and...
  • Advantages of MongoDBAdvantages of MongoDB
    any relation database has a unique schema design to index the data tables and relationships between those tables. meanwhile in mongodb there is no concept of relationship.