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:...
-
An industry consists of three firms with sales of $ 300,000, $ 700,000, and $ 250,000. a. Calculate the Herfindahl- Hirschman index (HHI). b. Calculate the four- firm concentration ratio (C4). c....
-
Record a sale of scrap. (Obj. 1). The partially completed job cost sheet for Job 351 is shown on page 281. On April 19, 19X9, scrap material was recovered from this job and sold on credit for $475....
-
1. Complete the master schedule for Product X, including the projected available inventory and the ATP numbers. 2. From the master schedule for Product X and using the data given for components A, B,...
-
Apache Airlines, a privately held firm, is looking to buy additional gates at its home airport for $500,000. Apache has $240,000 in the bank but that money may not be spent as it is used to pay...
-
After looking at the projections of the HomeNet project, you decide that they are not realistic. It is unlikely that sales will be constant over the four-year life of the project. Furthermore, other...
-
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...
-
Define a shelf registration and an automatic shelf registration. What types of public companies can use a shelf registration and/or an automatic shelf registration?
-
Provide the firm name and web page. Does this firm provide highly specialized skills or generic skills? What client need does this firm specialize in? Which phase in the change lifecycle does the...
-
Provide a specific prompting strategies for each number (trainer action) it may be pictorial, written, gestural, modeling, material, verbal or manual explain briefly using the hierarchy or prompting...
-
When Loreen was planning a Caribbean cruise, she decides to purchase all her souvenirs in the Bahamas because the exchange rate would be to her benefit. This means Multiple Choice the currency in the...
-
Here is a list of phobias. Match each of the phobias to one of the 15 statements following the list. Type the letter attached to each phobia you choose next to each statement. The list below contains...
-
A B C D E 1 2 3 4 5 6 7 8 9 10 Kevin, a calendar-year taxpayer, utilizes the cash method of accounting for his small business, which provides various consulting expertise to the railroad industry. At...
-
You own a lot in Key West, Florida, that is currently unused. Similar lots have recently sold for $1,250,000. Over the past five years, the price of land in the area has increased 7 percent per year,...
-
PC Contractors, Inc., was an excavating business in Kansas City, Missouri. Union Bank made loans to PC, subject to a perfected security interest in its equipment and other assets, including...
-
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...
-
Be prepared to explain the texts comprehensive To illustrate the issues related to interest capitalization, assume that on November 1, 2016, Shalla Company contracted Pfeifer Construction Co. to...
-
On April 1, 2020. Indigo Company received a condemnation award of $473,000 cash as compensation for the forced sale of the company's land and building, which stood in the path of a new state highway....
-
The market price of a stock is $24.55 and it is expected to pay a dividend of $1.44 next year. The required rate of return is 11.23%. What is the expected growth rate of the dividend? Submit Answer...
Study smarter with the SolutionInn App