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.
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 ###### ').
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781305627482/9781305627482_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781285196145/9781285196145_smallCoverImage.gif)