From the course: Database Foundations: Data Structures

Unlock the full course today

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

One-to-one relationships

One-to-one relationships

From the course: Database Foundations: Data Structures

Start my 1-month free trial

One-to-one relationships

- - [Narrator] One-to-one relationships are not nearly as common as one to many, but they do have their place in certain circumstances. We've already established that the join type is dictated by unique constraints. A one-to-one relationship exists when both columns in the join have a unique constraint on them. This is most commonly seen when joining primary keys in both tables. Here's an example of when this might occur. In this human resources database, we've got one table to store common information about some employees like their name and the department that they work in. This information isn't very sensitive and it's made available to everyone in the company. But the human resources department has a second table that adds some information about each of these employees such as their salary or their government issued tax ID number. Since both tables use the employee ID as the primary key, which is by definition…

Contents