Databases
Databases
(i) Describe why the database can be considered to be in First Normal Form.
[2]
(ii) Describe why the database can be considered to be in Second Normal Form.
[2]
(iii) Describe why the database can not be considered to be in Third Normal form.
[3]
[2]
[3]
(c) * The hotel is concerned about the security of its computer network.
Discuss the threats which potentially exist to the hotel’s computer network and how these threats could be
eliminated or reduced.
[4]
(ii) Define what is meant by the term ‘foreign key’, giving one example of where a foreign key would be used in
the hotel booking database.
Definition
Example
(iii) Describe two different ways that hashing could be used in this database.
[4]
Explain what is meant by the term ‘referential integrity’ and how this could potentially be broken.
[2]
3 A company sells garden furniture. It has decided to create a relational database. A first, incomplete database
design includes two tables PRODUCT and ORDER.
For example, the product which has ProductId 12345 is a large bench which has a price of £150.
[2]
[4]
The company's technicians keep accurate records of the printers in the building, and the quantity of toner
cartridges in stock, in a flat file database. An extract of the database is shown in Fig. 1.
Fig. 1
Describe two issues, referring to Fig. 1, that might arise from using a flat file database structure.
[4]
For example, the product which has ProductId 12345 is a large bench which has a price of £150.
[2]
Describe the purpose of this code and give one situation in which it may be used.
[5]
A band called RandomBits removes their permission for their songs to be streamed.
The company removes all the songs belonging to RandomBits from their service.
(i) Identify the law with which the company are complying.
[1]
(ii) Write an SQL statement that will remove all songs by RandomBits from the table Song.
[2]
(iii) When the songs have been removed, explain what must happen to the table PlayListEntry if the
database is to retain its referential integrity. (You are not expected to write the SQL to do this).
[1]
State why the table in Fig. 5.1 is not in Third Normal Form.
[1]
(b) Explain how the database could be put into Third Normal Form.
[3]
Discuss how the bank can ensure the accuracy of its data and the importance of doing so.
[9]
Whenever a review is added to the system, the restaurant’s average rating is updated. This transaction is ACID.
Describe what is meant by the term ‘Atomic’ in the context of ACID transactions. You should refer to the example
of a review being added.
[2]
(b) Whenever a review is added to the system, the restaurant’s average rating is updated. This transaction is ACID.
[3]
[2]
(ii) Write an SQL query that finds the name and presenter of all videos on the Topic of “The CPU”.
[4]
(b) The Big Brains exam board has produced a website that allows students to access revision videos.
All pages in the site contain the following tag in the head section.
The exam board wants to use a database to keep track of which videos each student has viewed. The structure
it plans to use is shown below:
(i) Identify one reason why this structure would not be suitable.
[1]
[3]
The forum stores details of its users in the table called Users. An extract of Users is shown below.
1 Zeus 8dfa46a79248037752bba6166fcb34f8 1
2 Hera 74d39d60507eb55e000c6ec5c1265891 0
3 Poseidon b015d770d0208ddcce2c2c719fe29371 0
Describe what is meant by the term ‘primary key’, giving an example from the table above.
[2]
[1]
[2]
[3]
(d)
Sometimes users can have their accounts locked if they behave inappropriately. When this is the case the
locked field is set to 1 rather than 0.
Write an SQL statement that locks the account of the user Hades
[3]
passwordHash and locked have already been extracted from the database before being passed to the
function. It should return the value true if a user should be allowed access to a system and false if they aren’t.
Your function should make use of the pre-written function hash() which takes in a string and returns the hash
of that string.
e.g.
[5]
(b) In certain scenarios the user's IP address is logged in a database.
[2]
(ii) Explain why the programmers have chosen to store the user's IP address.
[2]
State what the value of statement would be after line 03 of the code in Fig. 8 .1 is run.
[1]
(ii) State what the value of hashInDB would be after line 04 of the code in Fig. 8.1 is run.
[1]
The username DenverJ34'; DROP TABLE users; –– is entered into the form.
(i) State what the value of statement would be after line 03 is run.
[1]
[2]
(iii) State the name of a law the user has broken by entering the username
DenverJ34'; DROP TABLE users; --
[1]
[2]
The SQL statement below shows all the data for flights going to Halifax. Rewrite it so it instead removes all
flights to Heathrow on 4th July 2018.
[3]
The page is linked to a style sheet. The message Unauthorised access to this system will be prosecuted is red with a
monospace font. (Note this is the only text on the page that has this formatting)
Write the segment of CSS code that would appear on the style sheet to make the message appear in the way
described.
[3]
(b) Explain the meaning of the HTML line
[2]
Discuss the difference between server and client side processing with respect to webpages. You should refer to
the advantages, drawbacks and best uses of both approaches.
[9]
Total 6
ii e.g. 2
AO1.1
only one point of failure
easier to manage users/access
Easier to backup
Easier to keep data secure.
Technicians can more easily remotely
install / monitor.
0 marks
No attempt to answer the question or
response is not worthy of credit.
Total 30
3 i Unique identifier 2
ProductId identifies a product / OrderId Examiner's Comments
identifies an order
Most students got the “Unique identifier” as
was expected, a few were able to go on
and say what it was used for. Most
candidates were assumed to have not read
the question correctly.
Total 6
Total 4
Total 7
ii 2
(1
mark per –, max 2)
Total 4
c Mark Band 3-High Level (7–9 marks) 2 Answers may include, but are not limited
The candidate demonstrates a thorough to, some of the points below.
knowledge and understanding of
transaction processing. The material is
generally accurate and detailed.
The candidate is able to apply their 3 Consistent: The transaction should only
knowledge and understanding directly and change the database
consistently to the context provided. according to the rules of the database.
Evidence/examples will be explicitly Isolated: Each transaction shouldn’t
relevant to the explanation. affect/overwrite other transactions
concurrently being processed.
The candidate provides a thorough Durable: Once a transaction has been
discussion which is well balanced. started it is remains no matter what
Evaluative comments are consistently happens.
relevant and well-considered. Records should be locked when in use. If
one transaction is amending a record, no
There is a well-developed line of reasoning other transaction should be able to until the
which is clear and logically structured. The first transaction is complete.
information presented is relevant and Transactions should maintain referential
substantiated. integrity. Changes to data in one table
must take into account data in linked
Mark Band 2–Mid Level (4–6 marks) tables.
The candidate demonstrates reasonable Data should have redundancy – if part of a
knowledge and understanding of database is lost it should be recoverable
Total 13
b – Consistency 3
– Isolation AO1.1 Examiner’s Comments
– Durability
(1 mark per -, max 3) Well attempted by most candidates. In
general, candidates either scored three or
zero marks.
Total 5
Total 10
Examiner’s Comments
Well received and answered by most
candidates.
c SELECT passwordHash, locked (1) 3 Do not award first mark for SELECT *
FROM Users (1)
WHERE username=‘Apollo’ (1) (AO 3.2)
Examiner’s Comments
In most cases, candidates who achieved
marks in c) went on to achieve marks in d)
with few candidates achieving all marks in
either. Many candidates did not use correct
SQL statement structure or syntax e.g.
confusing attribute names with string
literals.
Examiner’s Comments
In most cases, candidates who achieved
marks in c) went on to achieve marks in d)
with few candidates achieving all marks in
either. Many candidates did not use correct
SQL statement structure or syntax e.g.
confusing attribute names with string
literals.
Total 15
ii 0e5a511 1
Total 15
Examiner’s Comments
Total 5
The candidate demonstrates a thorough 2 Answers may include, but are not limited
knowledge and understanding of client and to, some of the points below.
server side processing. The material is
generally accurate and detailed.
The candidate is able to apply their 3 Server side processing takes place on the
knowledge and understanding directly and webserver. Data is sent from the browser
consistently to the context provided. to the server, the server processes it and
Evidence/examples will be explicitly sends the output back to the browser.
relevant to the explanation. Client side processing takes place in the
web browser.
The candidate provides a thorough
discussion which is well balanced. AO2.1: Application
Evaluative comments are consistently Client side processing doesn’t require data
relevant and well-considered. to be sent back and forth meaning code is
much more responsive.
There is a well-developed line of reasoning Code is visible which means it can be
which is clear and logically structured. The copied. The browser may not run the code
information presented is relevant and either because it doesn’t have the
substantiated. capability or because the user has
intentionally disabled client side code.
Mark Band 2–Mid Level (4–6 marks) Server side processing takes away the
The candidate demonstrates reasonable reliance of the browser having the correct
knowledge and understanding of client and interpreter. It hides the code from the user,
server side processing; the material is protecting copyright and avoiding it being
generally accurate but at times amended/circumvented. Server side
underdeveloped. processing puts extra load on the server.
This is at the cost of the company hosting
The candidate is able to apply their the website.
knowledge and understanding directly to
the context provided although one or two AO3.3: Evaluation
opportunities are missed. Client side processing is best used when
Evidence/examples are for the most part it’s not critical code that runs. If it is critical
implicitly relevant to the explanation. then it should be carried out on the server.
Client side processing is also best where a
The candidate provides a sound quick response is needed – an example
discussion, the majority of which is being games.
focused. Evaluative comments are for the Server side processing is best used where
most part appropriate, although one or two it is integral that processing is carried out.
opportunitiesfor development are missed. It is often used for generating content. It
can be used to access data including
There is a line of reasoning presented with secure data. For this reason any data
some structure. The information presented passed to it has to be checked carefully.
is in the most part relevant and supported With some things like validation good
by some evidence. practice is to do both: First on the client for
a quick response if there is an issue, then
Mark Band 1-Low Level (1-3 marks) The on the server in case the client side
candidate demonstrates a basic knowledge processing has been circumvented.
of client and server side processing; the
material is basic and contains some
inaccuracies. The candidate makes a
limited attempt to apply acquired
knowledge and understanding to the
context provided.
0 marks
No attempt to answer the question or
response is not worthy of credit.
Total 14