From the course: Relational Databases Essential Training

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: Relational Databases Essential Training

Start my 1-month free trial

One-to-one relationships

- [Instructor] 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 they join type is dictated by the 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 database we have one table to store common information about some employees, like their name and position. 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 additional information about each employee, such as their salary and job rating. Since both of these tables use the employee ID as the primary key, which is by definition unique, they can be joined in a one-to-one relationship.…

Contents