0% found this document useful (0 votes)
26 views16 pages

DBAS MS Autumn 2021 FINAL

The document outlines a marking scheme for a database examination, providing guidance for markers on how to evaluate student responses. It includes specific questions related to entity relationship diagrams, data types, SQL queries, and normalization processes, along with suggested answers and marking criteria. The document emphasizes the importance of recognizing valid alternative answers and the correct application of database concepts.

Uploaded by

Thaung Naing Soe
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)
26 views16 pages

DBAS MS Autumn 2021 FINAL

The document outlines a marking scheme for a database examination, providing guidance for markers on how to evaluate student responses. It includes specific questions related to entity relationship diagrams, data types, SQL queries, and normalization processes, along with suggested answers and marking criteria. The document emphasizes the importance of recognizing valid alternative answers and the correct application of database concepts.

Uploaded by

Thaung Naing Soe
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/ 16

Databases

07 September 2021

Marking Scheme

This marking scheme has been prepared as a guide only to markers. This is not a set of
model answers, or the exclusive answers to the questions, and there will frequently be
alternative responses which will provide a valid answer. Markers are advised that, unless a
question specifies that an answer be provided in a particular form, then an answer that is
correct (factually or in practical terms) must be given the available marks.

If there is doubt as to the correctness of an answer, the relevant NCC Education materials
should be the first authority.

Throughout the marking, please credit any valid alternative point.

Where markers award half marks in any part of a question, they should ensure
that the total mark recorded for the question is rounded up to a whole mark.
Answer ALL questions
Marks
Question 1

a) A library loans out books to borrowers. The Entity Relationship Diagram (ERD) 4
below contains a MANY-TO-MANY(M:M) relationship. Redraw the ERD to remove
the M:M. Explain the process you have undertaken.

M:M

Borrower Book
M:M
1

Mark Scheme

Suggested Answer:

Introduced a new entity Loan (or equivalent)


The new entity allows a borrower to borrow many books and reduced data
duplication from the borrowers details and the book details having to be
repeated

0..N 1

Borrower Loan Book


1 0..N

1 mark for new entity and 0.5 mark for each cardinality
1 mark for explanation that borrower details needs only be captured once
and that book details need only be captured once as the new entity links to
the other with foreign keys

Any alternative explanation

Page 2 of 16
Databases © NCC Education Limited 2021
Marks
b) Identify FOUR (4) types of records/entities a Cruise Liner company might store 4
data about.

Mark Scheme

Boats/Cruise Liners (1)


Cruises (1)
Staff (1)
Passengers (1)
Bookings (1)

Any one of the above (up to a maximum of 4) or any other suitable alternative
eg Payroll etc

Any suitable alternative / Fields alone do not count / maximum 4 marks

c) Draw an ERD that matches the tables below. You must show the cardinality. 2

tblCustomer
CustomerID CustomerName CustomerTelNo CustomerDOB

tblOrder
OrderID OrderDate OrderDetails Cost CustomerID

Mark Scheme

1 mark for each correct entity with correct cardinality to max of 2

0..N

Customer Order
1

Total 10 Marks

Page 3 of 16
Databases © NCC Education Limited 2021
Marks
Question 2

a) The following table is in Third Normal Form (3NF). Suggest appropriate data types 8
and keys (if applicable) for the attributes listed.

Attribute Name Data Type Key


ServiceID Number (Auto increment) Primary Key
CustomerID
CarRegNo
DateOfService
ServiceNotes
CostOfService

MechanicID

Mark Scheme

Attribute Name Data Type Key


ServiceID Number (Auto increment) Primary Key
CustomerID Number Foreign Key
CarRegNo Text/String Foreign Key
DateOfService Date
ServiceNotes Text
CostOfService Currency
MechanicID Number Foreign Key

1 mark for each correct / appropriate data type used (character length is not
required for the mark to be awarded). CustomerID and MechanicIDs should
be identified as a foreign key (1 mark for each one) or (alternative) CarRegNo
could be FK to Car Entity Type

b) Explain and justify your choice of datatype for CustomerID and MechanicID 2

Mark Scheme

CustomerID should be a foreign key as it should link to the primary key in


the Customer table (1)
MechanicID should be a foreign key as it should link to the primary key in the
Mechanic table (1)

Total 10 Marks

Page 4 of 16
Databases © NCC Education Limited 2021
Marks
Question 3

Consider the following scenario shown below:

WoofDays is a doggy day care centre. It allows owners of dogs to book in their dog for
someone to look after them. There are three different charges:
Full day (8am – 5pm) is £15 per day,
Morning (8am-12.30pm) is £8 per session,
Afternoon (12.30pm-5pm) is £8 per session.

a) Draw an ERD to represent the above scenario. 5

