0% found this document useful (0 votes)
8 views

Chapter 15.01_Cardinality

Uploaded by

Qiu LEO
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Chapter 15.01_Cardinality

Uploaded by

Qiu LEO
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 11

IBM Global Services

Cardinality

Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Objectives

 The participants will be able to :


 Define cardinality of Foreign Key Relationships.
 Discuss about the different Foreign Key Field Types.

2 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Cardinality

n : m
1 1

C C

CN
3 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation
IBM Global Services

Foreign Key Field Type

 Check Table: Students


 Foreign Key Table: Course Enrolment

Course Enrolment

STUDENT_ID
?

4 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Foreign Key Type: Key Fields or Key Field Candidates

Faculty Course

5 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Foreign Key Type: Key Fields of a Text Table

T005
(Country Codes)

T005T
(Country descriptions)

(T002)
(Language Codes)

6 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Foreign Key Type: Non-Key Field Candidates

Professor

Course

7 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Demonstration

 Creation of few custom tables and establishing foreign key relationship between
them with Cardinality specified.

8 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Practice

 Creation of few custom tables and establishing foreign key relationship between
them with Cardinality specified.

9 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Summary

 When creating foreign key relationships, you should always specify the cardinality
of that relationship.
 In addition to specifying the cardinality of a foreign key relationship, you should
also specify the foreign key field type. The foreign key field type indicates
whether the foreign key fields belong to the primary key (or a candidate key) of
the foreign key table.

10 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation


IBM Global Services

Questions

 What is Cardinality ?
 What are the different Foreign key field types ?

11 Cardinality | 2.15.01 March-2005 © 2005 IBM Corporation

You might also like