Cardinality/Binary relationship
It defines the numerical attributes of the relationship
between two entites or entity sets.
One to one relationship : -
When a single instance of an entity is associated with
a single instance of another entity then it is called one to one relationship.
For example : - a person has only one passport and a
passport is given to one person.
One to many relationship : -
When a single instance of an entity is associated with more than one
instance of another entity then it is called one to many relationship.
For example: -
One customer can placed many orders but an order can’t be placed by many
customers.
Many to One relationship: -
When more than one instance of an entity is associated with single
instance of another entity then it is called many to one relationship.
For example: -
Many students can study in a single college but a student in many
colleges at same time.
Many to many relationship: -
When more than one instance is associated with more than instance of
another entity then it is called many to many relationship.
For example: -
More than one employee assigned to many project and many project can be
assigned to many employee.
No comments:
Post a Comment