What is a one to one relationship in database?

By Arsal Ahmed   Posted on March-20-2018   487

One-to-One (1-1) relationship is defined as the relationship between two tables where both the tables should be associated with each other based on only one matching row. This relationship can be created using Primary key-Unique foreign key constraints.

In a one-to-one relationship, one record in a table is associated with one and only one record in another table.

Students table and contact info table with a one to one relationship line between them

For example:

In a school database, each student has only one student ID and each student ID is assigned to only one person.

 

 

By Arsal Ahmed    20-Mar-2018 Views  487



You may also read following recent articles