Computer Awareness Bundle PDF Course 2023
ER Model
Introduction to ER Model
The E-R in the E-R Model stands for entity-relationship. The Entity Relationship Diagram explains the relationship
among the entities present in the database. It is the structural format of the database.
Components of ER Diagram
ER diagram is created based on three principal components: entities, attributes, and relationships. The components
of ER diagram are as follows:
Entity
Attributes
Relationship
Weak entity
Strong entity
Simple attribute
Key attribute
Composite attribute
Derived attribute
Multivalued attribute
Entity
It may be an object, person, place or event that stores data in a database. In a relationship diagram an entity is
represented in rectangle form. For example, students, employees, managers, etc.
Entity is characterised into two types as follows −
Strong entity set: The entity types which consist of key attributes or if there are enough attributes for forming a
primary key attribute are called a strong entity set. It is represented by a single rectangle.
Weak entity set: An entity does not have a primary key attribute (concept of keys to be covered in the next
module) and depends on another strong entity via foreign key attribute. It is represented by a double rectangle.
Attributes
It is the name, thing etc. These are the data characteristics of entities or data elements and data fields.
Click Here For Bundle PDF Course | [email protected] Page 1 of 4
Computer Awareness Bundle PDF Course 2023
ER Model
Types of attributes
The types of attributes in the Entity Relationship (ER) model are as follows −
Single value attribute − These attributes contain a single value. For example, age, salary etc.
Multivalued attribute − They contain more than one value of a single entity. For example, phone numbers.
Composite attribute − The attributes which can be further divided. For example, Name-> First name,
Middle name, last name
Derived attribute − The attribute that can be derived from others. For example, age, which can be derived
from Date of Birth.
Symbols used in E-R diagrams
Click Here For Bundle PDF Course | [email protected] Page 2 of 4
Computer Awareness Bundle PDF Course 2023
ER Model
Relationship Type and Relationship Set
A relationship type represents the association between entity types. For example, ‘Enrolled in’ is a relationship
type that exists between entity type Student and Course.
A set of relationships of the same type is known as a relationship set.
Click Here For Bundle PDF Course | [email protected] Page 3 of 4
Computer Awareness Bundle PDF Course 2023
ER Model
Keys
A key in DBMS is an attribute or set of attribute which helps you to identify a row (tuple) in a relation (table)
uniquely.
Types of Keys
There are mainly four types of keys which are described below:
1. CANDIDATE KEY: - It is a set of attributes that uniquely identifies tuples in a table. Every table must
have at least a single candidate key. The Primary key must be selected from the candidate keys. In short, the
Candidate key is the superset, and the primary key is the subset.
2. PRIMARY KEY: - It is a set of one or more attributes that can uniquely identify tuples (rows) within the
relation. It has to be unique and can’t be NULL. Its values are not updatable.
3. ALTERNATIVE KEY: - Mathematically, Candidate Key – Primary Key relates to the alternate key. By
definition, From the set of candidate keys after selecting one of the keys asprimary key, all other remaining
keys are known as alternate keys.
4. SUPER KEY: - A super key is the superset of Candidate keys. In short, Super Key = Candidate Key + any
other attribute.
5. FOREIGN KEY: - Its main role is to create relationship between two tables. It is a non-key attribute whose
value is derived from the primary key of the same or some another table. It can have duplicate values.
Click Here For Bundle PDF Course | [email protected] Page 4 of 4