Database PPQ
Database PPQ
Q1.
A club, AQA Wanderers, wishes to computerise the records of matches played by its first
team so that it can generate statistics on its players. The data requirements are defined
below.
In a season, the club’s first team plays against all opposition clubs’ first teams from the
same division of the league twice, once at home and once away from home. The date of
each match, the start time, opposition team’s name, whether home or away, goals for and
goals against are recorded. Each AQA Wanderers’ player has a player identification
number and their surname, forenames, date of birth, contact telephone number are
recorded.
For each match, fourteen players from a pool of twenty are selected as match players
including three substitutes. The player identification numbers of the selected players are
to be recorded for each match together with the identification number sewn on the shirt
worn (range one to fourteen) so that a player’s first team appearances may be analysed.
The goal scorers of AQA Wanderers, if any, in each match must also be recorded
together with the number of goals scored by each against the opposition. Players one to
eleven start a match but may be substituted by players twelve to fourteen during the
match. For any substitution of an AQA Wanderers’ player by another during a match the
player identification numbers of both are to be recorded.
(a) Using a copy of the partially complete entity relationship diagram shown below as
an aid show the degree of five more relationships which exist between the given
entities.
(5)
Page 1 of 5
(b) A relational database is to be used to record the data for one season so that
statistics on individual players can be produced at the end of the season. Using the
following format
describe tables, stating all attributes, for the following entities underlining the primary
key in each case.
(i) Player
(ii) Match
(iii) GoalScorer
(iv) MatchPlayer
(v) Substitution
Q2.
A bookshop uses a relational database to store details of its stock on a computer system.
Two entities associated with this database are book and publisher. The key field
(identifier) for the publisher entity is the publisher’s name and for the book entity is the
ISBN (International Standard Book Number).
(b) State four attributes in addition to the ISBN and title associated with a book.
Page 2 of 5
(c) Draw a diagram showing the relationship between the book entity and the publisher entity.
(2)
(d) State another entity that could be related to either of these entities. State the
relationship involved and the key field (identifier) for the entity.
Author: 1 to many with books, 1 to many with publishers, key field = AuthorId
(3)
(Total 11 marks)
Q3.
A car showroom uses a computer system to record the purchase and sale of second-hand
cars. The system has a customer file that contains details of the customers and a car file
that contains details of the cars.
Page 3 of 5
(a) Give a suitable key field for
__CustomerId___________________________________________________
_________
(1)
__CarId________________________________________________________
____
(1)
(b) Give six additional fields that would be included in a customer record.
(c) Give six additional fields that would be included in a car record.
(d) Explain how links could be established between the two files.
By creating a new table called CarPurchases, which links the customers which the
details of the cars they purchase.
(2)
(Total 10 marks)
Page 4 of 5
Page 5 of 5