Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

problem 1-4 please Classes(class, type, country, numGuns, bore, displacement) . Ships(name, class, launched) Battles(name, date) Outcomes(ship, battle, result) Write the SQL statement and draw the

problem 1-4 please

image text in transcribed

Classes(class, type, country, numGuns, bore, displacement) . Ships(name, class, launched) Battles(name, date) Outcomes(ship, battle, result) Write the SQL statement and draw the relational algebra query execution tree for each of the following ueries (8 points/SQL 4.5 points/query tree): 1. What are the ship names of USA enemies (Germany and Japan)? 2. What countries did launch battle-ships but did not launch battle-carriers after 1940? 3. What countries had damaged ships (result'damaged') in 1944 battles? 4. What battle-ships from USA did participate in the Pearl Harbor battle? 5. What ships from USA did fight in exactly one battle in 1944 and got 'sunk' in that battle? 6. What is the number of ships in each battle-carrier class from Germany? 7. What is the average number of guns installed on USA ships? 8. What are the battles in which at least three ships from the same country got damaged'? 9. For each battle in 1940 return the number of USA ships that got 'damaged' and that got 'sunk'. 10. What is the average number of guns lost by German ships per battle? 11. What are the ship names of the USA class(es) with the smallest number of guns? 12. What are the battles in which there were involved ships from at least three countries? 13. What is the year in which USA launched the largest number of ships? 14. What are the battles in which no ship got damaged'? 15. What are the battles in which at least one ship from USA got 'sunk'? 16. All the ships launched before 1940 by Germany were inherited by West Germany after the war, whil

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

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

1. Television more Over watching faceing of many problems ?

Answered: 1 week ago

Question

Is there a link between chronic stress and memory function?

Answered: 1 week ago

Question

1. What are your creative strengths?

Answered: 1 week ago