ADVBS Exam Paper
ADVBS Exam Paper
QUESTION 1
a) Based on the scenario below, draw Extended Entity Relationship (EERD) using
chen’s or crow’s foot notation.
In a university, a person can be either be a staff or student or both at the same time,
however the person cannot just be a person (not belong to staff and/or student).
Each staff must either be a full timer or part timer but not both at the same time. A
student may be a graduate or undergraduate but not both at the same time, however
the student can just be a student (not a graduate or undergraduate) if he/she enrols
in program such as certification / professional course.
(20 marks)
b) Discuss and differentiate the roles and responsibility of a data administrator (DA) and
database administrator (DBA)
(10 marks)
(Total: 30 marks)
QUESTION 2
An online gadget store which sells various mobile and computer hardware is looking into
the possibility of investing in data mining applications but is unsure of the potential
benefits and issues brought about by such applications. The gadget store already had a
huge repository of data stored in a data warehouse, but this data is yet to be put into good
use.
The gadget store has requested your expertise as a database consultant to shed some light
in this area. Your presentation to the gadget store management should address the
following aspects:
a) Describe TWO (2) characteristics of the data stored in the data warehouse; and how
do they differ from the data in the transaction database?
(10 marks)
b) Discuss TWO (2) area where data mining could be applied to benefit the gadget store.
(10 marks)
(Total: 20 marks)
QUESTION 3
a) Given the authorization table, write SQL to grant access rights to each user.
Privilege on Users
Product Table Helen Tony Peter
Read Yes Yes Yes
Insert No No Yes
Modify Yes Yes Yes
Delete No Yes Yes
Grant No Yes Yes
(11 marks)
b) Consider the interleaved transaction schedule below which suffers from a concurrency
control problem:
Time Transaction1 Transaction2 Balance (X)
1 begin_transaction 100
2 read(X) 100
3 X=X*2 100
4 begin_transaction write(X) 200
5 read(X) … 200
6 X=X+ 20 … 200
7 write(X) … 220
8 commit … 220
9 rollback 100
Assess the schedule above. Identify, name and describe the problem affecting it.
Suggest a solution to the problem.
(10 marks)
c) Explain the difference between shared lock and exclusive lock which are used in
concurrency control technique.
(4 marks)
(Total: 25 marks)
QUESTION 4
Consider the following tables which are a part of a football clubs database:
Based on the tables above, write SQL queries for the following requirements:
a) Create a stored procedure to count how many active members in a particular club, the
club name will be the input to the stored procedure.
(10 marks)
b) Create a trigger to prevent the deletion of a player, instead change the player’s status
to ‘inactive’.
(10 marks)
(5 marks)
(Total: 25 marks)