Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the following PSM functions or procedure, based on database schema: Classes(class, type, country, numGuns, bore, displacement) Ships(name, class, launched) Battles(name, date) Outcome(ship, battle, result)

image text in transcribedWrite the following PSM functions or procedure, based on database schema:

Classes(class, type, country, numGuns, bore, displacement)

Ships(name, class, launched)

Battles(name, date)

Outcome(ship, battle, result)

Take as arguments a new class name, type, country, number of guns, bore, and displacement. Add this information to Classes and also add the ship with the class name to Ships

Exercise 9.4.3: Write the following PSM functions or procedures, based on the database schema Classes (class, type, country, numGuns, bore, displacement) Ships (name, class, launched) Battles (name, date) Outcomes (ship, battle, result) of Exercise 2.4.3. a) The firepower of a ship is roughly proportional to the number of guns times the cube of the bore. Given a class, find its firepower. ! b) Given the name of a battle, produce the two countries whose ships were involved in the battle. If there are more or fewer than two countries involved, produce NULL for both countries. c) Take as arguments a new class name, type, country, number of guns, bore, and displacement. Add this information to Classes and also add the ship with the class name to Ships. !d) Given a ship name, determine if the ship was in a battle with a date before the ship was launched. If so, set the date of the battle and the date the ship was launched to 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4. Identify the challenges facing todays organizations

Answered: 1 week ago