One-to-one relationships are an essential part of building a database
A one-to-one relationship occurs when there is exactly one item in the first table that matches one item in the related table. For example, US citizens have a Social Security number. Only one number is assigned per person, so a person cannot 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.
Personnel number td>
Name td>
Last name td>
TR>
123TD>
Rick TD>
Rossin TD>
TR>
456TD>
Rob TD>
Halford TD>
TR>
789TD>
Eddie TD>
Henson TD>
TR>
567TD>
Amy TD>
Bond TD>
TR>
table>
So the number of rows in the table with the employee’s name must match the number of rows in the table with the employee’s title.
personnel number td>
Position TD>
PhoneExt. td>
TR>
123TD>
Associate TD>
6542TD>
TR>
456TD>
TD Manager>
3251TD>
TR>
789TD>
Associate TD>
3269TD>
TR>
567TD>
TD Manager>
9852TD>
TR>
table>
Another type of database model is the one-to-many relationship. From the table below, you can see that Rob Halford is a manager, so his relationship to the position is unambiguous as there is only one position in this company. But the manager position includes two people, Amy Bond and Rob Halford, who have a one-to-many relationship. One position, many people.
Learn more about database relationships, foreign keys, joins, and ER diagrams.
Rate the article
Add a comment cancel reply
You might also like this
Random number generation with RAND function in Excel
One way to generate random numbers in Excel is:
01.4k.
10 free word processors
The Best Alternative To MS Word Word Processors These:
01.6k.
How to make your own postcard in Inkscape
This tutorial on how to make a greeting card in
0794
Black and White Color Photography Animation in PowerPoint 2003-2007
Insert a photo in PowerPoint View preview
0943
The Best Evernote Calendars, Templates, and Productivity Tools
These free templates can boost your productivity
01.1k.
Lesson Plan K-12 – Creating a Brochure About a Place or Organization
People learn about places, people, or things they
0322
The Best Free Microsoft Christmas Templates for 2019
Relax this year with easy-to-use
0665
Learn how and why to run AutoExec macros when opening Word