Questions A
1.  Data is to be stored in a structure and to do this a data type must be chosen for each 
item of data.  Choose a suitable data type from the following list for the data shown in the table: 
Logical/Boolean 
Alphanumeric/text 
Numeric 
Date 
Name of Field  Example Data  Data Type 
Title  (Mr., Mrs., Ms., Dr., etc.) 
(Mr, Mrs, Ms, Dr, etc) 
alphanumeric (with DOTS) 
text (without DOTS) 
Phone Number  1378-097-5373 
13780975373 
alphanumeric (with DASH) 
numeric (without DOTS) 
Sex  M or F  logical 
Country  Botswana  text 
Date of Birth  01/10/03  date 
Years at address  4  numeric 
2.   Here is a list of examples f data to be put into a structure.  Some of this data can have 
the logical/Boolean data type and some of it cannot.  Complete the following  table by placing a 
tick in the box next to those items of data could use a logical/Boolean data type. 
Items of Data  Tick if data type is Logical/Boolean 
Driving license (yes or no)  o 
Sex (M or F)  o 
Size (S, M, L, XL, XXL)   
Airport (PEK, ICN, YNT)   
Car registration   
Date of purchase   
Car Type (Manual/Automatic)  o 
Fuel Type (diesel or petrol)  o 
 
Question B 
1.   A luxury rental firm keeps the details of the cars it rents out in a table.  The structure 
and contents of this table are shown below 
Reg-Number  Make  Model  Year 
DB51 AML  Aston Martin  DB7  2009 
CAB 360M  Ferrari  360 Modena  2008 
GT X34 FER  Ferrari  3555 Spider  2000 
MAS 12  Maserati  3200 GTA  2001 
FG09 FRT  Porsche  911 Turbo  2009 
M3 MMM  BMW  M3 Conv  2010 
T433 YTH  Jaguar  XKB  2009 
a.  Give the names of TWO fields  shown in the above table. 
Reg-Number, Year 
b.  Give the name of the field that should be chosen as the key field. 
Reg-Number 
c. Explain why the field you have chosen for your answer to part (b) should be chosen as 
the key field. 
Because its a personal nique number 
d.  How many records are there in the table? 
7 
2.  Most schools now use database to store details about each pupil.  The table shows 
some of the field names and data types stored in one pupil database. 
Field  Data Type 
UniquePupilNumber  Number 
Firstname   
Surname  Text/Alphanumeric 
FirstLineAddress  Text/Alphanumeric 
SecondLineAddress  Text/Alphanumeric 
Postcode   
LandLineNo  Text/Alphanumeric 
DateOfBirth  Date 
FreeSchoolMeals(Y/N)   
a.  Give the most appropriate data types for the following fields 
i.  First name Text/Alphanumeric 
ii.  Postcode Text/Alphanumeric 
iii.  FreeSchoolMeals (Y/N) Boolean 
b.  Give the names of THREE other fields that are likely to be used in database 
Sex, Nationality, Blood type 
c. Explain which field is used as the key field in the database and why such a field is 
necessary. 
unique pupil number, it can help identify different pupils since other fields of different 
pupils might be the same.  
d.  It is important that the data contained in this database is accurate.  Describe 
how TWO different errors could occur when data is entered into this database. 
 Transcription errors - where data copied from forms is misread 
Transposition errors - where digits are incorrectly reversed when being entered into a 
database. 
e.  Explain how the errors you have mentioned in part (d) could be detected or 
prevented. 
You can fix transcription errors by verifying data after you enter it 
You can fix transposition errors by adding a check digit at the end of a long number 
3.    
a.  Explain what is meant by a flat file database 
one Excel document that has two or more information 
b.  explain what is meant by a relational database 
a database where the data is in two or more tables with relationships  
 Describe an application where a flat-file database would be suitable 
information of all students 
4.  Databases are two types: flat file and relational 
a.  Describe TWO differences between a flat-file database and a relational 
database 
no limit on use, and no data redundancy 
b.  a dress hire company needs to store details of dresses, customers, and rentals.  
They want to store these details in a database.  Which type of database d you suggest and 
give TWO reasons for your answer. 
Relational Database.  There would not be data redundancy, and the limitations in using 
relational database are less than in using flat files. 
Test Yourself 
The following notes summarize this topic.  The notes are incomplete because they have words 
missing.  Using the words in the list below, copy out and complete the sentences A to N, underlining 
the words that you have inserted. Each word maybe used more than once.  
analogue to digital       record       digital to analogue 
foreign       real       key field       Boolean       links 
redundancy       fields       relational       analogue 
alphanumeric       digital       table 
A.  Numeric data can be in two forms integer or real 
B.  Letters and numbers together are called alphanumeric data 
C.  Logical or Boolean data can have only one of two values: True or False 
D.  A key field is a piece of data in a database system that is unique to a particular record. 
E.  All the data relating to a single thing or person is called a record 
F.  A record consists of many fields  
G.  A database where the data is held in two or more tables with links established 
between them is called a relational database. 
H.  Flat-file database only contain one table of data 
I.  Relational database have links called relationships between tables 
J.  In order to create a relationship a primary key in one table is linked to the same field 
called a foreign key in the other table 
K.  Flat files may suffer from data redundancy where a lot of the data in the table is 
repeated 
L.  An analogue signal from a temperature sensor will need to be converted into a digital 
signal before it can be processed by a computer 
M.  Changing from an analogue to a digital signal is performed using an analogue to digital 
converter 
N.  In order to control a device such as a motor, a digital signal from the computer will 
need to be changed into an analogue one and this is done using a digital to analogue converter 
 
REVISION QUESTIONS 
1.  Here is a sample of the data that is to be stored in an employee database.  The data 
items shown are the employees' surname, initial, street, postcode, and telephone number 
Ahmed, V, 123 The High Street, L23 6DE, 0151-002-1112 
Delos, N, 64 North Way, L9 8SS, 0151-002-0011 
Doyle, B, 12 Crosby Road, L23 2DF, 0151-002-1212 
Carrol, A, 15 Barkfield Drive, L23 7YH, 0151-002-0899 
Conway, T, 6 Windle Hey, L23 6ER, 0151-003-0899 
Hoch, J 4 Empress Road, L22 7ED, 0151-003-9090 
Hoch, J 4 Empress Road, L22 7ED, 0151-003-9090 
a.  a table is to be set up with four fields.  Give field names for the four fields that 
would be suitable for the above set of data items 
Name, Street Address, Postcode, Telephone Number 
b.  The person who is designing the database looks at the sample of data above 
and notices that there are two people with the same surname and initial who live at the 
same address  
i.  explain why the surname would be an unsuitable key field 
Some people might share the same surname, and can easily alter the things. 
ii.  it is decided that each employee should be given a unique number.  What 
would be a suitable field name for this field? 
User ID 
2.  A store keeps details abut their customers and their orders in an information handling 
system.  Part of the data in this system is shown below: 
CUSTOMER NUMBER  NAME  ITEM CODE  SIZE  COST  DELIVERY 
2314  J. Hughes  464  Small  $290  N 
9819  D. Wong  255  Large  $767  Y 
1311  C. Khled  747  Small  $239  N 
8276  K. Lee  299  Small  $200  Y 
9223  F. Smith  108  Large  $823  Y 
a.  Give the names of two key fields used in the above table 
Customer Number, Name 
b.  there is one "Boolean" field in this database, give the name of it 
Delivery 
c. give the names of two other fields that could be sensibly used in this table other than 
customer name, customer address, and customer telephone number 
Phone number, Address 
d.  The store offers free delivery on all items with a cost greater than $200.  How 
many of the customers shown would qualify for the free delivery? 
4 
3.  Sensors such as temperature, moisture, and light sensors are used to monitor the 
growing conditions in a greenhouse 
a.  explain why computers are not able to read the data directly from these 
sensors 
because the data is analogue which is different from digital 
b.  give the name of the device needed to enable the computer to read this data 
Analogue to digital converter