Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A.Consider the insurance database of Figure 3.17, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find the

A.Consider the insurance database of Figure 3.17, where the primary keys are underlined. Construct the following SQL queries for this relational database.

a. Find the total number of people who owned cars that were involved in accidents in 2017.

b. Delete all year-2010 cars belonging to the person whose ID is '12345'.

B. Suppose that we have a relation marks(ID, score) and we wish to assign grades

to students based on the score as follows: grade F if score C if 40

score B if 60 score A if 80 score. Write SQL

queries to do the following:

a. Display the grade for each student, based on the marks relation.

b. Find the number of students with each grade.

image text in transcribed

please do all parts.

A.Consider the insurance database of Figure 3.17, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find the total number of people who owned cars that were involved in accidents in 2017. person (driver_id, name, address) car (license_plate, model, year) accident (report number, year, location) owns (driver_id, license_plate) participated (report number. license_plate, driver_id, damage_amount) b. Delete all year-2010 cars belonging to the person whose ID is '12345'. B. Suppose that we have a relation marks(ID, score) and we wish to assign grades to students based on the score as follows: grade Fif score C if 40 s score B if 60 s score A if 80 s score. Write SQL queries to do the following: a. Display the grade for each student, based on the marks relation. b. Find the number of students with each grade

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_2

Step: 3

blur-text-image_3

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

How else might employees be motivated to improve their performance?

Answered: 1 week ago

Question

8. Do the organizations fringe benefits reflect diversity?

Answered: 1 week ago

Question

7. Do the organizations social activities reflect diversity?

Answered: 1 week ago