Relationship Set: whenever two or more entity set exist it can be combined with the help of a relation set. the pictorial representation of the relationship set is a diamond box.
E-R Diagram: the two entity set can be joined with the relationship set. we have a key attribute to the relationship set.
Ex:
In the given example works in is the relationship set having two attributes manager id and manager name out of which manager id is the primary key.
Weak entity set: weak entity set does not have a primary key.it does not save sufficient attributes to form a primary key on its own. the primary key of a weak entity set is a combination of partial key(Discriminator) and the primary key of the strong entity set. the pictorial representation of a weak entity set is a double rectangle.
Ex:
Cardinality Ratio: In the data, model cardinality determines a relationship between two tables.there are four types one to one, one to many, many to one, many to many.
This can be explained with a simple example.
1. One to One: (1:1) one employee can work in one Department which is possible.so one to one relationship satisfies.
2. One to Many: (1:1) one employee can work in many Department which is not possible. so one to many relationships does not satisfy.
3. Many to One: (1:1) Many employees can work in one Department which is possible. so Many to one relationship satisfies.
4. Many to Many: (1:1) Many employees can work in Many Departments which is possible. so Many to Many relationships satisfies.
I hope this article is useful to you, plz follow the next volume for more information.
please post your doubts in the comment box.
You can write to me at codingallrounders@gmail.com
Subscribe by Email
Follow Updates Articles from This Blog via Email
1 Comments
Good explanation.
Reply Delete