There are three major relationship models:
One-to-One relationship ER diagram
In this many records in one table correspond to the one record in another table.
Example: Every one customer can have multiple sales. So there exist one-to-many relationships between customer and sales table.
Asset can have multiple
Asset entity has one-to-many relationship between them as the ER model shows below.
One-to-Many Relationship ER diagram
In this, one record in one table corresponds to many rows in another table and also vice-versa.
For instance: In a company, one employee can have many skills like Java , C# etc. and also one skill can belong to many employees.
Given below is a sample of many-to-many relationship. One employee can have knowledge of multiple
Technology. So in order to implement this, we have one more table
Employee Technology which is linked to the primary key of
Many-to-Many Relationship ER diagram
Asked In: Many Interviews |