A one-to-many relationship exists in a relational database when one row in table A is linked to many rows in table B, but only one row in table B is linked to one row in table A. It’s vital to remember that a one-to-many relationship is the quality of the relationship, not the data.
In this article, we will dive deeper into one-to-many Relationship in DBMS according to the GATE Syllabus for (Computer Science Engineering) CSE. Keep reading ahead to learn more.
What is a One-to-Many Relationship in DBMS?
When each entry in one table may be linked to one or more records in the other table, this is known as a one-to-many relationship. This is the most common type of relationship found in DBMS. Depending on how we look at it, a one-to-many relationship can also be described as a many-to-one relationship.
Example
If the two entity types are ‘Customer’ and ‘Account,’ each ‘Customer’ can have many ‘Accounts,’ but each ‘Account’ can only be owned by one ‘Customer.’ In this case, we can say that each customer is linked to a number of accounts. As a result, the relationship is one-to-many. However, if we look at it from the other perspective, where multiple accounts are linked to a single customer, we can call it a many-to-one relationship.
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