Create a new customer to the database


Discuss the below:

Q: Consider the insurance database below, where the primary keys are underlines. Construct the following SQL queries for this relational database.

INSURANCE DATABASE

Person ( ss#, name, address)
Car (license, year, model)
Accident (data, driver, damage - amount)
Owns (ss#, license)
Log (license, date, driver)

a.) Find the total number of people whose cars 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 customer to the database.

d.) Delete the Mazda belonging to "John Smith".

e.) Add a new accident record for the Toyota belonging to "Jones".

Solution Preview :

Prepared by a verified Expert
PL-SQL Programming: Create a new customer to the database
Reference No:- TGS01938984

Now Priced at $25 (50% Discount)

Recommended (92%)

Rated (4.4/5)