question archive Implement a PL/SQL procdedure that Displays each dealership by cartype: Given a car type, show name and address about all dealerships that offer that cartype
Subject:Computer SciencePrice: Bought3
Implement a PL/SQL procdedure that Displays each dealership by cartype: Given a car type, show name and address about all dealerships that offer that cartype.
EXAMPLE: EXECUTE DISPLAY_DEALERSHIPS('HONDA');
CarTypes: Contains a cartype_ID and car_names;
CREATE TABLE CarTypes (
cartype_ID int,
car_names varchar(30),
PRIMARY KEY (cartype_ID)
);
Dealership: Each dealership has an ID, dealership name, street address, city, state, zip, and the car type it specializes in.
CREATE TABLE Dealership (
dealer_id int,
Cartype_id int,
dealer_name varchar(255),
dealer_address varchar(255),
dealer_city varchar(255),
dealer_state varchar(255),
dealer_zip int,
PRIMARY KEY (dealer_id)
FOREIGN KEY (Cartype_id) REFERENCES cartypes (cartype_id)
);