Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help using SQL plus or SQL Developer INSTRUCTOR: table [ [ INS _ ID , INS _ FNAME,INS _ SNAME,INS _ CONTACT,INS _
please help using SQL plus or SQL Developer
INSTRUCTOR:
tableINSIDINSFNAME,INSSNAME,INSCONTACT,INSLEVELJames,Willis,Sam,Wait,Sally,Gumede,Bob,Du Preez,Simon,Jones,
CUSTOMER
tableCUSTIDCUSTFNAME,CUSTSNAME,CUSTADDRESS,CUSTCONTACTCHeinrich,Willis, Main Road,CDavid,Watson, Cape Road,CWaldo,Smith, Mountain Road,CAlex,Hanson, Circle Road,CKuhle,Bitterhout, Main Road,CThando,Zolani, Summer Road,CPhilip,Jackson, Long Road,Sarah,Jones, Sea Road,CCatherine,Howard, Lake Side Road,
DIVE:
tableDIVEIDDIVENAME,DIVEDURATION,DIVELOCATION,DIVEEXPLEVEL,DIVECOSTShark Dive, hours,Shark Point,Coral Dive, hour,Break Point,tableWaveCrescent hours,Ship wreck ally,tableUnderwaterExploration hour,Coral ally,tableUnderwaterAdventure hours,Sandy Beach,tableDeep BlueOcean minutes,Lazy Waves,Rough Seas, hour,Pipe,White Water, hours,Drifts,tableCurrentAdventure hours,Rock Lands,
DIVEEVENT:
tabletableDIVEEVENTIDDIVEDATE,DIVEPARTICIPANTS,INSIDCUSTIDDIVEIDdeJULCdeJULCdeJULCdeJULCdeJULCdeJULdeJULCdeJULCdeJULC
Question
create the tables and
populate the tables
Question
Marks:
TASK: Segregation of Duties.
As a first in setting up controls to ensure the security of the system and data, you are required to create two user roles for the database as follows:
An administrator user
General user of the system
Use any user names to distinguish and set up users. Determine the privileges required for each role. Make use of comments to highlight the choices and assumptions made.
Question
Marks:
TASK: Query the number of Participants.
Using SQL only, display the instructor's and customer's full names, including the location and number of participants attending a dive with a participation of between and individuals.
Question
Marks:
TASK: Query the dives with more participants
Using PLSQL display the dive name and the allocated date. In your query, only display the dive events that have or more participants.
Question
Marks:
Task: Query the number of Instructors required.
ADC would like to enforce a new policy which will need to be implemented as follows:
For a dive with or less participants, only instructor will be required.
For a dive with and up to participants, instructors will be required.
For a dive where or more participants are registered, instructors will be allocated.
Using PLSQL create a report which shows the customer's full name, the dive event name and the dive participants for any dive that costs over R In your query, display how many instructors are required for the dive.
Make use of at least appropriate Cursor attributes in the Declaration part of the cursor.
Question
Marks:
TASK: Create View
Management would like the receptionist to be able to query the database without having full access to it You are required to provide a functionality for this using a View called VwDiveEvent that will display the instructor ID customer ID customer address and dive duration for any dive occurring before the July
Question
Marks:
TASK: Create Trigger
Create a trigger called NewDiveEvent that will prevent an entry into the dive event table that has or less participants and also more than participants. In your query, also display the codes to test the trigger on all conditions.
Question
Marks:
TASK: Create Stored Procedure
Create a procedure called spCustomerDetails that will accept a customer ID and dive date as input parameters and will display the customer and dive name booked for the particular date.
In your solution, display the data for any customer and provide the code to execute the procedure with an exception handling if no customer is found.
Sample Result Format:
CUSTOMER DETAILS: Heinrich Willis booked for the Current Adventure on the JUL
Question
Marks:
TASK: Create a Function
Create a meaningful function for the company. The function should accept an input parameter and add perform a calculation on the data, with relevant
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started