Professional Documents
Culture Documents
Test 1 PT
Test 1 PT
Test 1 PT
SUBJECT COORDINATOR:
Ms. G. Khan (Examiner) Question Student Mark Max. Score
1 4
SUBJECT COORDINATOR:
Ms. E. Zietsman (Examiner) 2 11
LECTURERS: 3 15
Part Time 4 15
Mr. M Marte
5 13
MODERATORS:
6 12
Mr. M. Marte (Internal)
7 --
SPECIAL INSTRUCTIONS: 8 --
Answer all questions.
You may code in pencil. 9 --
REQUIREMENTS: 10 --
An Answer Book is required.
70
%
Development Software III Module A – Procedures, Packages & Functions
Specification
The Elite 500 Club is a very exclusive club that only allows 500 members to the club (you
can become a member by invitation only – and by paying an extravagant entrance and
membership fee). The following tables keep track of the reservations of the dining room
and the orders of the members while dining.
The appendix contains the SQL code used to create the tables. Sample data are also
included.
Only one booking per table is made for a specific day and a member (with guests) may
only book for dinner once a month.
REQUIRED
You are required to create the procedures, functions and packages using
ORACLE PL/SQL statements. Where appropriate use your already defined
procedures and functions in your answers.
QUESTION 1 (4 MARKS)
Create the package ELITE_BODY consisting of all the procedures and functions
in the following questions.
Write a function CHECK_MONTH that checks whether a member has made any
reservation for the current month. It receives the member identification and
reservation date. The function returns true if a member has already made a
reservation for this month otherwise false.
HINT: Use the TO_CAHR and the format MONYY to evaluate the dates.
Write a procedure named RESERVATIONS that print all the reservations for a
specific evening. It receives that date as a parameter. The format of the
report is as follows:
Reservations report
MEM_NR MEM_INITIALS MEM_SURNAME
RES_NR RES_TABLE_ID RES_DATE RES_NR_PEOPLE
RES_NR RES_TABLE_ID RES_DATE RES_NR_PEOPLE
RES_NR RES_TABLE_ID RES_DATE RES_NR_PEOPLE
Appendix
DROP TABLE member;
DROP TABLE tablex;
DROP TABLE reservation;
commit;