One-to-One Relationships

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

Database Planning
alexsl / Getty Images

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. There is only one number that is assigned per person, and therefore, a person can't have multiple numbers.

Here's another example using the two tables below. The tables have a one-to-one relationship because each row in the first table is directly related to another row in the second table. 

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 has to be the same as 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.