Sei sulla pagina 1di 10

ENTITY RELATIONSHIP MODEL

Vishwajeet Gudadhe
(14007019)
(14007021)

Shubham Bele

ER MODEL BASICS
Definition : ER-Model is a visual representation of data that describes
how data is related to each other.
Symbols & Notations :

COMPONENTS OF ER-MODEL
Entity :
1. An entity can be any object, place, person or class.
2. In ER diagram, an entity is represented using rectangles.
3. Consider an example of an organisation.
4. Employee, Manager, Product and many more can be taken as
entities from an organisation.
5. Entity Set : An entity set is a set of entities of the same type
that shares the properties or attributes.

Attribute :
1. An attribute describes a property or characteristics of an entity.
2. For example, Name, Age, Address etc can be attributes of a Student.
3. An attribute is represented using ellipse.
4. Types :
. Single valued Attributes :An attribute, that has a single value for a
particular entity is known as single valued attributes. For example, age of
a employee entity.
. Multi valued Attributes :An attributes thatmay have multiple values
for the same entity is known as multi valued attributes. For example
colors of a car entity.
. Compound Attribute/Composite Attribute :Attribute can be
subdivided into two or more other Attribute. For Example, Name can be
divided into First name, Middle name and Last name.

Simple Attributes/Atomic Attributes :The attributes which cannot be


divided into smaller subparts are called simple or atomic attributes. For
example, age of employee entity
Stored Attribute :An attribute, which cannot be derived from other
attribute, is known as stored attribute. For example, BirthDate of
employee.
Derived Attribute :Attributes derived from other stored attribute. For
example age from Date of Birth and Todays date.
Complex Attributes :If an attribute fr an entity, is built using composite
and multivalued attributes, then these attributes are called complex
attributes.
Key Attribute :represents primary key. (main characteristics of an
entity). It is an attribute, that has distinct value for each entity/element in
an entity set. For example, Roll number in a Student Entity Type.
Non Key Attributes :Theseare attributes other than candidate key
attributes in a table. For example Firstname is a non key attribute as it

Relationship :
A relationship describes relations between entities.
Relationship is represented using diamonds
Types :
1. Binary Relationship :
. ABinaryrelationshipistheonethatlinkstwoentitiessetse.g.STUDENTCLASS.
. Relationshipscan beformallydescribedin an orderedpairform.
. Entiresetisrelationshipsetandeachorderedpairis
aninstanceoftherelationship.
2. Unary Relationship :
. An
ENTITYTYPElinkedwithitself,alsocalledrecursiverelationship.Example

3. TernaryRelationship :
ATernaryrelationshipistheonethatinvolvesthreeentitiese.g.STUDENTCLASS-FACULTY.

SAMPLE E-R DIAGRAM

In given E-R Diagram of banking system, there are two entity sets,
customer and account, with attributes as outlined earlier.
The diagram also shows a relationship depositor between customer and
account

Generalization

It is bottom up approach in which two lower level


entities combined to form a higher level entity. In generalization, the higher
level entity can also combined with other lower level entity to make further
higher level entity.

Specialization :

It is completely opposite to generalization. It is the


process of organising columns(attributes) and tables(relations) of a
relational database to reduce data redundancy and improve data integrity.

Aggregation :
It is a process when relation between two entities is
treated as a single entity.

Potrebbero piacerti anche