Write a stored procedure to get the head count
First you define a stored procedure in database_4 namedgetNumbers. This procedure takes department name as input, andreturns the number of instructors and the number of students in thedepartment as outputs. In other words, getNumbers() has one inputparameter and two output parameters. Test this procedure in MySQLto make sure it functions properly. Next, your application programasks the user to enter a department name (e.g., “Comp. Sci.”), andthe program should return the number of instructors and the numberof students in the department accordingly
database_4:
classroom(building,room number, capacity)
department(dept_name,building, budget)
course(course id,title, dept_name, credits)
instructor(ID, name,dept_name, salary)
section(course_id,sec_id, semester, year, building, room_number, time_slot_id)
teaches(ID, course_id,sec_id, semester, year)
student(ID, name,dept_name, tot_cred)
takes(ID, course_id,sec_id, semester, year, grade)
advisor(s_ID,i_ID)
time_slot(time_slot_id, day, start_hr, start_min, end_hr,end_min)
prereq(course_id,prereq_id)
Expert Answer
Answer to Write a stored procedure to get the head count First you define a stored procedure in database_4 named getNumbers. This …