Entity Relationship Model

Sep 26 • Notes • 3258 Views • No Comments on Entity Relationship Model

 As we all know that modelling is a very important phase in designing the database applications. Database applications define a particular database and programs that implement the database queries and updates. Such as, a bank database application keeps track of customer details, their account details, withdraws, deposits etc. Entity-Relationship (ER) model is a popular high level conceptual data model. This model is generally used for the conceptual design of database applications. This model presents the diagrammatic notation called ER diagrams. These are associated with ER model. We can say that Entity relationship model is the graphical representation of all the organisational databases. 

ER Model

Entity-Relationship model

Entity Relationship model
An Entity Relationship model is a high level conceptual data model that views the real world entities and relationships. The basic component of this model is Entity-Relationship diagram, which is used for visual representation of data objects.

Utilities of Entity Relationship model
For the database designers, the utilities of ER model are as follows:
(a) It maps to the relational model.
(b) It is simple to understand.
(c) It is used to implement a data model in specific database management software.

Entity in ER model
Entities are the data object about which information is to be collected. The concepts such as person, place, things, or events, which have relevance to the database. Entities are classified into strong and weak entity. A strong or independent entity is one that does not rely on another for identification. A weak or dependent entity is one that relies on another for its identification.

Relationship in ER model
A relationship represents an association between two or more entities. Relationships are classified into degree, connectivity and existence. For example,
(a) Employees are associated with projects
(b) Projects have subtasks
(c) Departments manage one or more projects

Single-valued and Multi-valued attribute.
A single-valued attribute holds a single value for a single entity. For example, the Classroom entity has a single value for the room_number attribute and therefore the room_number attribute is referred as single valued. A multi-valued attribute holds multiple values for a single entity. For example, a customer can have multiple values for the name attribute like middle name, last name, first name.

Degree of a relationship
The degree of a relationship is the number of entities associated with the relationship. Special cases are binary relationship where degree is 2 and ternary whose degree is 3. Binary relationship is the association between two entities are the most common type in the real world.

Types of connectivity in ER model
The connectivity of a  relationship describes the mapping of associated entity instances in the relationship. The basic types of connectivity for relations are:
(a) One to One (1:1):- A one to one relationship is when at most one instance of an entity A is associated with one instance of entity B.
(b) One to Many (1:M):- A one to many relationship is when for one instance of entity A, there are many instances of entity B.
(c) Many to One (M:1):- A many to one relationship is when for more than one instance of entity A with only one instance of entity B.
(d) Many to many (M:M):- A many to many relationship is when for more than one instance of entity A with more than one instance of entity B.

Cardinality
A cardinality of a relationship is the actual number of related occurrences for each of the two entities. A single employee can be assigned to many projects or a single project can have assigned to many employees. The cardinality for the relationship between employees and projects is two and the cardinality between project and employee is three.

ER-Diagram-Elements

Entity-Relationship notations

Entity Relationship notation.
There is no specific standard for representing data objects in ER diagrams. Each modelling methodology uses its own notation. The symbols used for basic ER constructs are:
(a) Entities are represented by rectangles.
(b) Double rectangle represented entities are weak entities.
(c) Attributes are represented by ellipses.
(d) A solid line connecting two entities represents relationships.
(e) Attributes, when included, are listed inside the entity rectangle. Attributes which are identifiers, are underlined.
(f) Multi valued attributes are represented by double ellipses.
(g) Directed line is used to indicated one occurrence and undirected line is used to indicate many occurrences in a relation.
(h) Single diamond structure is for the type of relationship whereas double diamond structure is for identifying relationship type.

Difference between Specialization and Generalization
Specialization is the process of taking subsets of a higher level entity set to form lower level entity set. Generalization proceeds from the recognition that the number of entities set share some common features. Specialization emphasizes differences among entities within the set of creating distinct lower level entity sets. Generalization is used to emphasize the similarities among lower level entity sets and to hide differences.

You may also like to read
Sample paper for DBMS

Oureducation.in is your best source for learning

Tell us Your Queries, Suggestions and Feedback

Your email address will not be published.

« »