Wednesday, 11 April 2018

Define total participation in ER modelling

Define total participation in ER modeling




Participation Constraint

Total participation is one type of participation constraints. Participation constraints deal with the participation of entities from an entity set in a relationship set. Participation constraint is sometimes referred as minimum cardinality constraint.

Total participation

If each entity of an entity set must participate in a relationship, then this situation is called as total participation. And total participation in ERD is shown with single line (link) between the entity set and the relationship set.

Example 1:

For example, let us consider a database to manipulate details about cars and its owners. Also, let us assume some conditions as follows;

  • An owner must have at least one car (or more cars)

  • A car must belong to at least one owner (or more owners)

For this database we have two entity sets namely Owner and Car. These two entity sets are linked through a relationship set Car_Owner which should be a many-to-many relationship (according to the conditions given). The ER diagram for this database looks like follows;



 


In this ERD, Car_Owner is many-to-many due to the fact that an owner can have one or more cars and a car is owned by one or more owners. In simpler terms, an owner must own at least one car and a car must have at least one owner. It leads to have one record for each owner-car combination in Car_Owner relationship.
In terms of participation constraints we can say that each Owner entity must participate in the relationship Car_Owner. Hence, the participation of Owner in Car_Owner is Total. Also, each Car entity must participate in the relationship Car_Owner. Hence, the participation of Car in Car_Owner is Total.

Example 2:

Let us consider another database that stores data about entity sets Owner, Car, and Bike. Also, let us assume the following conditions;

  • An owner can have one or more cars or bikes or both

  • A car can have one or more owners

  • A bike can have one or more owners

The following ER diagram shows the database with three entity sets Owner, Car, Bike and two relationship sets Car_Owner and Bike_Owner for the given requirement.



In this ERD, it is not compulsory for an owner to have a car or bike. He may have a car or bike or both. So, there may a owner who has a car but not a bike. That means that owner entity is participated in Car_Owner relationship but not in Bike_Owner relationship. Hence, the participation of Owner entity set on either Car_Owner or Bike_Owner relationships are not total. [It is partial participation]
But, for a car entity or a bike entity to exist then there should be an owner related to them. That is, each bike to be stored in Bike relation must have at least one owner. The same is applicable for Car also. Hence, the participation of Car on Car_Owner and Bike on Bike_Owner relationships are Total.
 

*************




What is total participation in database?
Define total participation in ER modelling
Example ERD for total participation
Purpose of total participation in ER model
Advantage of total participation
participation constraints in ER model



No comments:

Post a Comment

Important properties of two phase locking protocol and its variants

Important properties of two phase locking protocol and its variants Properties of     2PL Serializability  2PL ensures co...