Page 42 - My Own Workbook for CSEC Information Technology Examinations
P. 42
My Own Workbook for CSEC® Information Technology Examinations
10. Consider the following design of a database intended to store data related to registrations for an examination.
(a) Name
(b)
(c)
(i) TWO primary keys and state the name of the table in which EACH is contained.
..................................................................................................................................................................
..................................................................................................................................................................
(ii) Name ONE foreign key and state the name of the table which contains it.
..................................................................................................................................................................
Establish the joins among the three tables.
(i) Draw lines to establish joins between pairs of tables.
(ii) Label the joins to show cardinality (one-to-one, one-to-many, etc.).
Write select queries (using SQL) to extract the following data from the database:
(i) (ii) (iii)
(iv) (v)
A list of all candidates showing their names and dates of birth. ..................................................................................................................................................................
Subjects for which candidates with Lastname = “Bennett” are registered. ..................................................................................................................................................................
Subjects for which candidate with Registration Number “A0011037” are registered.
.................................................................................................................................................................. All the candidates registered for an oral OR a practical examination.
.................................................................................................................................................................. All candidates born between 01-Dec-2002 and 31-Dec-2003.
..................................................................................................................................................................
77
9 789769
611337
Copyrighted material. All rights reserved.
IT-book-edited-8,3x11,7.indd 80
9/11/18 7:25 PM
DO NOT COPY THIS PAGE DO NOT COPY THIS PAGE DO NOT COPY THIS PAGE