Database and file concepts – A Level Information Technology (9626)
Question text
8
Roger has decided to set up a mail order company. He needs to create a database of customer
records and orders. He is not sure whether to create a flat file database or a relational database.
Explain the differences between a flat file database and a relational database.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
… [8]
Question text
3
A hockey club secretary is planning to computerise the players’ records. For this system she is
considering using custom written software.
(a) Describe the drawbacks of using custom written software.
…
…
…
…
…
…
…
… [3]
(b) Describe the benefits of using custom written software.
…
…
…
…
…
…
…
… [3]
Question text
8
Kelvin was given the task of creating a relational database to combine all his company’s customer
records and sales records (invoices). The tables that were created are shown here.
Customer table
Customer_id
Family_name
First_name
Credit_limit
Loyalty_number
M3764A
408254117150
€1,980
Linda
Burke
N3201B
545687952356
€2,650
Lauren
Charles
N5789A
803226234709
€1,850
Joe
Floyd
L2345A
678914325678
€2,700
John
Hall
Q4012A
384466646362
€3,400
Laura
Jones
L3896C
846869163975
€2,130
Kurtis
Li
M4698B
243375720844
€1,250
Kate
Norfolk
M2589D
385657814001
€3,400
Lotte
Rhodes
M4013B
320031330576
€2,240
Li
Sun Wu
P4352D
322036694448
€2,130
Karla
Watson
P3156C
421536345681
€1,870
Joanne
Williams
Invoices table
Invoice_number
Number_of_items
Item_cost
Customer_ref
Delivered
P4352D
€12.45
8
32178
N5789A
€17.30
6
43189
M4698B
€38.50
4
45237
L3896C
€152.20
1
45964
N3201B
€38.20
3
46579
M2589D
€17.50
5
56931
You can assume that all values shown include the maximum and minimum allowed in each field.
(a) Complete the data dictionary below for the Invoices table. You can assume that all values
shown are typical. All field sizes should be appropriate.
Attribute
Data type
Field size
Format
Type of key
[6]
(b) Kelvin wishes to add a calculated field showing the total cost for each customer.
Describe the steps he would need to follow in order to create this calculated field using a
query without using a wizard.
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
(c) The following data was typed in error. For each item explain how validation could have
prevented the error and explain what would be allowed.
(i)
321789 in the Invoice_number field.
…
…
…
Question text
1
The coding of data refers to using M for male and F for female, for example.
Tick the four most accurate statements regarding the coding of data.
✓
Data becomes easier to interpret
Coding of value judgements is always very accurate
The coding of data saves storage space
Codes cannot be used in a relational database
It speeds up data entry
All data can be coded
There are fewer mistakes when entering data
Codes are not too complicated so there are never any errors on data entry
Validation is easier to perform on data
Coded data makes the computer slower when searching for data
[4]
Question text
6
Louis has partly typed up the notes from his IT lesson. He wants to complete these at home.
Sophia, a fellow student, tells him that it may be difficult as he has been using proprietary software.
Explain what is meant by proprietary and open-source file formats, giving reasons why open-source
file formats are needed.
…
…
…
…
…
…
…
…
…
…
…
… [5]
Question text
7
Relational databases can have many components and properties.
(a) Describe what is meant by the following terms:
(i)
Primary key …
…
…
(ii)
Foreign key …
…
…
(iii)
Compound key …
…
… [3]
(b) Explain why referential integrity is important in a relational database.
…
…
…
…
…
…
…
… [3]
Question text
23
4
16
31/05/2002
Fawzi
Namet
(a) She entered a formula in D4 to calculate the student’s age.
Write down the formula she used. This formula should be easy to replicate.
You can assume for the purpose of this exercise that the number of days in a year averages
out to 365.25.
= … [4]
You can use the space below for any working you need.
(b) (i)
The spreadsheet is to be sorted in ascending order of Age and then descending order of
Number of exams entered for.
Write down the values which would be displayed in D9 and E9.
… [2]
You can use the space below for any working you need.
(ii)
The original spreadsheet is to be sorted in descending order of Age and then ascending
order of Number of exams entered for.
Write down the values which would be displayed in D17 and E17.
… [2]
You can use the space below for any working you need.
(c) A teacher wanted to know the number of students aged 17 taking three exams.
Write down the formula containing a counting function she used in cell G4 to calculate this
number. This formula should work even if the data changes.
= … [5]
You can use the space below for any working you need.
(d) The teacher now wants to know the number of students aged 16 taking four exams.
Write down the formula containing a counting function she used in cell G5 to calculate this
number. This formula should work even if the data changes.
… [3]
You can use the space below for any working you need.
11
A library database consists of one table containing details of all the books in a library and another
table containing details of all the borrowers. Parts of the tables are shown below.
Books table
ISBN
Title
Author
Publisher
ReplacementCost
Clara Olink Kelly
0099445530
The Flamboya Tree
Bow Books
€7.99
Dodie Smith
0099460874
I Capture the Castle
Archaic
€5.99
Philip Pullman
0439977797
The Tin Princess
Panda Books
€5.99
Elizabeth Kim
0553812645
Ten Thousand Sorrows
Welter Books
€6.99
Mary Higgins Clark
0684817306
Kitchen Privileges
Grimon & Custer
€12.99
Simon Singh
1857028899
The Code Book
Quatre Domaine
€8.99
Lee Child
9780593057063
61 Hours
Crossearth Publishers
€18.99
Lee Child
9780593065709
The Affair
Crossearth Publishers
€18.99
Dan Brown
9780593072493
Inferno
Crossearth Publishers
€20.00
Kate Mosse
9780752860558
Sepulchre
Nebula Books
€18.99
James Patterson
9781780892665
Cross Justice
Panda Books
€20.00
Jo Nesbo
9781846558597
Midnight Sun
Panda Books
€9.99
Borrowers table
ID
FamilyName
FirstName
Mobilephone
Residence
Henry
1
Gale
07700 900102
Midtown
Kurtis
2
Brown
01134 960675
Cheswick
Clementine
3
Leadbetter
01144 960975
Chorlton
Christine
4
Hull
07700 900643
Denby
Karla
5
Greenhalgh
08081 570372
Portlarne
Fred
6
Pooley
09098 790876
Midtown
Ben
7
Chalmers
01154 960987
Denby
Christopher
8
Lewis
07700 900152
Denby
Rio
9
Patel
08081 570976
Chorlton
Ruksana
10
Gopaul
03069 990967
Cheswick
(a) You have been asked to create a query which will output only the names and phone numbers
of all the borrowers who have a family name beginning with G and also live in Midtown.
Describe the steps you would have to follow in order to create this query, without using a
query wizard or a parameter query.
…
Question text
8
A car hire company keeps its records in a database consisting of two tables. Parts of these tables
are shown below.
Customer Table
CustomerID
FamilyName
FirstName
Phone
Residence
Angela
11106
Akula
01164 960567
Midtown
Udoka
12481
Onyancha
08081 960965
Cheswick
Wesley
12675
Smith
07700 900863
Portlarne
Lauren
12934
Hall
01134 960675
Chorlton
Billy
12943
Green
01164 960001
Midtown
Trevor
13296
Jones
01134 990694
Chorlton
Wally
13478
Weston
07700 900900
Portlarne
Jasmine
13542
Gunn
08081 570945
Cheswick
Brian
14632
Wells
09098 790142
Larrowby
Ieuan
15692
Williams
01164 960836
Midtown
John
15732
Vercoe
09098 980487
Larrowby
Car Table
ID
Make
Model
Engine
Licence
Price
Rental
CustId
VSE 648
€19,000
Victor
1.8
Olep
€54
12481
1
VTF 384
€19,000
Victor
1.8
Olep
€54
13478
2
BFK 297
€29,000
Fariza
2
Olep
€63
15692
3
SB A5526
€15,000
Cricket
1.4
Folkwagon
€43
14632
4
SA V4428
€15,000
Cricket
1.4
Folkwagon
€43
13296
5
DD B4978
€11,000
Swim
1.2
Folkwagon
€37
15732
6
DD C8634
€11,000
Swim
1.2
Folkwagon
€37
12934
7
B G8347
€19,000
Piano
1.6
Folkwagon
€49
11106
8
12333 CD 33
€17,000
Melanie
1.4
Ranolt
€41
12943
9
6289 XF 54
€11,000
Laine
1.2
Ranolt
€33
13542
10
6301 YU 38
€11,000
Laine
1.2
Ranolt
€33
12675
11
(a) Describe how you would use database features to create a relational database from these
two tables.
…
…
…
…
…
…
…
…
…
… [4]
(b) The manager is carrying out a survey of cars hired in certain areas. She wishes to know
which cars with an engine size under 1.8 litres have been rented by people living in the
Chorlton area. She only wishes to know the full names of the customers, their phone number
and the make of the car.
Complete the grid below to show how the conditions for such a query would be created.
Field:
Table:
Sort:
Show:
Criteria:
or:
[6]
(c) Explain why it would be extremely difficult to validate the Licence field. Include in your
explanation, a detailed description of three validation checks, other than a presence check,
which could normally be used on any alphanumeric field from the database shown on page 8.
…
…
…
Question text
1
Tick the four statements, referring to different types of application software, which are true.
✓
You can use word processing software to create tables of data
You can only use database software to create reports
Spreadsheet software can be used to produce charts
You must always use web authoring software when creating web pages
Financial modelling can involve the use of spreadsheet software
Video editing software cannot be used to edit a music soundtrack
Word processing software can include multimedia features
You can only create data forms using database software
Photo editing software is only used to edit photos
A management information system (MIS) is a form of database management
system
[4]
Question text
7
Mumbai Stores is a company which has a chain of shops. The company stores the customers’
reference number, and the value of the goods they have purchased, in a transaction file. Any
payments the customers have made on their account at the end of the month are also stored in
the same file.
Parts of the Transaction file and Master file are shown.
The Goods_bought field contains only the value of goods bought using the account’s credit
facilities.
The Master file shows the customers reference number, the money they owe from the previous
month (Old_balance) and the money they now owe (New_balance).
The New_balance has to be calculated by using the Old_balance, Goods_bought and any
Payment made. All these values are in rupees.
Transaction file
Master file
Customer_ref_no
Goods_bought
Payment
Customer_ref_no
Old_balance
New_balance
943201
5500
4000
256431
0
256431
3800
3800
319852
10000
319852
9200
10000
433303
5000
433303
3200
5200
590871
4500
590871
4300
6800
599812
0
612759
3700
3700
612759
0
650897
2300
2300
650897
0
698915
4000
6600
678945
6800
751654
4400
4400
698915
2600
804782
5200
8200
712356
5100
751654
0
804782
4200
943201
0
963584
2400
(a) Describe the processes that must happen to the Transaction file before the Master file can be
updated.
. …
…
…
. …
…
… [2]
(b) Using this data, explain how the Master file is updated using the Transaction file shown. You
may assume that the only transaction being carried out is the calculation of the New_balance.
…
…
…
…
…
…
…
…
…
…
…
…
Question text
10 Jasvir owns a gardening equipment hire shop. She has developed a simple database system
which contains information about the equipment. Each record contains the following data:
Equipment_name, Manufacturer, Equipment_code (a six character code), Hire_price, Number_
of_days_hired, Date_hired, Customer_number and Loyalty_customer (Y/N).
Design an appropriate online data entry form for one item of equipment, clearly indicating the
amount of space required for each field. Use the computer screen shown below for your design.
Where appropriate allow the user to enter data by clicking the mouse rather than entering text.
[8]
Question text
10 Below is a database showing a list of details about cars in a showroom.
Reg_No
Make
Model
Doors
Colour
L456 SRA
BMS
2000
7 Green
B648 MAV
Opla
Valiant
7 Green
M452 DQY
BMS
2000
5 Red
M846 RCA
BMS
3000
5 Blue
L678 RTS
Frod
Vic
5 Red
B358 FCD
Opla
Eagle
5 Green
F692 TEC
Opla
Eagle
5 Red
S492 LZR
Opla
Artsa
5 Black
N671 SAE
Vellox
Lemming
5 Black
R762 VDA
Frod
Leo
4 Blue
F457 REW
Opla
Eagle
4 Blue
K789 KNM
Opla
Artsa
4 Blue
X236 BEC
Opla
Eagle
4 Black
Z341 TYU
Opla
Eagle
4 Green
J456 REA
Vellox
Kestrel
4 Black
L423 FRO
Vellox
Lemming
4 Blue
L567 APQ
Vellox
Kestrel
4 Green
To find all Eagle models the search conditions would be Model = “Eagle”.
(a) Using only Boolean operands, comparison operators and wild cards, write down the most
efficient search conditions which would produce lists of:
(i)
Reg_Nos beginning with the letter ‘L’.
…
… [2]
(ii)
Frod cars which are Blue.
…
… [2]
(iii)
Eagles which are Red, Blue or Green.
…
… [3]
(b) Describe how the database has been sorted to produce the one shown.
…
…
…
…
… [2]
(c) Identify, giving reasons, the key field in the database. Give reasons why the other fields are
not suitable.
…
…
…
…
… [2]
Question text
11
Normalisation is often used when converting a set of data into a meaningful database.
Discuss the advantages and disadvantages of normalisation.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
… [8]
Question text
9
People who are employed to develop software often refer to the need for a detailed data dictionary.
Describe the components of a typical data dictionary.
…
…
…
…
…
…
…
…
…
…
…
… [5]
Question text
10 A company provides cars for several leasing organisations in districts of London, in the UK, such
as Enfield or Lewisham.
Agents buy cars from a number of showrooms.
The company buys a car from an agent before then providing it for lease.
The holding company needs to keep a record of:
•
each car
•
which agent bought each car
•
which showroom it came from.
An example of a database for this company in unnormalised (0NF) form is shown below.
Car ID
Make
Model
Agent ID Showroom
Agent
Agent Email
Name
LO01
Lopa
Wolf
001
Jones,
John
[email protected]
Enfield
Hart
FO01
Frod
Squire
002
Morgan,
Carl
[email protected]
Lewisham
Mason
YA01
Yayota Badger 003
Jones,
Joe
[email protected]
Greenwich
Smith
CN01
CNX
Rabbit
001
Lewis,
John
[email protected]
Ealing
Hart
WX01
WX
Gull
001
Jones,
John
[email protected]
Brent
Hart
YA02
Yayota Loaf
002
Evans,
Carl
[email protected]
Lambeth
Mason
FO02
Frod
Peer
003
Evans,
Joe
[email protected]
Lambeth
Smith
LO02
Lopa
Fox
001
Jones,
John
[email protected]
Enfield
Hart
YA03
Yayota Plum
001
Morgan,
John
[email protected]
Lewisham
Hart
CN02
CNX
Chariot 003
Lewis,
Joe
[email protected]
Ealing
Smith
(a) Convert this database to third normalised form by completing the field names for each table
provided.
You are not required to enter any data into the tables.
Cars
Field1
Field2
Field3
Field4
Field5
Agents
Field1
Field2
Field3
Field4
Showrooms
Field1
Field2
Field3
[10]
(b) Complete the relationship diagram below by completing the tables and showing the types of
relationships between them.
In the top cell write the name of the table and write the field names underneath.
Indicate the primary key (pk) for each table and any foreign keys (fk).
[8]