0% found this document useful (0 votes)
121 views32 pages

2.3 Databases PP

A database contains information about past exam papers related to the topic of databases. The document provides examples of questions asked about databases in past exams between 2006-2012. These questions cover topics such as relational databases, key fields, search conditions, validation, sorting records, and protecting private data.

Uploaded by

Imran Muhammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views32 pages

2.3 Databases PP

A database contains information about past exam papers related to the topic of databases. The document provides examples of questions asked about databases in past exams between 2006-2012. These questions cover topics such as relational databases, key fields, search conditions, validation, sorting records, and protecting private data.

Uploaded by

Imran Muhammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Computer Science 2210

Topical Past Papers

Topic: 2.3 Databases


May/June 2006:

1 Explain, using examples where appropriate, the meaning of these computer terms.
(b) relational database [2]

Oct/Nov 2006:
18 A car dealer uses a database to keep details of cars in stock. Part of the stock file is shown
below.

(a) (i) State the fieldname that should be used as the key field.
(ii) Explain the purpose of a key field.
(b) The following search condition is input:
(Price($) < 5000) AND (Model = Golf)
Write down the records that match the above search condition using only RegNo.
(c) Write down a search condition to find cars with an Engine greater than 1400cc or which have
less than 5 Doors.
(d) When a car is sold, the sale needs to be linked to a customer file. Suggest a new field which
could be used to link the stock file to the customer file.

May/June 2007:
7 A hospital has decided to computerise its administration system.
(a) Give three ways this could affect the hospital workers.
The hospital will be using a database which holds confidential personal data.
(b) State two precautions that the hospital should take to prevent unauthorised access to the
data.
(c) Describe how the database could be recovered if it became corrupted.
(d) Give one example, in each case, of when it would be necessary to amend data, delete data
and insert data into the patient database.

Page 1 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2007:
15 A school Science department is going to use a database to record details about its
equipment.
(a) Give two advantages of using a computer system rather than a manual filing system.
(b) Part of the database is shown below:

(i) As data is entered it needs to be verified. Describe one way this could be done.
(ii) Data also needs to be validated. Using fields from the database as examples, describe two
different validation checks which could be performed on the data.

Oct/Nov 2008:

8 To gain access to a database, a user must first type in a user ID and then a password which
needs to be verified.
(a) How is a password usually verified?
(b) In spite of these safeguards, unauthorised access to the database is still possible.
What could be done:
(i) to prevent data being used by unauthorised people?
(ii) to prevent loss of data once the database has been illegally accessed?
(c) Personal data is protected to some extent by a Data Protection Act. Give two requirements of
a Data Protection Act.

Page 2 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


15) A database has been produced showing solar system statistics.

(a) How many records are there in this database?


(b) The following search condition was typed in:
(Number of moons > 0) AND (Diameter (km) < 15000)
Using Name of planet, write down the results of this search:
(c) Write down a search condition to find out which planets have rings or have a diameter more
than 50000 km.
(d) Name a different validation check for each of the following fields.
(i) Maximum surface temperature (0C)
(ii) Name of planet
(e) The data in the database was sorted in descending order using the Number of moons field.
Using Name of planet only, write down the results of this sort.

Page 3 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2009:
13 A radio station keeps a database of all its music CDs. Here is part of this database:

(a) How many records are there in the database section?


(b) If the following query was input:
(CD length (mins) < 60) AND (number of hit tracks > 1)
using Reference Number only, write down which data items would be output.
(c) Write down a query to select which CDs are special edition or have more than 10 tracks.
(d) The database is sorted in descending order on CD length (mins). Using Reference
Number only, write down the order of the records following this sort.
(e) The radio station has a phone-in service where a listener texts the title of the CD on their mobile
phone. The popularity of each CD is then known and which CDs the radio station should play.
(i) How would this information be stored?
(ii) How could this information be linked to the database?

Page 4 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2009:

17 A car sales company uses a database.


Here are three tables from the database:

