sample
sample
a) Draw an Enhanced Entity Relationship Modelling diagram for the following fictional
scenario. The diagram should include all relevant entities, relationships, cardinalities,
constraints, super-classes, sub-classes, etc.
Scenario: The Overlook Hotel
The Overlook Hotel is a hilltop, snow-covered retreat located in the Rocky
Mountains. The hotel requires an automated booking system to help manage its
growing visitor numbers. The hotel needs to store the following data on all of their
hotel rooms: room number, room purpose, room size, whether or not Wi-Fi is
available, and price per night. The room purpose must be either bedroom, conference
room or dining room. The room size must be either small, medium or large. Each
bedroom has the following extra data: bed type which can be either single or double.
Each conference room has the following extra data: number of seats and whether or
not a projector is available. Each dining room has the following extra data: number of
tables.
Information is recorded about guests for promotions etc.. Guest information includes
their name, address, and contact number. A unique id is also assigned to each guest.
When a guest makes a booking, the start and end dates for the booking are recorded.
Each booking is automatically assigned a unique booking number. A booking can
refer to one and only one room, and one and only one customer.
(18 marks)
(18 marks)
d) Map the following EER Diagram into a set of relations.
(6 marks)
a) State the three rules that govern whether or not a table is in first, second and third
normal forms.
(10 marks)
b) Convert the following table of data into first normal form, then second normal form,
and then third normal form:
Cinema Location Number Year Owner Owner Movie Movie Number Director
Name of Seats Founded Name Phone Name Category of Shows Name
Psycho Horror 50 Alfred
Deja Jon 051 Hitchcock
Waterford 100 1995
View Marks 1234567 Planet of Sci-Fi 25 Franklin
the Apes Schaffner
2001: A Sci-Fi 100 Stanley
Space of Kubrick
Odyssey
The Mia 021 Psycho Horror 70 Alfred
Cork 150 2000
Diamond Vaughan 9876543 Hitchcock
2001: A Sci-Fi 150 Stanley
Space of Kubrick
Odyssey
Note: For the purposes of this question, you can assume that the cinema names, owner
names, movie names and director names are unique.
(30 marks)
c) The relation CourseTutorBook lists the courses (course) in a college. For a course, there
are any number of tutors and any numbers of books. A book can be used for any number
of courses and a tutor can teach any number of courses. There is no link between the
tutors and the books.
a) What are the objectives of concurrency control? In your answer, discuss the properties
that transactions should adhere to.
(10 marks)
Discuss this statement. In your answer, describe how locking works, and compare
locking with an optimistic concurrency control method.
(20 marks)
c) Compare logical and physical database backups, and discuss the difference between
carrying out an online backup vs. an offline backup.
(20 marks)
(Total for Question 3: 50 marks)
(15 marks)
(Total for Question 4: 50 marks)