Mark Scheme
0..N 1

Pet(Owner Booking Rate


1 0..N
etc)

• 1 mark for each correct entity, to a maximum of 3 marks.


• 1 mark for each correct relationship, to a maximum of 2 marks (0.5 for
each correct notation).

b) Identify all of the primary and foreign keys for the ER model in question 3a). 5

Mark Scheme

Pet/Owner Table
Pet(owner) ID or anything appropriate (PK)

Booking Table (or equivalent)


BookingID(PK)
OwnerID (or equivalent) FK
RateID (or equivalent) FK

Alternative could be OwnerID/RateID as compound key

Rate/Charges Table
RateID (or equivalent) PK
• Award 1 mark for each (PK), to a maximum of 3 marks.
• Award 1 mark for each (FK) – to a maximum of 2 marks (or as CK)
• Alternative naming allowed.

Total 10 Marks

Page 5 of 16
Databases © NCC Education Limited 2021
Marks
Question 4

a) The ERD below represents an equipment hire system through which customers 5
can hire equipment for 1, 3 or 5 days.
0..N 1

Customer Hire Equipment


1 0..N

Create a CRUD matrix to show the following transactions:

Transaction 1 – Add a new piece of equipment


Transaction 2 – Change the hire duration for an existing customer
Transaction 3 – Produce a list of all equipment that has ever been hired out
Transaction 4 – Delete a hire agreement
Transaction 5 – Add a new hire agreement for a new customer

Mark Scheme

Transaction
T1 C
T2 R U
T3 R R
T4 D
T5 C C R

1 mark for each correct row in a table, similar to the one shown above.
Maximum 5 marks (award part marks for part correct solutions, round up
final mark for question).

b) Write the SQL that will create a new table to hold items that are held in a vending 5
machine. The items will be Location Number, Item Name and Price. The Location
Number will be the unique identifier.

Mark Scheme

CREATE TABLE tblVending (1 mark)


LocationNumber int NOT NULL AUTO_INCREMENT (1 mark)
Item Name char (30) (1 mark)
Price decimal (5,2) (1 mark) (alternative currency)
PRIMARY KEY (LocationNumber) (1 mark)

Alternative names allowed – maximum 1 mark per line to max of 5

Total 10 Marks

Page 6 of 16
Databases © NCC Education Limited 2021
Marks
Question 5

Consider the following tables:

tblBakeryItem
BakedID BakedName Price Type
1 Apple Pie £1.49 Sweet
2 Cheese Pasty £1.15 Savoury
3 Danish Whirl £0.89 Sweet

tblIngredients
IngredientID BakedID ItemID
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 2 2
7 2 4
8 2 7
9 2 8

tblItems
ItemID ItemName ItemQty Shelf Life
1 Cooking Apples 5 10
2 Flour 100 100
3 Sugar 85 100
4 Butter 60 50
5 Eggs 250 15
6 Cinnamon 12 100
7 Cheese 90 50
8 Onion 22 15

a) Write the SQL that will list all of the names and prices from the Bakery Items table 3
in price ascending order.

Mark Scheme

Suggested Answer:

SELECT BakedName, Price (1 mark)


FROM tblBakeryItem (1 mark)
OrderBy by Price ASC; (1 mark)

Page 7 of 16
Databases © NCC Education Limited 2021
Marks
b) Write the SQL that will list all the details of the items that are needed to create an 4
Apple Pie.

Mark Scheme

Suggested Answer:

SELECT ItemName (1 mark)


FROM tblItems (1 mark)
WHERE tblingredients.itemID = tblItems.ItemID (1 mark)
AND tblBakeryItem.BakedName = “Apple Pie”; (1 mark)

c) Write the SQL that will change the Apple Pie and Danish Whirl types from Sweet to 3
Pastry Treat.

Mark Scheme

Suggested Answer:

Update tblBakeryItem (1 mark)


Set Type “Pastry Treat” (1 mark)
WHERE Type = “Sweet”; (1 Mark)

Total 10 Marks

Question 6

a) Consider the following table:

tblRooms

RoomID RoomDescription RoomType Price_Per_NIght


12 Double room Standard £109.99
76 Double room Executive £149.99
112 5 person executive suite Executive £224.99
119 Single room Standard £79.99

i) Write the SQL statement that will delete all of the data held for rooms where 3
the price is under £80.

Mark Scheme

DELETE from tblRooms (1 mark)


WHERE Price_Per_Night (1 mark) < 80; (1 mark)

Page 8 of 16
Databases © NCC Education Limited 2021
Marks
ii) Write the SQL statement that will add a new record in the table tblRooms 4
to accommodate the following:

178 Single Room Executive £109.99

Mark Scheme

Suggested Answer

