Update: one more parameter is added for the JDBC function to support automated grading.In this homework, you will write your own methods (in both JDBC and stored procedure) to compute standard deviation foremployees salary. You can validate your methods using SQLs stddev function.Data: You will use the employee table in DB2 sample database. If you want to create the table by yourself, you need to create atable employee with this schema and load the sample data into the database first.Standard deviation: In statistics, the standard deviation (SD, or ) is a measure that isused to quantify the amount of variation or dispersion of a set of data values:We will have two tasks for implementation the same function: one will be Java only (no stored procedure) using JDBC runningon the client, and the other will be stored procedure only running on the server. Please DONT write your JDBC code to executeyour stored procedure.Task 1: Write a JDBC program to compute the standard deviation of all salaries. Your program should run as java -cppath2jdbcdriver.jar SalaryStdDev databasename tablename login password, where tablename is the tablename, and loginand password are database login information. (We assume the database runs on localhost. )Task 2: Write a SQL PL based stored procedure to compute the standard deviation of the salary. Your code should run as db2 [email protected] -f stddev.sqlPerformance considerations: Try to minimize the number of table scans. For example, one avg computation will scan the tableonce. Try to minimize system resources.Submission: Please zip your codes (SalaryStdDev.java, stddev.sql), sample result ( a file or screenshot), and a readme file onhow to run your programs.
CSE532
[Solved] CSE532 Homework2- Standard Deviation in JDBC and Stored Procedure
$25
File Name: CSE532_Homework2-_Standard_Deviation_in_JDBC_and_Stored_Procedure.zip
File Size: 612.3 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.