Professional Documents
Culture Documents
CC116 May2020 Online Assignment
CC116 May2020 Online Assignment
CC116 May2020 Online Assignment
Question 1
Scenario
“UCSI Travel” is a worldwide holiday company that maintains its own hotels in a number
of countries around the world. The company uses the following relational database to
manage its own business affairs. The relational database schema consists of relations
such as COUNTRY, REGION, RESORT, HOTEL and FACILITY. These relations are
shown in the descriptions below (please take not of the primary keys are underlined and
foreign key are in emboldened italics):
• A relation about the countries in which the company operates holidays:
COUNTRY ( CountryName string,
Language string,
Currency string,
Continent string,
TimeZone integer )
• A relation about the regions of different countries in which the holiday resorts are
located:
REGION ( RegionName string,
Landtype string,
Scenery string,
CountryName string )
• A relation about the resorts in which hotels are located:
RESORT ( ResortName string,
BeachType string,
NumOfBeaches integer,
RegionName string)
Page 1 of 4
May – Aug. 2020 Online Assessment CC116/CB203 DBMS/DB Systems
The names of most attributes explain what kind of data it is and they hold. Here are a
few explanatory notes for some (not all) attributes to supplement what is implied by their
names.
TimeZone The number of hours the country’s time is before or after USA
time. Assume the same difference in both summer and winter, as
most countries change between winter and summer time on almost
the same date.
Landtype The type of the land associated with a region. Following are some
of the land types:
‘isle’ = Island
‘main’ = Mainland
Rating The number of stars in a hotel’s rating.
Page 2 of 4
May – Aug. 2020 Online Assessment CC116/CB203 DBMS/DB Systems
AvailRooms The number of rooms that are available for booking. The
maximum value of AvailRooms is equal to TotalRooms and the
minimum value is zero.
WebPage The URL of the web page of a hotel.
FacType The facility type. This is either ‘A’ for accommodation or ‘O’ for
other.
Category Within each facility type, there are a number of categories of
facility.
For example, type ‘A’ has the following categories:
‘m’ = Meals
‘c’ = Children
‘b’ = Bedroom
‘a’ = Accommodation
For example, type ‘O’ has the following categories:
‘s’ = Sport
‘e’ = Entertainment
Description This describes each facility. For example, a hotel might have two
‘O’ type facilities with category ‘s’ described as “swimming
pools” and another described as “horse riding”.
BookGuestId This identifies which of the guests made the booking on behalf of a
family or group.
GuestId This identifies any guest.
Status This is used by transactions and identifies the status of the
booking. It can be one of the following values:
‘B’ = Booked
‘A’ = Arrived
‘C’ = Cancelled
‘D’ = Departed/Checked-out
‘P’ = Postponed
Task: The management of “UCSI Travel” requires you to get the answers to the
following queries from their database. In each case, consult the relational database
schema, write SQL statements that returns the required data.
Page 3 of 4
May – Aug. 2020 Online Assessment CC116/CB203 DBMS/DB Systems
(a) Write Data Definition Language (DDL) statements to create all the tables in the
relational database schema. (20 marks)
(b) Write Data Manipulation Language (DML) statements to populate data. Verify
the creation of table (eg. describe COUNTRY) and insertion of data (eg.
SELECT * FROM COUNTRY). You are required to display query results in the
report. (20 marks)
(c) Write SQL statement to display names and beach types of the Spanish island
resorts. Display query results in the report. (10 marks)
(d) Write SQL statement to display names and identifiers of those hotels that have
type ‘O’ facilities. Display query results in the report. (10 marks)
[Total: 60 Marks]
Question 2
(a) Describe what database security is. (5 marks)
(c) Discuss how to prevent ransomware infection to database. [Hint: you can include
good security practices in your answer] (20 marks)
Note: Please ensure all answers for question 2 must be cited with references and
reference list must also be provided. [Total: 40 Marks]
Page 4 of 4