INSERT INTO (1 mark) tblRooms (1 mark)


VALUES (1 mark) (“Single Room”,”Executive”, £109.99); (1 Mark)

Marks awarded for correct syntax and correct table and field names to
maximum of 4. Partial fields don’t attract any marks

iii) Write the SQL that will count all the entries for the standard room type. 3

Mark Scheme

Suggested Answer:

SELECT COUNT(*) (1 Mark)


FROM tblRooms (1 Mark)
WHERE RoomType = “Standard”; (1 Mark)

Total 10 Marks

Page 9 of 16
Databases © NCC Education Limited 2021
Marks
Question 7

Airesdale is a local hospital that cares for patients who need to stay for anything from 1 to
15+ days. When admitted to hospital each patient is assigned a bed. The admission detail
identifies the patient, the date they were admitted and a brief overview of the reason of
admission. The assigned bed can only be occupied by one patient at any one time so the
hospital must keep track of this. A bed is part of a ward and there are currently 6 named
wards at the hospital. A ward may contain anything between 1 and 24 beds.

a) aCreate an ERD to represent the scenario above. Ensure you identify the type of 7
)relation that exists between entities (e.g. 1:1, 1:M, etc)

Mark Scheme

Model answer:
A suggested ER model is below:

0..N 1

Patient Admission Bed


1 0..N

0..N
1

Ward

1 mark for each correct entity to maximum of 4


0.5 mark for each correct cardinality to maximum of 3 marks

Page 10 of 16
Databases © NCC Education Limited 2021
Marks
b) For each of the entities identified create a data dictionary using the template below. 13
It is expected that there will be multiple entries for each entity. You should make
suitable assumptions about the attributes you would expect for each entity.

tblName
AttributeName Data Type Length/Field Size Key

Suggested Mark Scheme

tblPatient
AttributeName Data Type Length/Field Size Key
PatientID AutoNumber Primary
PatientF_Name String 25
PatientS_Name String 15
DOB Date 20
Gender String 1

tblAdmission
AttributeName Data Type Length/Field Size Key
ID AutoNumber Primary
PatientID Number/Integer Foreign Key
BedID Number/Integer Foreign Key
AdmissionDate Date
DischargeDate Date
Admission String 255
notes

tblBed
AttributeName Data Type Length/Field Size Key
BedID Autonumber Primary
WardID Number Foreign

tblWard
AttributeName Data Type Length/Field Size Key
WardID Autonumber Primary
WardName String 55 Foreign

Expectations and grading guidance:

KEYS: Would expect to see all relevant primary / foreign keys


(maximum 5 marks) award 1 mark for each correct key to max of 5

Award a max of 2 marks per table for appropriate data types and length (at
your discretion) to maximum of 8 marks

Total 20 Marks

Page 11 of 16
Databases © NCC Education Limited 2021
Marks
Question 8

The Indoor Crazy Golf Company want to computerise their manual booking system. A
sample booking form is shown below.

Indoor Crazy Golf Company


Booking form

Lead Name: Imelda Smith Contact No: 018901112987


No. adults in group: 4 No. children in group: 2 No. Over 65s: 1
Session Date: 12/8/2021 Session Time: 2pm

Session Prices (Each session lasts for 2 hours)


Session Price: £5 per adult, £3 per child, £4 per Over 65s

Total Price: £30

Booking taken by: Andrew Brown

Using the information supplied in the form, create a database design to 1NF. 10

You must go through the normalisation process, clearly identifying UNF and 1NF
stages.

For each stage of normalisation state the rules of normalisation you have applied.

Page 12 of 16
Databases © NCC Education Limited 2021
Marks
Mark Scheme

UNF 1NF
Lead Name BookingID
Contact No CustomerID
AdultQty SessionDate
ChildQty SessionTime
OAPQty AdultQty
SessionDate ChildQty
SessionTime OAPQty
StaffName StaffName
TotalCost

CustomerID
LeadName
Contact No

UNF – list all of the fields taken from the document


1 mark for explanation
4 marks for identification of data fields (roughly 0.5 marks per identified data
items)

1NF
Up to 2 marks for general explanation (1 mark per point)
- Create groups of repeating / no repeating data
- Assign primary key for each group

1 mark for Primary Key of Booking ID (or alternative)


1 mark for CustomerID (or alternative)
1 mark for CustomerID in the booking table as FK

Total 10 Marks

Page 13 of 16
Databases © NCC Education Limited 2021
Marks
Question 9

Vegan Delights is a popular café and restaurant selling a wide selection of homemade 10
vegan dishes.
The owners think that a computerised database system might help them with many
aspects of the business.
They have asked you to produce a list of advantages and disadvantages of investing in
a computerised database system specific to their business.

