ITC556 Sample Exam + Solutions
ITC556 Sample Exam + Solutions
WRITING TIME:
NUMBER OF QUESTIONS:
VALUE:
50%
INSTRUCTIONS TO CANDIDATES:
1. Enter your name and student number and sign the space provided below.
2. This is a closed book examination; therefore no written material, reference books or notes will
be permitted in the examination room.
3. The examination paper, together with all answer booklets, must be returned at the completion
of the examination.
4. Question 1 consists of 20 multiple choice questions, each worth 1 mark. The answers to
these must be marked on the GPAS supplied with a 2B pencil.
5. Questions 2-5 consist of short and long answer questions. The marks allocated to each
question are indicated. Write your answers in the answer booklet provided.
6. You should answer ALL questions.
QUESTION 1
5. Foreign keys
a. must not be null, and go in the table at the many end of a 1 to many
relationship.
b. must not be null, and go in the tables at both ends of a many to many
relationship.
c. can be null, and go in the table at the many end of a 1 to many relationship.
d. can be null, and go in the tables at both ends of a many to many relationship.
INVOICE_NO
PART_NO
INVOICE_NO and PART_NO
There is no primary key
data
files
attributes
relations
13. The transaction log stores information used by the DBMS when processing which
statement:
a.
b.
c.
d.
COMMIT
LOCK
UNDO
ROLLBACK
shared
binary
database
row-level
19. To check for null values in a column, use the following WHERE clause:
a.
b.
c.
d.
Question_no. Answer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
D
B
A
D
C
B
C
C
A
B
B
B
D
B
C
D
C
D
C
D
QUESTION 2
(25 marks)
1. Represent these business rules by means of an Entity Relationship Diagram (10 marks)
QUESTION 3
The table below contains sample data for parts and for vendors who supply those parts. In
discussing this data with users, we find that part numbers (but not descriptions) uniquely
identify parts, and that vendor names uniquely identify vendors.
Source: http://learnline.cdu.edu.au/units/databaseconcepts/module2/normalisation.html
1. Develop a diagram that shows the functional dependencies in the Part Supplier relation
(6 marks).
3. Convert Part Supplier relation to 3rd Normal Form if necessary and show the referential
integrity constraints (6 marks)
QUESTION 4
Answer all questions Each question is worth 4 marks
SOLUTION:
a) SELECT MAX(Price)FROM tbBookingDetails;
b) SELECT COUNT(*) FROM tbBookingDetails WHERE Guest_Name='Barry Staines';
c) SELECT LoginName FROM tbBookings WHERE Status='CONFIRMED' GROUP BY
LoginName ORDER BY
COUNT(*) DESC LIMIT 1;
Question 5
(20 marks)
Generally speaking, a data item can be in only two states: locked (being used by some
transaction) or unlocked (not in use by any transaction). To access a data element X, a
transaction T1 first must request a lock to the DBMS. If the data element is not in use,
the DBMS will lock X to be used by T1 exclusively. No other transaction will have access
to X while T1 is executed.