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

Consider the insurance database of Figure, 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 1989.

b. Find the number of accidents in which the cars belonging to ?John Smith? were involved.

c. Add a new accident to the database; assume any values for required attributes.

d. Delete the Mazda belonging to ?John Smith?.

e. Update the damage amount for the car with license number ?AABB2000? in the accident with report number ?AR2197? to $3000.

.

person (driver-id, name, address) car (license, model, year) accident (report-number, date, location)

person (driver-id, name, address) car (license, model, year) accident (report-number, date, location) owns (driver-id, license) participated (driver-id, car, report-number, damage-amount)

Step by Step Solution

3.32 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The participated relation relates drivers cars and accidents a Find the total number of people who owned cars that were involved in accidents in 1989 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

16-CS-DB (134).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!