In: Computer Science
The Entity Relationship Diagram is the diagrammatic representation of a collection of basic objects called entities, along with attributes which define their properties, and of relationships among such entities. it provides a standard and logical way of visualization data.
Basic term related to entity-relationship diagram:
Type of Entites: There are two types of entites.
Type of Enitity Set: There are two types of entities set
Types of Attributes: The type of attributes based on different properties are:
Relationship: The relationship is associated between two or more entities of same or different entity sets, a set of similar type of realtionship is known as relationship set, the representation of relationship set in ER diagram is shown below:
Every week entity set is related to a strong entity set, the strong entity set is said to be the identifying or owner entity set with respect to the week entity set it is related to and the week entity set said to be existence dependent on the identifying entities set, the relationship between a week entity set and it's corresponding identifying entity set is called identifying relationship, the representation of ER Diagram shown below:
For week entity set, a set of attributes can be used to distinguish a specific entity among all the other entities, this set is called discriminator or partial key the representation of discriminator in ER Diagram shown below:
The key attribute of a week entity set is formed by the combination of the key attribute of the identifying entity set and the discriminator of the week entity set.
Here the example of entity relationship diagram.
We have three entity set student, guardian and teacher where guardian is week entity set which is existence dependent on student entity set, student and teacher are strong entity sets and are related to each other.
For student entity set roll number is key attribute name is composite attribute that can be divided into three parts first name, middle name and last name, ages are derived attribute that can be calculated using do beyond system tapes.
For Guardian entity sets phone number is multivalued attribute, name and phone number form the partial key or discriminator.
For teacher entiry key or discriminator the teacher entity sets teacher ID is a key attribute phone number is a multivalued attribute, teacher and student entity sets are related through the relationship teaches student and guardian entiry sets are related through the relationship has.