Discuss Different types of relationships along …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Posted by Yanshu Parjapati 4 years, 3 months ago
- 1 answers
Related Questions
Posted by Chandan Kedia 1 year, 1 month ago
- 0 answers
Posted by Ayushi Singh 1 year, 1 month ago
- 0 answers
Posted by Pavi S 1 year, 1 month ago
- 0 answers
Posted by Account Deleted 1 year, 1 month ago
- 0 answers
Posted by Sakshi Pradhan 1 year, 2 months ago
- 0 answers
Posted by Jatin Jaat 1 year, 1 month ago
- 0 answers
Posted by Swastik Mishra 1 year, 2 months ago
- 0 answers
Posted by Sudharshini Kanthasamy 2 weeks, 5 days ago
- 1 answers
Posted by Manyata Mishra 1 year, 1 month ago
- 0 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
Sia ? 4 years, 3 months ago
One-to-One Relationship
Such a relationship exists when each record of one table is related to only one record of the other table.
<i>For example,</i> If there are two entities ‘Person’ (Id, Name, Age, Address)and ‘Passport’(Passport_id, Passport_no). So, each person can have only one passport and each passport belongs to only one person.
One-to-Many or Many-to-One Relationship
Such a relationship exists when each record of one table can be related to one or more than one record of the other table. This relationship is the most common relationship found. A one-to-many relationship can also be said as a many-to-one relationship depending upon the way we view it.
<i>For example,</i> If there are two entity type ‘Customer’ and ‘Account’ then each ‘Customer’ can have more than one ‘Account’ but each ‘Account’ is held by only one ‘Customer’. In this example, we can say that each Customer is associated with many Account. So, it is a one-to-many relationship. But, if we see it the other way i.e many Account is associated with one Customer then we can say that it is a many-to-one relationship.
Many-to-Many Relationship
Such a relationship exists when each record of the first table can be related to one or more than one record of the second table and a single record of the second table can be related to one or more than one record of the first table. A many-to-many relationship can be seen as a two one-to-many relationship which is linked by a 'linking table' or 'associate table'. The linking table links two tables by having fields which are the primary key of the other two tables. We can understand this with the following example.
Example: If there are two entity type ‘Customer’ and ‘Product’ then each customer can buy more than one product and a product can be bought by many different customers.
0Thank You