Saturday, February 3, 2018

Relations Between Database Tables

• A relationship is defined as “an association among entities”.
• A relationship type as an association of entity types.
• Several relationship may exist between the same entity.

The three different types of relationships recognized among various data stored in the database are:

• One-to-One
• One-to-Many (or Many-to-One)
• Many-to-Many

One-to-One
• Consider for example a set of students in a class. Each student can only one roll number. Similarly, each roll number can be associated only with one student.
This is the case of One-to-One relationship Fig 1.2 illustrates this relationship.

One student can register for only one particular course at a time, where a number of students could register for the same course.
This is illustrated with Fig 1.3

Many-to-Many
A vendor can sell a number of items and many vendors can sell particular item

Thanks for reading. If you like this post please follow us for more updates about technology related updates.

No comments: