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
- What are the inputs to the mean variance optimization model?
- What are the advantages and disadvantages of the privatisation of government-owned companies such as airlines?
- Use the Venn Diagrams below to identify and compare/contrast the different types of media that could be used in art. Each circle represents one specific