The following tables are part of a schema of an auto insurance company. The insurance database keeps a record of cars and a record of claims for cars where policy holders could have initiated an auto insurance claim such as an auto accident. Issues for which a claim is initiated are called claim events. All claims have a claim event. A type of a claim event could be found in one or more claims. A car could have no or many claims. Every car has a make and a model. One car make could have one or more models. Write a query that shows the make, model, VIN number and year of manufacture only for cars that have an auto insurance claim of any event type. If the database tables were populated, your query would not list cars that have not had a claim. You do not need to create the database to answer this question but you might just for visualization. CREATE TABLE CAR_MAKE ( CAR_MAKE_ID INT NOT NULL PRIMARY KEY, CAR_MAKE VARCHAR(25)); CREATE TABLE MAKE_MODEL ( MAKE_MODEL_ID INT NOT NULL PRIMARY KEY, CAR_MODEL VARCHAR(25), CAR_MAKE_ID INT, CONSTRAINT CM_MM_FK FOREIGN KEY (CAR_MAKE_ID) REFERENCES CAR_MAKE (CAR_MAKE_ID)); CREATE TABLE AUTOMOBILE ( AUTOMOBILE_ID INT NOT NULL PRIMARY KEY, VIN VARCHAR(255), MAKE_MODEL_ID INT, YEAR_OF_MANUFACTURE VARCHAR(4), CONSTRAINT AU_MM_FK FOREIGN KEY (MAKE_MODEL_ID) REFERENCES MAKE_MODEL (MAKE_MODEL_ID)); CREATE TABLE CLAIM_EVENT ( CLAIM_EVENT_ID INT NOT NULL PRIMARY KEY, EVENT_TYPE VARCHAR(255)); CREATE TABLE CLAIMS ( CLAIM_ID INT NOT NULL PRIMARY KEY, CLAIM_NUMBER VARCHAR(25), AUTOMOBILE_ID INT, CLAIM_EVENT_ID INT, CLAIM_DATE DATE, CONSTRAINT CL_AU_FK FOREIGN KEY (AUTOMOBILE_ID) REFERENCES AUTOMOBILE (AUTOMOBILE_ID), CONSTRAINT CL_EV_FK FOREIGN KEY (CLAIM_EVENT_ID) REFERENCES CLAIM_EVENT (CLAIM_EVENT_ID));

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
icon
Related questions
Question

The following tables are part of a schema of an auto insurance company. The insurance database keeps a record of cars and a record of claims for cars where policy holders could have initiated an auto insurance claim such as an auto accident. Issues for which a claim is initiated are called claim events. All claims have a claim event. A type of a claim event could be found in one or more claims. A car could have no or many claims. 
Every car has a make and a model. One car make could have one or more models.

Write a query that shows the make, model, VIN number and year of manufacture only for cars that have an auto insurance claim of any event type. If the database tables were populated, your query would not list cars that have not had a claim. 

You do not need to create the database to answer this question but you might just for visualization.


CREATE TABLE CAR_MAKE (
CAR_MAKE_ID INT NOT NULL PRIMARY KEY,
CAR_MAKE VARCHAR(25));

CREATE TABLE MAKE_MODEL (
MAKE_MODEL_ID INT NOT NULL PRIMARY KEY,
CAR_MODEL VARCHAR(25),
CAR_MAKE_ID INT,
CONSTRAINT CM_MM_FK FOREIGN KEY (CAR_MAKE_ID) REFERENCES CAR_MAKE (CAR_MAKE_ID));

CREATE TABLE AUTOMOBILE (
AUTOMOBILE_ID INT NOT NULL PRIMARY KEY,
VIN VARCHAR(255),
MAKE_MODEL_ID INT,
YEAR_OF_MANUFACTURE VARCHAR(4),
CONSTRAINT AU_MM_FK FOREIGN KEY (MAKE_MODEL_ID) REFERENCES MAKE_MODEL (MAKE_MODEL_ID));

CREATE TABLE CLAIM_EVENT (
CLAIM_EVENT_ID INT NOT NULL PRIMARY KEY,
EVENT_TYPE VARCHAR(255));

CREATE TABLE CLAIMS (
CLAIM_ID INT NOT NULL PRIMARY KEY,
CLAIM_NUMBER VARCHAR(25),
AUTOMOBILE_ID INT,
CLAIM_EVENT_ID INT,
CLAIM_DATE DATE,
CONSTRAINT CL_AU_FK FOREIGN KEY (AUTOMOBILE_ID) REFERENCES AUTOMOBILE (AUTOMOBILE_ID),
CONSTRAINT CL_EV_FK FOREIGN KEY (CLAIM_EVENT_ID) REFERENCES CLAIM_EVENT (CLAIM_EVENT_ID));

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Types of Database Architectures
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning