DROP TABLE SUPPLIERS cascade;
DROP TABLE PARTS cascade;

CREATE TABLE PARTS (
    PARTID INT PRIMARY KEY,
    NAME   VARCHAR(15),
    COLOR  VARCHAR(20),
    WEIGHT INT,
    PRICE  FLOAT
);

CREATE TABLE SUPPLIERS (
    PARTID     INT NOT NULL REFERENCES PARTS(PARTID),
    SUPPLIERID INT,
    NAME       VARCHAR(15),
    STATUS     INT,
    CITY       VARCHAR(50),
    CONSTRAINT PK_SUPPLIERS primary key(SUPPLIERID, PARTID)
);

COMMIT;

quit;
