0% found this document useful (0 votes)
16 views

DB Lect 5

Database management system lecture

Uploaded by

pintumaharana988
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)
16 views

DB Lect 5

Database management system lecture

Uploaded by

pintumaharana988
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/ 7

Why Use ER Diagrams In DBMS?

 ER diagrams are used to represent the E-R model in a database,


which makes them easy to convert into relations (tables).
 ER diagrams provide the purpose of real-world modeling of objects
which makes them intently useful.
 ER diagrams require no technical knowledge and no hardware support.
 These diagrams are very easy to understand and easy to create even
for a naive user.
 It gives a standard solution for visualizing the data logically.

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


ER Model is used to model the logical view of the system from a data
perspective which consists of these symbols:

 Rectangles: Rectangles represent Entities in the ER Model.


 Ellipses: Ellipses represent Attributes in the ER Model.
 Diamond: Diamonds represent Relationships among Entities.
 Lines: Lines represent attributes to entities and entity sets with other
relationship types.
 Double Ellipse: Double Ellipses represent Multi-Valued Attributes.
 Double Rectangle: Double Rectangle represents a Weak Entity.
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 are of two types


1.Tangible Entity – Which can be touched like car , person etc.
2.Non – tangible Entity – Which can’t be touched like air , bank account
etc.
Entity Set: An Entity is an object of Entity Type and a set of all entities is
called an entity set. For Example, E1 is an entity having Entity Type Student
and the set of all students is called Entity Set.

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.
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.
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.
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.

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.

You might also like