Create these four tables in Oracle: Suppliers (SupplierNo, Name, Status, city) P
ID: 3914611 • Letter: C
Question
Create these four tables in Oracle: Suppliers (SupplierNo, Name, Status, city) Parts (PartNo, Name, Color, Weight, City) Projects (ProiectNo, Name, City) hipments (SupplierNo, PartNo, ProjectNo, Quantity) Status City SupplierNoName 20 LONDON SMITH ONES BLAKE CLARK ADAMS S1 S2 10 PARIS 30 PARIS S4 S5 20 LONDON ATHENS 30 PartNo Name Color Weight ??Pl ?NUT ?RED | 12 |LONDON | P2 ?BOLT ?GREEN? 1. PARIS 17 SCREW |BLUE ? 17 |ROME PS CAMERA | BLUE | 32 | PARÍS ROME P3 P4 RED14 LONDON SCREWRED P6 WRENCH RED1 12 ProjeciNo Name City ???SC.RTER ? [PUNCH 13READER 4 CONSOLE ATHENS 15 |COLLATOR |LONDON 16 PARIS ROME ER ATHENS | TERMINAL ?OSLO 17 TAPE DRUM LONDON LONDON 18Explanation / Answer
Use the "Create table" command first to define the tables. And use "Insert into" to insert entries in the tables.
CREATE TABLE Suppliers (
SupplierNo CHAR(2) PRIMARY KEY,
Name VARCHAR(255),
Status INT,
City VARCHAR(255)
);
CREATE TABLE Parts (
PartNo CHAR(2) PRIMARY KEY,
Name VARCHAR(255),
Color VARCHAR(255),
Weight INT,
City VARCHAR(255)
);
CREATE TABLE Projects (
ProjectNo INT PRIMARY KEY,
Name VARCHAR(255),
City VARCHAR(255)
);
CREATE TABLE Shippments (
SupplierNo CHAR(2) PRIMARY KEY,
PartNo CHAR(2) PRIMARY KEY,
ProjectNo INT PRIMARY KEY,
Quantity INT
);
INSERT INTO Suppliers VALUES ('S1', 'SMITH', 20, 'LONDON');
Insert all the entries required using the "Insert into" command.