Dbas Spring 2022 Qp Final
Dbas Spring 2022 Qp Final
10 March 2022
Time: 4 hours
Question 1
Explain FOUR (4) ways that MaxiCosy Hotels will benefit from a database
system.
b) The DBMS environment includes both Hardware and Software. Distinguish the 2
difference between Hardware and Software.
c) Identify FOUR (4) tables/entities a Football Club might use to store data. 4
Total 10 Marks
Question 2
a) The following table is in Third Normal Form (3NF). Suggest appropriate data 8
types and keys (if applicable) for the attributes listed:
Explain why an Integer would be a poor choice for the Attribute PhoneNumber
and suggest an alternative.
Total 10 Marks
Page 2 of 6
Databases © NCC Education Limited 2022
Marks
Question 3
b) Identify all of the primary and foreign keys for the ER model in question 3a). 5
Total 10 Marks
Question 4
b) Describe a CRUD matrix and explain how it is useful when writing SQL. 4
You need to explain FOUR (4) points for full marks.
Total 10 Marks
Page 3 of 6
Databases © NCC Education Limited 2022
Marks
Question 5
tblProperty
PropertyID Address1 Town PostCode Price
101 15 Lawson Bridgeton BR1 8GH £125,000
Drive
102 90a Beston Leighview LA8 1TR £167,000
Court
103 2 Hampton Nightsville NV12 8AQ £225,000
Lane
104 116 Meadow Bridgeton BR8 1TY £215,000
Road
105 43 Barn Lane Leighview LA1 9LT £199,000
tblViewing
ViewingID PropertyID ViewerID ViewingDateTime
1 102 81 12/03/2022 11:00
2 105 80 11/03/2022 14:00
3 105 81 11/03/2022 16:00
4 103 83 10/03/2022 10:00
tblViewer
ViewerID ViewerName ContactNo
80 Amy Patel 081114543
81 Darren Hewitt 078128761
82 Lisa Nudge 079191765
83 Orlando Leggit 080109182
a) Write an SQL statement that will delete the 15 Lawson Drive property. 2
b) Write an SQL statement that will update the ContactNo for Amy Patel to 3
071128983.
c) Darren Hewitt would like to view 90a Beston Court on 12 March 2022 at 12:30. 3
Write an SQL statement that will add the above details to the tblViewing table.
d) Write an SQL statement that will add a new field into the tblProperty table called 4
Status which will hold text of no more than FIFTEEN (15) characters.
Page 4 of 6
Databases © NCC Education Limited 2022
Marks
e) Write the SQL statement that will Create the following table and add the data 8
below to the newly created table.
tblOffers
OfferID PropertyID ViewerID Offer
1 102 81 £165,000
2 105 80 £190,000
Total 20 Marks
Question 6
If any treatment is required this has to be recorded, with the treatment type, the
price and the details of the tooth that requires work. The price of the treatments
depends on the type of treatment given. For example Treatment types can have
values of extraction, filling, root canal, crown, bridge, clean etc.
a) Create an ERD to represent the scenario above. Ensure you identify the type of 9
relation that exists between entities (e.g. 1:1, 1:M, etc).
b) Select any THREE (3) entities and create a data dictionary using the template 11
below. It is expected that there will be multiple attributes/fields for each entity.
Ensure you clearly identify each entity selected.
tblName
Attribute Name Data Type Length/Field Size Key
Total 20 Marks
Question 7
Page 5 of 6
Databases © NCC Education Limited 2022
Marks
d) What is the cardinality of the table shown above? 1
f) Domain constraints are user-defined columns that help the user to enter the value 4
according to the data type.
Give TWO (2) different examples of domain constraints and explain your choice.
g) From the table at the top of this question, suggest an attribute that could be made 1
into an atomic attribute.
Total 10 Marks
Question 8
1 n..n
b) Re-draw the ERD so that it rectifies the problem you identified above. 4
Define the relationships between entities and add the cardinality.
c) Identify suitable attributes for any new entities in your ERD. State any 4
assumptions that you have made.
Total 10 Marks
End of paper
Page 6 of 6
Databases © NCC Education Limited 2022