1. Create a database in MySQL for representing students, departments, and classes. We have the following...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create a database in MySQL for representing students, departments, and classes. We have the following departments: Bio, Chem, CS, Eng, Math, Phys. Each department has a name, and a campus (Busch, CAC, Livi, CD). Students must have a first name, last name, and 9-digit ID number. The ID is unique among all students. Students may also have one or more majors and one or more minors in some department. A student may be currently taking some number of classes, and may have taken some number of classes. A course a student has taken will have a grade assigned (A, B, C, D, or F). Each class has a name and number of credits (3 or 4). For example, "Introduction to Whale Songs" might be 3 credits. You can create your own class names. Please use these table and field names: ● ● ● Departments (name, campus) Students (first_name, last_name, id) Classes (name, credits) Majors (sid, dname) Minors (sid, dname) ● IsTaking (sid, name) • Has Taken (sid, name, grade) 2. Populate your database with reasonable random data for 100 students. For ex- ample, you should have roughly equal numbers of students in each year (see 3(b) below). The campus for each department can be randomly selected and doesn't have to match reality (e.g., CS could be on CAC, Eng could be on CD, etc.). 3. Create a Java application that allows users to query the database. You should use JDBC to connect to the database. You should support the following queries and operations: (a) Search students by name. This should match any students where the search string is a substring of either the first or last name (case insensitive). (b) Search students by year (Fr, So, Ju, Sr), where a student's year depends on how many credits they've completed: Year Fr So Ju Sr #credits 0 - 29 30 59 60 89 90+ = (c) Search for students with a GPA equal to or above a given threshold. GPA is not stored in a table, but can be calculated based on the set of classes a student has taken. Point values for letter grades are A = 4, B 3, C = 2, D = 1, and F = 0. Then if a student took 5 3-credit classes and got grades of A, B, B, C, and D, and took 3 4-credit classes with grades of B, C, and F, their GPA would be 3(4+3+3+2+1) + 4(3+2+0) 2.19 27 where 27 is the number of credits for the classes taken. (d) Search for students with a GPA equal to or below a given threshold. (e) For a given department, report its number of students and the average of those students' GPAs. (f) For a given class, report the number of students currently taking it. Also, among students who've taken the class, show the number of students who've gotten each letter grade. (g) Execute an abitrary SQL query. You may want to also use the ResultSetMetaData class to help with printing the result. 1. Create a database in MySQL for representing students, departments, and classes. We have the following departments: Bio, Chem, CS, Eng, Math, Phys. Each department has a name, and a campus (Busch, CAC, Livi, CD). Students must have a first name, last name, and 9-digit ID number. The ID is unique among all students. Students may also have one or more majors and one or more minors in some department. A student may be currently taking some number of classes, and may have taken some number of classes. A course a student has taken will have a grade assigned (A, B, C, D, or F). Each class has a name and number of credits (3 or 4). For example, "Introduction to Whale Songs" might be 3 credits. You can create your own class names. Please use these table and field names: ● ● ● Departments (name, campus) Students (first_name, last_name, id) Classes (name, credits) Majors (sid, dname) Minors (sid, dname) ● IsTaking (sid, name) • Has Taken (sid, name, grade) 2. Populate your database with reasonable random data for 100 students. For ex- ample, you should have roughly equal numbers of students in each year (see 3(b) below). The campus for each department can be randomly selected and doesn't have to match reality (e.g., CS could be on CAC, Eng could be on CD, etc.). 3. Create a Java application that allows users to query the database. You should use JDBC to connect to the database. You should support the following queries and operations: (a) Search students by name. This should match any students where the search string is a substring of either the first or last name (case insensitive). (b) Search students by year (Fr, So, Ju, Sr), where a student's year depends on how many credits they've completed: Year Fr So Ju Sr #credits 0 - 29 30 59 60 89 90+ = (c) Search for students with a GPA equal to or above a given threshold. GPA is not stored in a table, but can be calculated based on the set of classes a student has taken. Point values for letter grades are A = 4, B 3, C = 2, D = 1, and F = 0. Then if a student took 5 3-credit classes and got grades of A, B, B, C, and D, and took 3 4-credit classes with grades of B, C, and F, their GPA would be 3(4+3+3+2+1) + 4(3+2+0) 2.19 27 where 27 is the number of credits for the classes taken. (d) Search for students with a GPA equal to or below a given threshold. (e) For a given department, report its number of students and the average of those students' GPAs. (f) For a given class, report the number of students currently taking it. Also, among students who've taken the class, show the number of students who've gotten each letter grade. (g) Execute an abitrary SQL query. You may want to also use the ResultSetMetaData class to help with printing the result.
Expert Answer:
Answer rating: 100% (QA)
Answer The code is as follow import javasql import javautilScanner public class StudentSearchApp ... View the full answer
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these databases questions
-
George has a credit card that he sometimes carries a balance while on other times he does not carry a balance. As a combination user of credit, what factor(s) should be of most importance to George...
-
The site http://virtualpiano.net features an online player piano. If you click on the Key Assist menu just above the piano keyboard, and then Keyboard Keys, you will see that each key is labelled...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
At what points are the function. y = x tan x 2 x + 1
-
Is there a cure for Multiple Sclerosis in the near future?
-
Shoveling is not exactly a high-tech activity, but it will continue to be a required task even in our information age. The article "A Shovel with a Perforated Blade Reduces Energy Expenditure...
-
Calculate the kinetic energy correction factor for each of the following velocity profiles for a circular pipe: (a) \(u=u_{\max }\left(1-\frac{r}{R} ight)\) (b) \(u=u_{\max...
-
Hoen Manufacturing Company experienced the following accounting events during its first year of operation. With the exception of the adjusting entries for depreciation, all transactions are cash...
-
If Ax+By+5z=C is an equation for the plane containing the point (0,0,1) and the line x-1=Y+2, z=72, 3 then A+B+C=
-
Your neighbor, Kitty Kardashian, of Philadelphia, Pennsylvania, bought $5,000 worth of mutual funds with a back-end load of 5 percent if she sells within the first year. It decreases 1 percent a year...
-
If polynomial P of degree 3 with integer coefficients has zeroes X = v5, x = - 10, and x 8. then P(x) = (x - V5)(x+ 10)(x-8) O True False
-
Doug is a 92-years-old gentleman who lives in the nursing home. He just lost his wife after 70 years of marriage. For the past week he has isolated himself in his room and refuses to come to the...
-
Using the information provided in Appendix A: 1. Calculate the cost of capital of equity (RE) using Tesla's industry beta and the CAPM model. (25 points) 2. Calculate the cost of capital of Debt (RD)...
-
2b=x(t) = 1/2 + M top and m=1 bottom 2A (mn) sin ( mn 2) cos (Amrt) Plot the signal x(t) for values of M = 10 and 100. Consider A=4, time interval t = [-2, 2] and a sampling frequency Fs = 100 Hz a)...
-
1. 2. Indicate the errors, if any, in the following Java statements: a. int 5; b. int x-25; IX variable name is missing //variable name starts with # c. int age-20; // whitespace in variable name d....
-
Let's examine the 32-bit hexadecimal value Oxacfe2b7a a) Provide the binary representation of this number in little endian format. Please label and number the bytes, starting from the lowest (0) to...
-
122. A study revealed that in a study group, intake of betacarotene decreases carcinoma of colon but it actually may be due to increased intake of dietary fibre. This is due to: a. Confounding factor...
-
Design a circuit which negative the content of any register and store it in the same register.
-
Document your thought process around what changes you made to the model developed in Chapter 2, 2-60, to accommodate the new information. Pay particular attention to what changes you had to make to...
-
For Problem and Exercise 4-50, draw the ER diagram based on the normalized relations. StoreName, PetName, Pet Description, Price, Cost, SupplierName, ShippingTime, QuantityOnHand, DateOfLastDelivery,...
-
List the four types of cardinality constraints, and draw an example of each.
-
Eq. 7.36a is written for the conservation of momentum in y direction. Obtain Eq. 7.36-b wherein the stream function is independent variable. Eq. 7.36(a,b) y - v v +(1-y/R)v- + momentum: u u R-y + R P...
-
Using Maslen method, find the approximate value of pressure and density at the junction of the sphere and the cone of Problem 7.29 at Mach number 8. Problem 7.29 An empirical way to determine shock...
-
Show that the derivative of the boundary layer edge velocity is given by Eq. 7.64 for the figure given below. Eq. 7.64 M>>1 Ue dx R dy/dx = 1/R
Study smarter with the SolutionInn App