0% found this document useful (0 votes)
15 views6 pages

Dbas Spring 2022 Qp Final

Uploaded by

thanttt257
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)
15 views6 pages

Dbas Spring 2022 Qp Final

Uploaded by

thanttt257
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/ 6

Databases

10 March 2022

Time – Controlled Assessment Paper

Answer ALL questions.

Clearly cross out surplus answers.

Time: 4 hours

The maximum mark for this paper is 100.

Any reference material brought into the examination room must be


handed to the invigilator before the start of the examination.
Answer ALL questions
Marks

Question 1

a) MaxiCosy Hotels is an expanding hotel chain. They are interested in investing in 4


a new database system.

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:

Attribute Name Data Type Key


AccountID Number (Auto increment)
PassengerID
CreditLimit
AllowAlcohol?
RoomID
Password

b) A table representing an entity type Student is shown below: 2

Attribute Name DataType Key


CustomerID Integer (Auto Number) Primary Key
CustomerFName Var Char (25)
CustomerSname Var Char (30)
PhoneNumber Integer

Explain why an Integer would be a poor choice for the Attribute PhoneNumber
and suggest an alternative.

Total 10 Marks

Questions continue on the next page

Page 2 of 6
Databases © NCC Education Limited 2022
Marks
Question 3

Consider the following scenario shown below:

A zoo allows visitors to sponsor an animal. The visitor needs to complete a


sponsorship form.

a) Draw an Entity-Relationship (ER) diagram to represent the following: 5


• A visitor may sponsor one or more animals
• Each animal may be sponsored by more than one visitor.

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

Total 10 Marks

Question 4

a) Consider the ER diagram shown below for a music company. 6


0..N 1

Album Song Artist


1 0..N

Create a CRUD matrix to show the following transactions:

Transaction 1 – Update the song title for an existing album


Transaction 2 – Create a new Artist
Transaction 3 – Create a new song to a new album
Transaction 4 – Produce a list of songs for an album and include the artist
details
Transaction 5 – Delete a song for an existing album
Transaction 6 – Create a new album that includes existing songs

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

Questions continue on the next page

Page 3 of 6
Databases © NCC Education Limited 2022
Marks
Question 5

Consider the following tables:

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.

Questions continue on the next page

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

SmileBrite is a dental surgery that serves over 1000 patients.


A patient may make one or more appointment to see one Dentist. An
Appointment may consist of many Treatments. Each Treatment is of one
Treatment Type.

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

Consider the following table:


CustomerID CustomerName DOB Gender
54 Irfan Shah 12/09/1987 M
78 Sheila Niles 22/02/1984 F
122 Peter Smith 01/01/1976 M

a) Identify an attribute from the table. 1

b) Write out the contents of one tuple. 1

c) What is the degree of the table shown above? 1

Questions continue on the next page

Page 5 of 6
Databases © NCC Education Limited 2022
Marks
d) What is the cardinality of the table shown above? 1

e) Which attribute is likely to be identified as a referential integrity constraint in 1


another (linked) table, such as an Order table?

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

Consider the following ERD:

1 n..n

Customer Order Product


1 n..n

a) Identify two (2) potential problems with the ERD above. 2

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

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