Database Theory (CIE IGCSE Computer Science)

Topic Questions

1a
Sme Calculator
1 mark

A database table, 2018MOV, is used to keep a record of movie details.

CatNo Title Genre1 Genre2 Blu-ray DVD Streaming
18m01 Power Rangers Adventure Fantasy Yes No Yes
18m02 Baywatch Comedy Drama Yes No Yes
18m03 Table 19 Comedy Drama Yes Yes No
18m04 Wonder Woman Action Fantasy Yes No Yes
18m05 Justice League Action Fantasy Yes Yes Yes
18m06 Twilight Thriller Action Yes Yes No
18m07 Ant Man Action Fantasy No Yes No
18m08 Venice Beach Action History No Yes No
18m12 Fast Five Action Thriller No Yes No
18m15 King Kong Adventure Fantasy No Yes Yes
18m16 Transformers: The Last Knight Action Sci-Fi Yes Yes Yes
18m17 The Dark Tower Fantasy Sci-Fi Yes Yes No
18m19 Beauty and the Beast Fantasy Romance Yes Yes Yes
18m21 The Mummy Action Fantasy No No Yes
18m22 Star Wars: Episode VIII Sci-Fi Action Yes No Yes
18m23 Guardians of the Galaxy Action Sci-Fi Yes Yes Yes
18m26 Thor Action Sci-Fi No Yes Yes
18m27 Twilight Fantasy Sci-Fi No No Yes
18m30 Beneath Action Fantasy Yes No No
18m31 Despicable Me Animation Action Yes Yes No

a)
State the number of records in the database table.
 [1]
1b
Sme Calculator
2 marks

b)

i)
Give the name of the field that would be used for the primary key.
 [1]
ii)
State the reason for choosing this field for the primary key.
 [1]
1c
Sme Calculator
2 marks
c)
Complete the table to identify the most appropriate data type for each field based on the data shown in the database table, 2018MOV.

Field Data type
CatNo


Title


Genre1


Streaming


[2]

Did this page help you?

2
Sme Calculator
1 mark

A database table, TREES, is used to keep a record of the trees in a park. Each tree is given a unique number and is examined to see if it is at risk of dying. There are over 900 trees; part of the database table is shown.

Tree Number Type Map Position Age in Years At Risk
TN091 Acacia A7 250 Y
TN172 Olive C5 110 N
TN913 Cedar B9 8 N
TN824 Banyan A3 50 Y
TN021 Pine D5 560 Y
TN532 Teak C8 76 Y
TN043 Yew B1 340 N
TN354 Spruce D4 65 N
TN371 Elm B10 22 Y
TN869 Oak C9 13 N
TN954 Pine E11 3 N














State the number of fields in the table.

[1]

Did this page help you?

3a
Sme Calculator
1 mark

A database was set up to show the properties of certain chemical elements. Part of the database is shown below.

Name of
element
Element
symbol
Atomic
number
Atomic
weight
Melting
point (C)
Boiling
point (C)
State at
room temp
oxygen O 8 16 –218 –183 gas
iron Fe 26 56 1538 2861 solid
mercury Hg 80 201 –38 356 liquid
bromine Br 35 80 –7 59 liquid
osmium Os 76 190 3033 5012 solid
caesium Cs 55 133 28 671 solid
gallium Ga 31 70 30 2204 solid
argon Ar 18 40 –189 –186 gas
silver Ag 47 108 961 2162 solid

a)

How many fields are in each record?
[1]
3b
Sme Calculator
1 mark
b)
Which field would be best suited as primary key?
[1]

Did this page help you?

4a
Sme Calculator
1 mark

A library uses a database table, GENRE, to keep a record of the number of books it has in each genre.

ID GenreName Total Available Loaned Overdue
 ABI  Autobiography 500  250  250  20 
 BIO  Biography 650  400  250 
 EDU  Education 20200  10000  10200  1250 
 FAN  Fantasy 1575  500  1075  13 
 GFI  General Fiction 35253  23520  11733 
 GNF  General Non-Fiction 25200  12020  13180 
 HFI  Historical Fiction 6300  3500  2800 
 HNF  Historical Non-Fiction 8000  1523  6477 
 HUM  Humour 13500  9580  3920  46 
 MYS  Mystery 26000  13269  12731 
 PFI  Political Fiction 23561  10523  13038  500 
 PNF  Political Non-Fiction 1823  750  1073  23 
 REF  Reference 374  374 
 ROM  Romance 18269  16800  1469 
 SAT  Satirical 23567  12500  11067 
 SCF  Science Fiction 36025  25000  11025 
 SPO  Sport 45720  32687  13033  3256 
 THR  Thriller 86000  46859  39141 
 
a)

State the reason ID could be used as a primary key in the table GENRE.
 [1]
4b
Sme Calculator
1 mark
b)
State the number of records in the table GENRE.
 [1]

Did this page help you?