View the step-by-step solution to:

A relational database contains details about journeys from United States to a variety of destinations and contains the following relations:

A relational database contains details about journeys from United States to a variety of destinations and contains the following relations:



Operator (opCode, opName)

Journey (opCode, destinationCode,price)

Destination (destinationCode, destinationName, distance,averageFuelCost)

JourneyDetails(destinationCode, departureDate, departureTime, arrivalTime, fuelCost)



I have been told to do a stored procedure UpdateAverageFuelCost() that calculates the average fuel cost( average=fuelcost/distance) for each destination. The procedure should update the value of the averageFuelCost in table Destination and should display the following message:




The average fuel usage for Destination "X" is "Y ",


each time the average fuel cost is updated. The value of X is the destination code and Y is the average fuel cost for that particular destination.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question