Identify and explain FIVE (5) advantages and FIVE (5) disadvantages of a
computerised database system for Vegan Delights.

Mark Scheme

Suggested answer:

Students should clearly identify 5 separate advantages and disadvantages of


how a database system might help their business. Each
advantage/disadvantage should have some explanation / justification.

Each point is awarded with .5 mark and .5 for the explanation / justification to
maximum of 5 marks for the advantages and 5 marks for the disadvantages.

Answers must be specific to the business type.

Disadvantages may include:


Cost of implementation – initial set-up costs
Complexity / users might not be computer literate – staff will need to learn how to
use the system
Risk of failure e.g. if staff forget back-ups and there’s a flood / fire etc
Requirement of technical staff for updates etc
Update / replacement costs – software / hardware will need updating at times

Advantages may include:


Improved data sharing – information available to more users at one time – e.g.
kitchen staff / waitress staff etc
Improved data security – confidential information will only be available to
authorised users
Better data integration – easy to see the big picture / sales / ordering / stock /
payroll etc
Better data consistency – prices can be updated just once/ calculations of bills
instant and correct
Easier business monitoring (various reports)

Total 10 Marks

End of paper

Page 14 of 16
Databases © NCC Education Limited 2021
Learning Outcomes matrix

Question Learning Outcomes Marker can differentiate


assessed between varying levels of
achievement
1 2,3 Yes
2 3,4 Yes
3 2,3 Yes
4 4 Yes
5 3,5 Yes
6 3,5 Yes
7 3,4 Yes
8 3,4 Yes
9 1 Yes

Grade descriptors
Learning Fail Referral Pass Merit Distinction
Outcome
Understand Has little to no Has vague Has Has very good Has an excellent
the concepts awareness of awareness of satisfactory awareness of awareness of
associated principles and principles and awareness of principles and principles and
with concepts concepts principles and concepts concepts
database underlying underlying concepts underlying underlying
systems theoretical theoretical underlying theoretical theoretical
frameworks frameworks theoretical frameworks frameworks and
and and frameworks and approaches and
approaches approaches and approaches is
and is unable and is only approaches and is able in comprehensively
to identify superficially and detail to able to identify
associated able to identify demonstrates identify associated
strengths or associated sufficient ability associated strengths and
weaknesses. strengths or to identify strengths and weaknesses.
weaknesses. associated weaknesses.
strengths and
weaknesses.
Understand Has little to no Has vague Has Has very good Has an excellent
the concepts awareness of awareness of satisfactory awareness of awareness of
associated principles and principles and awareness of principles and principles and
with the concepts concepts principles and concepts concepts
relational underlying underlying concepts underlying underlying
model theoretical theoretical underlying theoretical theoretical
frameworks frameworks theoretical frameworks frameworks and
and and frameworks and approaches and
approaches approaches and approaches is
and is unable and is only approaches and is able in comprehensively
to identify superficially and detail to able to identify
associated able to identify demonstrates identify associated
strengths or associated sufficient ability associated strengths and
weaknesses. strengths or to identify strengths and weaknesses.
weaknesses. associated weaknesses.
strengths and
weaknesses.
Understand Demonstrates Demonstrates Demonstrates Demonstrates Demonstrates an
how to little to no an extremely a satisfactory a very good excellent ability to
design and ability to limited ability ability to use ability to use use design
develop a adequately to adequately design design principles to

Page 15 of 16
Databases © NCC Education Limited 2021
Marks
database use design use design principles to principles to effectively
system principles to principles to effectively effectively develop an
effectively effectively develop an develop an artefact to solve
develop an develop an artefact to artefact to an identified
artefact to artefact to solve an solve an issue.
solve an solve an identified identified
identified identified issue. issue.
issue. issue.
Be able to Demonstrates Demonstrates Demonstrates Demonstrates Demonstrates an
develop a little to no an extremely a satisfactory a very good excellent ability to
logical ability to limited ability ability to use ability to use use design
database adequately to adequately design design principles to
design use design use design principles to principles to effectively
principles to principles to effectively effectively develop an
effectively effectively develop an develop an artefact to solve
develop an develop an artefact to artefact to an identified
artefact to artefact to solve an solve an issue.
solve an solve an identified identified
identified identified issue. issue.
issue. issue.
Be able to Demonstrates Demonstrates Demonstrates Demonstrates Demonstrates an
develop a little to no an extremely a satisfactory a very good excellent ability to
database ability to limited ability ability to ability to develop an
system using adequately to adequately develop an develop an artefact to solve
SQL develop an develop an artefact to artefact to an identified
artefact to artefact to solve an solve an issue.
solve an solve an identified identified
identified identified issue. issue.
issue. issue.

Page 16 of 16
Databases © NCC Education Limited 2021

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy