COMP232 DBMS Lecture 5 - Database Design
COMP232 DBMS Lecture 5 - Database Design
Kathmandu University
Management
System
[COMP 232, Credit: 3, June 2025]
Pratit Raj Giri
DoCSE
Course Contents
1. Introduction: Database Systems Applications, Database System versus File systems,
View of Data, Database Languages, Database Users and Administrators, Transaction
Management, Database Architecture. [3 Hrs]
faculty
major
teache
s
Courses
Professor
enroll
ment
advisor
Courses
In this case, the relationship is best modeled as a ternary relationship because all three entities are
directly connected in a meaningful way that depends on all of them.
● Loss of Context
● Increased Complexity
- We allow at most one arrow out of a ternary (or greater degree) relationship to
indicate a cardinality constraint
- If there is more than one arrow, there are two ways of defining the meaning.
- E.g., a ternary relationship R between A, B and C with arrows to B and C
could mean
- 1. each A entity is associated with a unique entity from B and C or
- 2. each pair of entities from (A, B) is associated with a unique C entity,
and each pair (A, C) is associated with a unique B
- Each alternative has been used in different formalisms
- To avoid confusion we outlaw more than one arrow
A weak entity set becomes a table that includes a column for the primary key of the
identifying strong entity set
Example
- Each value of the multivalued attribute maps to a separate tuple of the relation on
schema EM
For example, an instructor entity with primary key 22222 and phone
numbers 456-7890 and 123-4567 maps to two tuples:
(22222, 456-7890) and (22222, 123-4567)