Assume the following tables: Student (studid, email, name) Club (clubid, telephone, name, #president) MemberOf(#clubid, #studid ) Activities(actid, actdt, place) Organize (#actid , #clubid , fee), Then answer the following questions by using SQL. 1- Create a stored procedure called 'StudentsActivities' to display the list of students and the activities in which they participated.   2- Create a stored Function called 'Checkavailability' to check whether 'Salalah Hall' is busy or not in a given date.

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter11: Group Functions
Section: Chapter Questions
Problem 18MC
icon
Related questions
Question

Assume the following tables:

Student (studid, email, name)

Club (clubid, telephone, name, #president)

MemberOf(#clubid, #studid )

Activities(actid, actdt, place)

Organize (#actid , #clubid , fee),

Then answer the following questions by using SQL.

1- Create a stored procedure called 'StudentsActivities' to display the list of students and the activities in which they participated.

 

2- Create a stored Function called 'Checkavailability' to check whether 'Salalah Hall' is busy or not in a given date.

 

3- Create a stored Procedure called 'CheckavailabilityProc' to call the function 'Checkavailability' and display the appropriate message according to the value returned by the function (If function returns true, the procedure will display 'Salalah Hall is free on date ######' otherwise'Salalah Hall is busy on date ###### ').

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning