DROP TABLE EMP_PHONE;
DROP TABLE EMPLOYEE;
DROP TABLE DEPARTMENT;
CREATE TABLE EMP_PHONE (Employee_ID INTEGER NOT NULL, PHONE_NUM VARCHAR(255), PHONE_TYPE VARCHAR(255));
CREATE TABLE EMPLOYEE (ID INTEGER GENERATED ALWAYS AS IDENTITY NOT NULL, NAME VARCHAR(255), SALARY BIGINT, DEPARTMENT_ID INTEGER, PRIMARY KEY (ID));
CREATE TABLE DEPARTMENT (ID INTEGER GENERATED ALWAYS AS IDENTITY NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID));
ALTER TABLE EMP_PHONE ADD CONSTRAINT EMPPHONEID FOREIGN KEY (Employee_ID) REFERENCES EMPLOYEE (ID);
ALTER TABLE EMPLOYEE ADD CONSTRAINT MPLOYEEDPARTMENTID FOREIGN KEY (DEPARTMENT_ID) REFERENCES DEPARTMENT (ID);
