An atom that becomes negatively charged because it has accep…
Questions
An аtоm thаt becоmes negаtively charged because it has accepted an electrоn is
Cоnsider the fоllоwing dаtаbаse concerning a local garage: for each customer, we want to record the (unique) name, address, and contact phone number. For each vehicle, we want to record the unique vehicle’s identification number (VIN), and the vehicle’s make, model and year. For each repair job, we want to record the description of the job done(maximum 200 chars), the date, and the total dollar cost. A repair job may involve zero or more parts(like, e.g., battery, windshield wipers). For each part, we want to record the unique part number, the part name, and its cost. The E/R diagram is given as below: (1) [2pts] What constraints related to the relationships are represented in the E/R diagram above?(2) [4pts] We want to translate the E/R diagram into relational database tables. Some of the tables are already given as follows. Please translate the remaining part of the E/R diagram to complete the database design. Make sure that the translation captures any key and participation constraints in the ER diagram (Or state them additionally in your own language if your solution cannot capture the constraints). CREATE TABLE customer(name CHAR(20) PRIMARY KEY,addr CHAR(20),phno CHAR(15));CREATE TABLE vehicle(VIN CHAR(50) PRIMARY KEY,year INTEGER,make CHAR(10),model CHAR(20),owner CHAR(20),FOREIGN KEY (owner) REFERENCES customer);CREATE TABLE parts(pNo CHAR(50) PRIMARY KEY,name CHAR(20),cost REAL); (3) [4pts] Answer the following questions according to the relation schema from (2): What foreign key constraints related to the vehicle entity are represented? Give an example of DDL commands that could violate the foreign key constraints and what action will be taken by the DBMS?