One-to-One Relationships

One-to-one relationships are an integral part of building a database

One-to-one relationships occur when there is exactly one record in the first table that corresponds to one record in the related table. For example, U.S. citizens have a Social Security number. Only one number allocates per person.

The tables below feature a one-to-one relationship because each row in the first table is directly related to another row in the second table. 

Database Planning
alexsl / Getty Images
Employee Number First Name Last Name
123 Rick Rossin
456 Rob Halford
789 Eddie Henson
567 Amy Bond

So the number of rows in the employee names table matches the number of rows in the employee positions table.

Employee number Position Phone Ext.
123 Associate 6542
456 Manager 3251
789 Associate 3269
567 Manager 9852

Another type of database model is the one-to-many relationship. Using the bottom table you can see that Rob Halford is a manager, so his relationship to the position is one-to-one because at this company a person only has one position. But the manager position includes two people, Amy Bond and Rob Halford, which is a one-to-many relationship. One position, many people. 

Was this page helpful?