(a) How many records are shown in the Customer Details table?
(b) (i) Which field connects the New Car Sales table with the Customer Details table?
(ii) Which field connects the New Car Sales table with the Car Manufacturer table?
(c) Give two reasons why List of Extras in the Car Manufacturer table is stored in code form.
(d) A customer goes into the showroom and the salesperson keys in 162154. What fields and
information would be shown on the output screen?
(e) Give one advantage to the car sales company of holding customer information on a
database.

Page 5 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2010 P11:

15 A database has been set up to bring together information about the world’s tallest buildings.
A section of the database is shown below.

(a) How many records are in the section of the database shown?
(b) (b) Using Ref No. only, which records would be output if the following search condition was
entered:
(Year < 1990) AND (Height (m) > 375)?
(c) Write down a search condition to find out how many buildings are in China or how many
buildings have more than 80 floors.
(d) For each of the following fields give a different validation check.
Year
Ref No.
(e) The database was sorted in descending order of Year. Using Ref No. only, write down the
results of the sort:

Page 6 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2010 P12:

11 A database has been set up showing information about cars:

(a) Using Car ref only, write down which cars would be output if the following search condition
was used:
(No of doors = 4) AND (Fuel used (km/litre) > 15)
(b) Write down a search condition to find out which cars have engines larger than 1.8 litres OR
have CO2 emissions higher than 150 g/km.
(c) The database is sorted in ascending order on Fuel used (km/litre). Using Car ref only, write
down the results of the sort.

Page 7 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2010:

10 A database has been set up to store information about aircraft. A section is shown below.

(a) How many fields are in each record?


(b) Using Ref No only, what records would be output if the following search condition was
entered:
(Max Weight(kg) > 350 000) AND (Wing Span(m) < 66)?
(c) Write down the search condition to find out which aircraft have a length greater than 74
metres or have a maximum speed less than 900 kph.

14 An international bank keeps records of customer account details on a computer.


(a) It is necessary on occasions to:
• delete records
• amend records
• insert records
Give one example of when each of the above would need to be done. [3]
(b) A section of one record is shown below:

(i) The branch and country are coded. Give a reason for this. [1]
(ii) One of the six fields is not appropriate.
Name this field and give a reason for your choice. Suggest an improved field.
Name of field
Reason for choice
Improved field choice [3]

Page 8 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2011:

15 A database showing the population of world cities has been produced. A section of the
database is shown below.

(a) How many records are shown above?


(b) Using Ref No only, which records would be found if the following search condition was typed in
(Country = “India” OR Area = “America”) AND (Capital = “No”)
(c) Write a search condition to find the cities in Asia with a city population greater than 17 million
OR an urban population greater than 20 million.
(d) Give one advantage of using Y or N rather than Yes or No in the Capital column.

Page 9 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2012:

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

(a) How many fields are in each record?


(b) The following search condition was entered:
(Melting Point (C) < 40) AND (Atomic Weight > 100)
Using Element Symbol only, which records would be output?
(c) We need to know which elements have an atomic number greater than 50 and are solid at
room temperature.
Write down the search condition to find out these elements.
(d) The data are to be sorted in descending order of Boiling Point (C).
Write down the new order of records using the Element Symbol only.

Page 10 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2012:

11 A database was set up showing the largest ocean-going liners. Part of the database is
shown below.

(a) How many records are shown in the above part?


(b) Using Liner ID only, what would be output if the following search condition was typed in:
(Year built < 2000) AND (Country of Registration = Country of Construction)?
(c) Write the search condition to find out which liners have a gross tonnage larger than 80 000 or
are registered in the UK.

Page 11 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2013:

12 A database was set up to compare oil companies. A section of the database is shown
below:

(a) How many fields are there in each record?


(b) The following search condition was entered:
(No of countries < 30) AND (Head office = “Americas”)
Using Code only, which records would be output?
(c) What search condition is needed to find out which oil companies have a share price
less than $50 or whose profits were greater than 8 billion dollars?

Page 12 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2013:
11 A survey of motorways was carried out and a database was produced. A section of the
database is shown below.

(a) How many fields and how many records are shown?
(i) number of fields
(ii) number of records
(b) Using Motorway ID only, what would be output if the following search condition was used?
(Length (km) > 100) AND (Number of lanes > 3)
(c) What search condition is needed to find the motorways where the number of cars per day
exceeds 50 000 or the toll charge per kilometre is greater than $0.50?

Page 13 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2013 P12:

3 A motor car manufacturer offers various combinations of


• seatcolours
• seat materials
• car paint colours
A database was set up to help customers choose which seat and paint combinations were
possible.

(NOTE: N = no, not a possible combination, Y = yes, combination is possible)


(a) How many records are shown in the database? [1]
(b) The following search condition was entered:
(cloth= “Y”) AND (blue = “Y”)
Using code only, which records will be found? [2]
(c) A customer wanted to know the possible combinations for a car with leather seats and either
silver or grey paint colour.
What search condition would need to be input? [2]
(d) A customer decided to buy a green car. He wanted to know which seat colours and seat
materials were not a possible combination with green paint.
What search condition would he need to enter? [1]
(e) Give one advantage of using the codes Y and N in the database rather than using Yes and
No. [1]

Page 14 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2013 P13:

9 A database was set up to keep track of goods in a shop. A section of the database is shown
below.

(a) How many records are shown in this section of database? [1]
(b) (i) Using Item code only, what would be output if the following search was carried
out:
(Number in stock <Re-order level) AND (Items ordered = “No”) [2]
(ii) What useful information does this search produce? [1]
(c) Write a search condition to locate items costing more than $2.00 or have a stock value
exceeding $300.00. [2]

Page 15 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2014 P11:

3 A hospital holds records of its patients in a database. Four of the fields are:
• date of visit (dd/mm/yyyy)
• patient’s height (m)
• 8-digit patient ID
• contact telephone number
The presence check is one possible type of validation check on the data. For each field, give
another validation check that can be performed. Give an example of data which would fail your
named validation check.
A different validation check needs to be given for each field.

Page 16 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


14 A database was set up showing statistics for some states in the USA. Part of the database is
shown below.

(a) (i) How many records are in this section of the database? [1]
(ii) How many fields are in each record? [1]
(b) The following search condition was entered:
(Population (millions) < 4.0) OR (Number of houses (millions) < 4.0)
Using Ref only, write down which records will be found. [2]
(c) Write down the search condition to find out which states have an area over 100 000 square
miles and where it takes less than 25 minutes to get to work. [2]
(d) (i) What should be the key field in this database? [1]
(ii) Give a reason for your choice.

May/June 2015 P21 (2210)


7 A database, PROPERTY, was set up to show the prices of properties for sale and the features of
each property. Part of the database is shown below.

Page 17 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


(a) Give the number of fields that are in each record.[1]

(b) State which field you would choose for the primary key.
Give a reason for choosing this field.[2]

(c) State the data type you would choose for each of the following fields.
Garage .....................................................................................................................................
Number of Bedrooms .............................................................................................................
Price in $ ..............................................................................................................................[3]

(d) The query-by-example grid below selects all houses with more than 1 bathroom and more
than 2 bedrooms.

(e) Complete the query-by-example grid below to select and show the brochure number,
propertytype and price of all properties with a garage below $200,000.

Page 18 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2015 P22 (2210)

6 A database, MARKS, was set up to record the test results for a class of students. Part of the
database is shown below.

(a) Give the number of fields that are in each record. [1]
(b) State which field you would choose for the primary key.
...................................................................................................................................................
Give a reason for choosing this field. [2]

(c) The query-by-example grid below selects all students with more than 60 marks in History or
more than 60 marks in Geography.

Show what would be output. [2]

Page 19 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


(d) Complete the query-by-example grid below to select and show the student names only of all
students with less than 40 marks in both Maths and English.

Page 20 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2016 P21 (2210)

Page 21 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


6 A database, STAFFPHONE, was set up to show the telephone extension numbers for members of
staff working in a department store.

(a) Explain why none of the fields in the database can be used as a primary key. [2]
(b) State a field that could be added as a primary key.
Give a reason for choosing this field. [2]
(c) Use the query-by-example grid below to provide a list of all members of staff, in alphabetical
order, grouped by department.

[5]

Page 22 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2016 P22 (2210)

Page 23 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


7 A database, SOFASELECT, was set up to show the prices of suites, sofas and chairs for sale from
an online furniture warehouse. Part of the database is shown below.

(a) How many fields are in each record? [1]


(b) State which field you would choose for the primary key.
Give a reason for choosing this field. [2]
(c) State the data type you would choose for each of the following fields.
Number of Seats .....................................................................................................................
Price in $ .............................................................................................................................. [2]

(d) The query-by-example grid below selects all the furniture in cream leather.

Show the output from the query-by-example. [3]


(e) Complete the query-by-example grid below to select and show the brochure number,
material, colour and price of all the furniture with 3 or more seats.

[4]

Page 24 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2015 P23 (2210)

5 A motor boat hire company decides to set up a database to keep information about boats that
are
available for hire. The database table, BOAT, will contain the following fields:
Boat Name; Model; Engine Power (in hp); Number of Seats; Life Raft (whether there is a life raft
kept on the boat); Day Price (price for a day’s hire).
(c) Complete the query-by-example grid below to select and show the Boat Name, Model and
Day Price of a day’s hire for all boats with 4 seats and an Engine Power of more than 100 hp.

Page 25 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases

Page 26 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2016 P22 (2210)

5 A database, PLAYPRODUCTION, was set up to show the performance dates, prices and number
of seats available at a theatre specialising in Shakespeare productions.

Page 27 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases

(a) Give the number of fields that are in each record. [1]

(b) State the data type you would choose for each of the following fields.
Play ..........................................................................................................................................
Number Seats Stalls ...............................................................................................................
Price Stalls Seats $ ............................................................................................................ [3]

(c) The query-by-example grid below selects all the productions with more than 100 seats left in
either the stalls or the circle.

Show what would be output from the query-by-example. [3]

(d) Complete the query-by-example grid below to select all the productions with at least six seats
left in the circle and show the Play, Performance Date and Price Circle Seats $ in Performance
Date order.

Page 28 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases

[5]

Oct/Nov 2016 P23 (2210)

6 A database, THEATRETOURS, was set up to show the tour dates, towns, number of seats and
prices in local currency for a Shakespeare play.

(a) Explain why none of the fields in the database can be used as a primary key. [2]

(b) State a field that could be added as a primary key. Give a reason for choosing this field. [2]

(c) Use the query-by-example grid below to provide a list of tour dates and seat prices in
alphabetical order of town.

[4]

Page 29 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


Oct/Nov 2017 P23 (2210)

6 A database table, TRAIN, is to be set up for a railway company to keep a record of the engine
available for use. Each engine has a unique number made up of 5 digits, nnnnn. The engines are
classified as freight (F) or passenger (P) together with a power classification that is a whole
number between 0 and 9, for example F8. The railway company keeps a record of the date of the
last service for each engine.
(a) Identify the three fields required for the database. Give each field a suitable name and data
type. Provide a sample of data that you could expect to see in the field. [6]
(b) State the field that you should choose as the primary key. [1]

(c) Using the query-by-example grid below, write a query to identify all passenger engines that
have not been serviced in the past 12 months. Only display the engine numbers. [3]

May/June 2018 P22 (2210)

6 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.

Page 30 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases

(a) State the number of fields in the table. [1]


(b) The tree numbering system uses TN followed by three digits. The numbering system will not work
if there are over 1000 trees.
Describe, with the aid of an example, how you could change the tree numbering system to allow
for over 1000 trees. Existing tree numbers must not be changed. [2]
(c) Using the query-by-example grid, write a query to identify at risk trees over 100 years old.
Display only the type and the position on the map.

[4]

Page 31 of 32
Computer Science 2210
Topical Past Papers

Topic: 2.3 Databases


May/June 2018 P21 (2210)
6 A database table, PERFORMANCE, is used to keep a record of the performances at a local
theatre.

(a) State the number of fields and records in the table. [2]

(b) Give two validation checks that could be performed on the Show Number field. [2]
(c) Using the query-by-example grid, write a query to identify jazz performances that are not sold
out. Only display the date and the title.

[4]

Page 32 of 32

You might also like