A One-to-One relationship is like a link between two tables of data in which each record occurs only once in each table. For example, employees and the automobiles they drive may have a One-to-One relationship.
In this article, we will dive deeper into One-to-One Relationship in DBMS according to the GATE Syllabus for (Computer Science Engineering) CSE. Keep reading ahead to learn more.
What is a One-to-One Relationship in DBMS?
When each record in one table is linked to only one record in the other table, this is known as a One-to-One relationship.
Example
Assume that a ‘Person’ (Id, Age, Name, Address) and a ‘Passport’ (Passport id, Passport no) are two of the entities. As a result, each individual can only have one passport, and each passport can only belong to one person.
It’s not very usual to have a relationship like this. This type of relationship is, nonetheless, used for security reasons. We can easily save the passport id in the ‘Person’ database in the above example. However, we can create a separate table for the ‘Passport’ because the passport number is potentially sensitive information that should be kept from other users. For that reason, by creating a separate table, we can add an extra layer of protection by limiting access to just particular database users.
Keep learning and stay tuned to get the latest updates on the GATE Exam along with Eligibility Criteria, GATE Syllabus for CSE (Computer Science Engineering), GATE CSE Notes, GATE CSE Question Paper, and more.
Also Explore,
Comments