Entity-Relationship Model

An Entity Relationship Diagram (ERD) is a graphical representation of entities and their relationships to each other. It is a data modeling technique that graphically illustrates an information system’s entities and the relationships between those entities. An ERD is a conceptual and representational model of data used to represent the entity framework infrastructure.

The elements of an ERD are:

Entities:

An entity is a real-world item or concept that exists on its own. Entities are equivalent to database tables in a relational database, with each row of the table representing an instance of that entity. Entities are of following types:

  1. Strong Entity: untitledAn Entity that has a primary key is called a Strong Entity.

2. Weak Entity: untitledAn Entity that does not have or possess sufficient attributes to form its own unique primary key is called a Weak Entity. a Weak Entity always depends on a Strong Entity.

Relationships:

A relationship is how the data is shared between entities. There are three types of relationships between entities:

  1. One to One:fOne instance of an entity (A) is associated with one other instance of another entity (B)
  2. One to Many:aOne instance of an entity (A) is associated with zero, one or many instances of another entity (B), but for one instance of entity B there is only one instance of entity A.
  3. Many to Many:bOne instance of an entity (A) is associated with one, zero or many instances of another entity (B), and one instance of entity B is associated with one, zero or many instances of entity (A).

Attributes: c

An attribute of an entity is a particular property that describes the entity. Attributes are of following types:

1. Key or Non-Key Attributes:An entity usually has an attribute whose values are distinct for each individual entity. This attribute uniquely identifies the individual entity. Such an attribute is called a key attribute. For example, in the Employee entity type, EmpNo is the key attribute since no two employees can have same employee number.

  1. Simple and Composite Attributes:dComposite attributes can be divided into smaller subparts. These subparts represent basic attributes with independent meanings of their own. For example, take Name attributes. We can divide it into sub-parts like First_name, Middle_name, and Last_name. Attributes that can’t be divided into subparts are called Simple or Atomic attributes. For example, EmployeeNumber is a simple attribute.
  2. eStored and Derived Attributes:There may be a case when two or more attributes values are related. Take the example of age. Age of a person can be calculated from person’s date of birth and present date. Difference between the two gives the value of age. In this case, age is the derived attribute. The attribute from which another attribute value is derived is called stored attribute. In the above example, date of birth is the stored attribute.

Steps involved in creating an ERD include:

  1. Identifying and defining the entities
  2. Determining all interactions (relationships) between the entities
  3. Analyzing the nature of interactions/determining the cardinality of the relationships
  4. Creating the ERD
Please follow and like us:
error20

Your email address will not be published. Required fields are marked *

Contact CPD Technologies