Question: Turn the code below to a database in JAVA: CREATE TABLE Type Service ( code_type_serv integer, description varchar(30), prix number, FOREIGN KEY (code_type_serv) REFERENCES Service_de_Scurit(id_service)
Turn the code below to a database in JAVA:
CREATE TABLE Type Service ( code_type_serv integer, description varchar(30), prix number, FOREIGN KEY (code_type_serv) REFERENCES Service_de_Scurit(id_service) );
CREATE TABLE Service de Scurit ( id_service integer, date_debut date, date_fin date, nbre_employs number, FOREIGN KEY (id_service) REFERENCES Commande(id_commande) );
CREATE TABLE Client ( id_client integer, nom varchar(30), prnom varchar(30), date_de_naissance date, Type_de_scurit varchar(30), adresse varchar(30), FOREIGN KEY (id_client) REFERENCES Commande(id_commande) );
CREATE TABLE Produit ( id_produit integer, description varchar(30), prix number FOREIGN KEY (id_produit) REFERENCES Command(id_commande) );
CREATE TABLE Type Salaire ( code integer, description varchar(30) FOREIGN KEY (code) REFERENCES Employ(id_employ) );
CREATE TABLE Type Employ ( code_type_emp integer, description varchar(30) FOREIGN KEY (code_type_emp) REFERENCES Employ(id_employ) );
CREATE TABLE Employ ( id_employ integer, nom varchar(30), prnom varchar(30), date_naissance date, montant_salaire number FOREIGN KEY (id_employ) REFERENCES Commande(id_commande) );
CREATE TABLE Commande ( id_commande integer PRIMARY KEY, nbre_produits number, date_commande date, date_livraison date );
CREATE TABLE Salaire ( id_salaire integer, date_paiement date, code_type_salaire number FOREIGN KEY (id_salaire) REFERENCES Employ(id_employ) );
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
