Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming with SQL (10 points) Write Java JDBC methods to maintain the tot.cred attribute of the student relation in the University schema under the following
Programming with SQL (10 points) Write Java JDBC methods to maintain the tot.cred attribute of the student relation in the University schema under the following operations: 1. INSERT into the takes table (1 point) DELETE from the takes table (1 point) UPDATE of the course table (1 point) 2. Write a Java JDBC method that computes the histogram of the grades for a given course in a given semester of a year (course title, semester, and year are input parameters). The method returns a map having as key the grade, e.g., A, A-, A+, B, B-, B+, etc., and as value the number of students that got that grade in the input course, year, semester. (3 points) 3. Consider an employee database with two relations employee (employee.name, street, city) and works (employee_name, company_name, salary). Find the companies whose employees earn a higher salary on average than the average salary of a given company. Provide two solutions: A SQL stored function/procedure that takes the company as an input argument and prints the result companies. (2 points) A Java JDBC program with a method solving the query. (2 points) Programming with SQL (10 points) Write Java JDBC methods to maintain the tot.cred attribute of the student relation in the University schema under the following operations: 1. INSERT into the takes table (1 point) DELETE from the takes table (1 point) UPDATE of the course table (1 point) 2. Write a Java JDBC method that computes the histogram of the grades for a given course in a given semester of a year (course title, semester, and year are input parameters). The method returns a map having as key the grade, e.g., A, A-, A+, B, B-, B+, etc., and as value the number of students that got that grade in the input course, year, semester. (3 points) 3. Consider an employee database with two relations employee (employee.name, street, city) and works (employee_name, company_name, salary). Find the companies whose employees earn a higher salary on average than the average salary of a given company. Provide two solutions: A SQL stored function/procedure that takes the company as an input argument and prints the result companies. (2 points) A Java JDBC program with a method solving the query. (2 points)
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