What is a one to one relationship in database?

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.

 

 


Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM