Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Fundamentals of Database Systems

1
Database System Concepts and Architecture

Module 4 Relationship and Cardinality

Course Learning Outcomes:


1. Understand the Maximum and Minimum Cardinality
2. Learn how to use Crow’s Foot Notation
3. Discuss the considerations of modeling a relationship

Cardinality

Describes how many entity instances can be in the relationship


There are two (2) types of relationship.

• Maximum Cardinality – maximum number of entity instances in the relationship.

• Minimum Cardinality – minimum number of entity instances that must participate


in a relationship.

Maximum Cardinality
One – to – One Relationship
• One-to-One (1:1)
• A single entity instance of one entity class is related to a single entity instance of
another entity class.

A governor governs (only) one state


A state has (only) one governor

Course Module
One – to – Many Relationship
• One-to-Many (1: N)
• A single entity instance of one entity class is related to a multiple entity instance of
another entity class.

A book is published by (only) one publisher


A publisher can publish many (multiple) books

Many – to – Many Relationship


• Many-to-Many (N: M)
• Each entity instance of one entity class is related to a multiple entity instance of
another entity class; and vice versa.

A book can be written by many (multiple) authors


An author can write many (multiple) books
Fundamentals of Database Systems
3
Database System Concepts and Architecture

Minimum Cardinality

In minimum cardinality, minimums are stated as either ZERO or ONE:


• 0 (optional): the participation of an entity in the relationship is optional.
• 1 (mandatory): the participation of an entity in the relationship is mandatory.

Crow’s Foot Notation Summary

Course Module
Relationship Modeling Considerations

1. Multiple Relationships
This relationship exists if they are independent or different to each other.

2. Transitive Relationship
Entities can be related indirectly by two (2) relationships.
Fundamentals of Database Systems
5
Database System Concepts and Architecture

3. Attributes of a Relationship
Relationships can have attributes

4. Relationship as an Entity
Relationships can also be an entity, especially if it has an attribute

Course Module
Degree of Relationship
Describes the number of entities involved in a relationship.
• Unary (One Entity)
• Binary (Two Entities)
• Ternary (Three Entities)
• N’ary (more the three entities)

Unary Relationship

Ternary Relationship
Fundamentals of Database Systems
7
Database System Concepts and Architecture

N’ary Relationship

References and Supplementary Materials


Books and Journals
1. Ramez Elmasri and Shamkant B. Navathe; 2016; Fundamentals of Database Systems;
USA; Pearson
2. Dr. Kashif Qureshi; 2018; Advanced concepts of information technology; educreation
publishing; India.
Online Supplementary Reading Materials
1. RelationalDBDesing; https://www.relationaldbdesign.com/basic-sql/module3/intro-
relational-databases.php; March 31, 2020
2. Advantages of Database Management System;
https://www.tutorialspoint.com/Advantages-of-Database-Management-System;
March 31, 2020
3. DesigningandManagingData;
https://www.academia.edu/36712448/Entity_Relationship_Diagram_ERD_Basics_CIS
_3730_Designing_and_Managing_Data; April 01, 2020
4. DesigningandManagingData; http://jackzheng.net/teaching/archive/cis3730-2010-
fall/; April 03,2020
Online Instructional Videos
1. Introduction to Database; https://www.youtube.com/watch?v=8e-
wgQnsFxE&list=PLJ5C_6qdAvBHKccG0ZyOxcf_2YO6r4Q4l; March 21, 2020
2. Three levels of Architecture/DBMS;
https://www.youtube.com/watch?v=j6xh8wKfjkY; April 01,2020
3. Entity Relationship Model; https://www.youtube.com/watch?v=p7GsjrXoW28; April
03, 2020

Course Module

You might also like