Repeat Exercise 10.7, but write a function in SQL/PSM. Exercise 10.7 Consider the database shown in Figure
Question:
Repeat Exercise 10.7, but write a function in SQL/PSM.
Exercise 10.7
Consider the database shown in Figure 1.2, whose schema is shown in Figure 2.1. Write a program segment to read a student’s name and print his or her grade point average, assuming that A = 4, B = 3, C = 2, and D = 1 points. Use embedded SQL with C as the host language.
Figure 1.2
Figure 2.1
Transcribed Image Text:
STUDENT Name Student_number Class Major COURSE Course_name Course_number Credit_hours Department PREREQUISITE Course_number Prerequisite_number SECTION Section_identifier Course_number Semester Year Instructor GRADE_REPORT Student_number Section_identifier Grade
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 25% (8 reviews)
This code uses the MySQL C API to connect to a MySQL database prepare and execute SQL queries and retrieve the results It takes in a students name as ...View the full answer
Answered By
Jackson Odari
Organized and reliable tutor recognized for excellence in developing rapport with students and establishing comfortable working environment with students and in small groups. Also have had a three year experience at the Corporate and Investment Banking sector in one of the top banks in Kenya.
0.00
0 Reviews
10+ Question Solved
Related Book For
Fundamentals Of Database Systems
ISBN: 9780133970777
7th Edition
Authors: Ramez Elmasri, Shamkant Navathe
Question Posted:
Students also viewed these Computer science questions
-
Consider the database shown in Figure 1.2, whose schema is shown in Figure 2.1. What are the referential integrity constraints that should hold on the schema? Write appropriate SQL DDL statements to...
-
Consider the database shown in Figure 1.2, whose schema is shown in Figure 2.1. Write a program segment to read a students name and print his or her grade point average, assuming that A = 4, B = 3, C...
-
Create the relational diagram. Use the database shown in Figure P3.24 to answer this Problem. ROBCOR is an aircraft charter company that supplies on-demand charter flight services using a fleet of...
-
Analyze the residuals from the regression model on the patient satisfaction data from Exercise 4.49. Comment on the adequacy of the regression model. MTB> Stat> Regression > Regression Normal...
-
In April 2013, Jack Lang opened a new cleaning service in Victoria. Please assist him by journalizing the following business transactions: The chart of accounts for Jacks Cleaning Service includes:...
-
During final testing, just before launching a new payroll system, the project manager at Reutzel Legal Services found that the purchased payroll system was doing the following: Writing checks for...
-
Chee Yong Chaw began his business on 1 July 2025. The business balances its books at month-end and uses special journals and the periodic inventory system. Transactions for July 2025 were as follows....
-
1. Ultimately, who is responsible for decision making with regard to this situation? 2. What steps should be taken to remedy this situation? 3. Are there fair and ethical procedures to follow to...
-
23. A convex mirror used for rear view on an automobile has a radius of curvature of 3m. If a bus is located at 5m from this mirror, find the position, nature and magnification of the image. 24. An...
-
Mistral Software is considering a merger with Amsted Technologies. Mistral has 1.2 million shares outstanding with a value of $22, while Amsted has 800,000 shares outstanding with a $23 value. The...
-
Why are scripting languages popular for programming Web applications? Where in the three-tier architecture does a PHP program execute? Where does a JavaScript program execute?
-
Create a function in PSM that computes the median salary for the EMPLOYEE table shown in Figure 5.5. Figure 5.5 EMPLOYEE Fname Minit Lname Ssn Sex Salary Super_ssn Dno Bdate Address DEPARTMENT Dname...
-
The first column of these data represents the prebuy gas price of a rental car, and the second column represents the price charged if the car is returned without refilling the gas tank for a selected...
-
Introduction *Explain why you are doing this assignment and the methods you will use to gather the information. Indicate that you will create user profiles in Hire Centennial, College Cornerstone and...
-
25. The average returns, standard deviations, and betas for three funds are given below along with data for the S&P 500 Index. The risk-free return during the sample period is 6%. Fund A B C S&P 500...
-
Referring to Table 1.0 below, it shows the criteria of a wind power system to generate electric power in watt. Kindly sketch a flow chart for the wind power system according to the given criteria....
-
Consider whether you are able to make any savings and assume these savings are constant each month. Suppose you invest these savings on the first day of the month with interest paid monthly and...
-
A projectile's initial position is at the origin (0, 0, 0). It is fired with the initial velocity v(t) = (2,3,4.9) m/s/ If the only acceleration acting on it is the gravity a(t) = (0, 0, -9.8) m/sec....
-
Sorting Graphs: For the DE + 5+ 6x = 0 of Example 1, Fig. 4.2.8 adds to Fig. 4.2.1 the linked solution graph for (t). Label the phase-plane trajectories from left to right as A, B, C. D, E. Then...
-
Four GWU students have been selected to taste food sold by 3 different food trucks labeled as food truck A, B and C on H & 22nd Streets every Monday for 3-weeks. For each student, food trucks are...
-
A possible DDL corresponding to Figure 3.1 is shown below: Discuss the following detailed design decisions: a. The choice of requiring NAME to be NON NULL. b. Selection of SSN as the PRIMARY KEY. c....
-
What naming conventions can you develop to help identify foreign keys more efficiently?
-
Convert the example of GEOMETRY_OBJECTS given in section 11.1.5 from the functional notation to the notation given in Figure 11.2 that distinguishes between attributes and operations. Use the keyword...
-
Bridgeport Inc. has been manufacturing its own shades for its table lamps. The company is currently operating at 100% of capacity, and variable manufacturing overhead is charged to production at the...
-
(Appendix 4B) Direct Method of Support Department Cost Allocation Stevenson Company is divided into two operating divisions: Battery and Small Motors. The company allocates power and general factory...
-
Betty Harris, a recent graduate of Uli University's accounting program, evaluated the operating performance of Oriole Company's six divisions. Betty made the following presentation to Oriole's board...
Study smarter with the SolutionInn App