KEMBAR78
Lec 02, Introduction of ER Model | PDF | Conceptual Model | Information Retrieval
0% found this document useful (0 votes)
18 views18 pages

Lec 02, Introduction of ER Model

The document introduces the Entity-Relationship (ER) model, which graphically represents the logical structure of a database and the relationships among entities. It explains the components of an ER diagram, including entities, attributes, and relationships, as well as the types of entities (strong and weak) and attributes (key, composite, multivalued, derived). Additionally, it covers the cardinality of relationships, detailing different types such as one-to-one, one-to-many, many-to-one, and many-to-many.

Uploaded by

msrteam007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views18 pages

Lec 02, Introduction of ER Model

The document introduces the Entity-Relationship (ER) model, which graphically represents the logical structure of a database and the relationships among entities. It explains the components of an ER diagram, including entities, attributes, and relationships, as well as the types of entities (strong and weak) and attributes (key, composite, multivalued, derived). Additionally, it covers the cardinality of relationships, detailing different types such as one-to-one, one-to-many, many-to-one, and many-to-many.

Uploaded by

msrteam007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Introduction of ER

Model
MOST. FATEMATUZ ZOHORA
LECTURER, CSE, BAIUST
The ER data model specifies enterprise schema that represents the overall logical structure of a
database graphically.
The Entity Relationship Diagram explains the relationship among the entities present in the
database. ER models are used to model real-world objects like a person, a car, or a company and
the relation between these real-world objects. In short, the ER Diagram is the structural format
of the database.
Symbols Used in ER Model
Components of ER Diagram
ER Model consists of Entities, Attributes, and Relationships among Entities in a Database System.
Entity
An Entity may be an object with a
physical existence – a particular
person, car, house, or employee –
or it may be an object with a
conceptual existence – a company,
a job, or a university course.
Entity
1. Strong Entity
A Strong Entity is a type of entity that has a key Attribute. Strong Entity does not depend on
other Entity in the Schema. It has a primary key, that helps in identifying it uniquely, and it is
represented by a rectangle. These are called Strong Entity Types.
2. Weak Entity
An Entity type has a key attribute that uniquely identifies each entity in the entity set. But some
entity type exists for which key attributes can’t be defined. These are called Weak Entity types.
For Example, A company may store the information of dependents (Parents, Children, Spouse)
of an Employee. But the dependents can’t exist without the employee. So Dependent will be
a Weak Entity Type and Employee will be Identifying Entity type for Dependent, which means it
is Strong Entity Type.
Entity
A weak entity type is represented by a Double Rectangle. The participation of weak entity types
is always total. The relationship between the weak entity type and its identifying strong entity
type is called identifying relationship and it is represented by a double diamond.
Attributes
Attributes are the properties that define the entity type. For example, Roll_No, Name, DOB, Age,
Address, and Mobile_No are the attributes that define entity type Student. In ER diagram, the
attribute is represented by an oval.
1. Key Attribute
The attribute which uniquely identifies each entity in the entity set is called the key attribute.
For example, Roll_No will be unique for each student. In ER diagram, the key attribute is
represented by an oval with underlying lines.
Attributes
2. Composite Attribute
An attribute composed of many other attributes is called a composite attribute. For example,
the Address attribute of the student Entity type consists of Street, City, State, and Country. In ER
diagram, the composite attribute is represented by an oval comprising of ovals.
Attributes
3. Multivalued Attribute
An attribute consisting of more than one value for a given entity. For example, Phone_No (can
be more than one for a given student). In ER diagram, a multivalued attribute is represented by a
double oval.
Attribute
4. Derived Attribute
An attribute that can be derived from other attributes of the entity type is known as a derived
attribute. e.g.; Age (can be derived from DOB). In ER diagram, the derived attribute is
represented by a dashed oval.
ER diagram
The Complete Entity Type Student with its Attributes can be represented as:
Relationship of ER diagram
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. In ER diagram, the relationship type is represented by a
diamond and connecting the entities with lines.
Cardinality of a Relationship
The number of times an entity of an entity set participates in a relationship set is known
as cardinality. Cardinality can be of different types:
1. One-to-One: When each entity in each entity set can take part only once in the relationship,
the cardinality is one-to-one. Let us assume that a male can marry one female and a female can
marry one male. So the relationship will be one-to-one.
the total number of tables that can be used in this is 2.
2. One-to-Many: In one-to-many mapping as well where each entity can be related to more than
one entity and the total number of tables that can be used in this is 2. Let us assume that one
surgeon department can accommodate many doctors. So the Cardinality will be 1 to M. It means
one department has many Doctors.
total number of tables that can used is 3.
3. Many-to-One: When entities in one entity set can take part only once in the relationship set
and entities in other entity sets can take part more than once in the relationship set, cardinality
is many to one. Let us assume that a student can take only one course but one course can be
taken by many students. So the cardinality will be n to 1. It means that for one course there can
be n students but for one student, there will be only one course.
The total number of tables that can be used in this is 3.
4. Many-to-Many: When entities in all entity sets can take part more than once in the
relationship cardinality is many to many. Let us assume that a student can take more than one
course and one course can be taken by many students. So the relationship will be many to
many.
the total number of tables that can be used in this is 3.
Thank You

You might also like