Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

Database System

Concepts

More about Relationship


Relationship
 A meaningful association among entity types.

 Relationship is the association among the instances of one or


more entities.

 Relationship is the glue that holds together the various


component of E-R model.
 Example
 STUDENT Completes COURSE
Relationship
 Graphical Representation
 Denoted by Line labeled with the name of
relationship

Completes
STUDENT COURSE
Relationship
 Associative Entity
 An entity that associates (links) the instances of
one or more entities and contains attributes that
belongs to the relationship of participating
entities.
Relationship
 Associative Entity
 When should a relationship with attributes can be
an associative entity?

 Associative entity exist only when the participating


entity type has many to many relationship.
 Associative entity may have its own identifier and other
attributes

 Associative entity get primary key of participating


entities with other attributes belongs to the relationship.
Relationship
 Associative Entity
 Graphical Representation

Represented by diamond symbol enclosed in a
rectangle
Date_Completed
Certificate_No

Roll_No Title
Name Course_ID

EMPLOYEE CERTIFICATE COURSES


Relationship

Degree of Relationship
 The number of entity types that participate
in a relationship is called degree of the
relationship.
 The most commonly used relationship in E-
R Model are Unary, Binary and Ternary
relationship.
Relationship
Unary Relationship
 A relationship among the instances of single
entity type

 Unary relationship are also called recursive


relationship
Relationship

Unary Relationship

Manages

EMPLOYEE
Relationship
Binary Relationship
 A relationship among the instances of two entity
types
EMPLOYEE PARKING SPACE

STUDENT DEPARTMENT

STUDENT COURSE
Relationship

Ternary Relationship
 A relationship among the instances of three

entity types

a relationship can have attributes of its own

You might also like