Você está na página 1de 39

E-R

Diagram

Presented by:
Fatiha Rashid
Javeria
Rafeeq

Introduction:
Logical representation of data in
an organization.
Views the entire system as a
collection of entities related to
one another.
Introduced by peter chen in
1976.

Advantages of E-R
Model:
CONCEPTUAL SIMPLICITY:
VISUAL REPRESENTATION:
EFFECTIVE
COMMUNICATION TOOL:

Elements of E-R
Model:
1: Entities
2: Attributes
3: Relationships

Entities:
An Entity is a
Person,Place,Thing or
Event for which data is
collected and maintained.
Represented by a rectangle

symbol

Entity name

Entity type / Entity


class:
A set of entities with same attributes
Exmaple: Student entity class is a set of
All students.
Book entity type is for all Books etc.

Entity instance
A member of an entity
class is known as entity
instance .
Also known as

occurrence.

entity

Entity
Class

Entity
instanc
e

Entity
class

Entity instance

ATTRIBUTES:
** The characteristics of an
entity are called attributes or
properties.

Example: Name,
address,Class and
Email of a students
are his attributes.

Symb
ol
Attribute
name

Attribute
Domain:
*A

set of possible values for


an attribute
*All atributes have domain
Example : The domain for
Grade point average (GPA)
can be from 0 to 4.

Relationships:
*A logical connection between different
enities.
* Established on the basis of interaction
between these entities.

Participents: entities participating In a


relationship are called participents.

Sym
bol

Relations
hip name

Doctor

Teacher

teach
es

students

trea
ts

Patient

Total Relationship:
If all entities of that entity set may be
participant in the relationship.
Example: In supplier_part
relationship,the relationship is total if
every part is supplied by a supplier.

artial relationship:

If some of the entities of that entity set


may be participant in the relationship.
Example: If certain parts are available
without a supplier.

Types of Attributes
1:
2:
3:
4:
5:
6:
7:

Simple
composite
single valued
multi-valued
stored
derived
identifiers

MPLE ATTRIBUTE/ ATOMIC ATTRIBUTE:

*Cannot be subdivided into


smaller components.

GENDER

PERSON

omposite attribute:
*Can be divided into smaller
components.
city
street
ADDRE
SS

EMPLOYEE

count
ry

Single-valued
Attributes:
Contain single valued
value.

Multi-valued Attributes:
Contain two or more
values.

Gende
r

Employee

name

city

person

hobi
es

Stored Attributes:
*Stored in a database.

Derived attributes:
*Not

stored in database but


derived from another value.

IDENTIFIERS:
Identifies an entity
instance among other
instances In entity class.

ENTITIES:

**WEEK & STRONG


ENTITIE

***ASSOCIATIVE

Weak entity& strong entity


week entity Can exist only if any
other entity exist, also called child
,dependent
. exist without depending
Strong
entity Can
upon the existance of another entity .
Owner/ identifying
owner:
entity on which the
weak entity depends.

Exampl
e
PERSON

HA
S

CHILD

ASSOCATIVE ENTITIES:
Type of entity that associates the
instances of one or many entity type
with one another.

Degree of relationships:
The number of entities in a
relationship .

Types:

1: unary relationship
2: binary relationship
3: ternary relationship

Unary relationship:

Binary relationships:
Exist between the
instances of two entity
types.
Types:
1: one-to-one
2:one-to-many
3:many to-many

One to one:
One to many:

Many to many:

Ternary relationships:

Cardinality constraints:
The maximum number of
relationships.

*Circle means zero


*Line
means..one
*Crows foot symbol
means.many

Past paper
2010

employee

jobs
department

equipment

suppliers

project

numb
er
name

DOB

Phone no

Date of last
meeting

Project
no

Project
name

nam
e

Project
cost

Addres
s

duration

Conclusion:
To conclude E-R
diagram is a graphical representation
Of data in an organization.
It includes entities,attributes
and relationships.

We hope you
liked it.

Você também pode gostar