{"CLASS": {"columns": [[0, "CLASS_CODE", "varchar(5)", 0, null, 1], [1, "CRS_CODE", "varchar(10)", 0, null, 0], [2, "CLASS_SECTION", "varchar(2)", 0, null, 0], [3, "CLASS_TIME", "varchar(20)", 0, null, 0], [4, "CLASS_ROOM", "varchar(8)", 0, null, 0], [5, "PROF_NUM", "INT", 0, null, 0]], "primary_keys": ["CLASS_CODE"], "foreign_keys": [[0, 0, "EMPLOYEE", "PROF_NUM", "EMP_NUM", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "COURSE", "CRS_CODE", "CRS_CODE", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "CLASS_CODE"]]], "check_constraints": []}, "COURSE": {"columns": [[0, "CRS_CODE", "varchar(10)", 0, null, 1], [1, "DEPT_CODE", "varchar(10)", 0, null, 0], [2, "CRS_DESCRIPTION", "varchar(35)", 0, null, 0], [3, "CRS_CREDIT", "float(8)", 0, null, 0]], "primary_keys": ["CRS_CODE"], "foreign_keys": [[0, 0, "DEPARTMENT", "DEPT_CODE", "DEPT_CODE", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "CRS_CODE"]]], "check_constraints": []}, "DEPARTMENT": {"columns": [[0, "DEPT_CODE", "varchar(10)", 0, null, 1], [1, "DEPT_NAME", "varchar(30)", 0, null, 0], [2, "SCHOOL_CODE", "varchar(8)", 0, null, 0], [3, "EMP_NUM", "INT", 0, null, 0], [4, "DEPT_ADDRESS", "varchar(20)", 0, null, 0], [5, "DEPT_EXTENSION", "varchar(4)", 0, null, 0]], "primary_keys": ["DEPT_CODE"], "foreign_keys": [[0, 0, "EMPLOYEE", "EMP_NUM", "EMP_NUM", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "DEPT_CODE"]]], "check_constraints": []}, "EMPLOYEE": {"columns": [[0, "EMP_NUM", "INT", 0, null, 1], [1, "EMP_LNAME", "varchar(15)", 0, null, 0], [2, "EMP_FNAME", "varchar(12)", 0, null, 0], [3, "EMP_INITIAL", "varchar(1)", 0, null, 0], [4, "EMP_JOBCODE", "varchar(5)", 0, null, 0], [5, "EMP_HIREDATE", "datetime", 0, null, 0], [6, "EMP_DOB", "datetime", 0, null, 0]], "primary_keys": ["EMP_NUM"], "foreign_keys": [], "unique_constraints": [[[0, 0, "EMP_NUM"]]], "check_constraints": []}, "ENROLL": {"columns": [[0, "CLASS_CODE", "varchar(5)", 0, null, 0], [1, "STU_NUM", "INT", 0, null, 0], [2, "ENROLL_GRADE", "varchar(50)", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "STUDENT", "STU_NUM", "STU_NUM", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "CLASS", "CLASS_CODE", "CLASS_CODE", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "PROFESSOR": {"columns": [[0, "EMP_NUM", "INT", 0, null, 0], [1, "DEPT_CODE", "varchar(10)", 0, null, 0], [2, "PROF_OFFICE", "varchar(50)", 0, null, 0], [3, "PROF_EXTENSION", "varchar(4)", 0, null, 0], [4, "PROF_HIGH_DEGREE", "varchar(5)", 0, null, 0]], "primary_keys": [], "foreign_keys": [[0, 0, "DEPARTMENT", "DEPT_CODE", "DEPT_CODE", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "EMPLOYEE", "EMP_NUM", "EMP_NUM", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "STUDENT": {"columns": [[0, "STU_NUM", "INT", 0, null, 1], [1, "STU_LNAME", "varchar(15)", 0, null, 0], [2, "STU_FNAME", "varchar(15)", 0, null, 0], [3, "STU_INIT", "varchar(1)", 0, null, 0], [4, "STU_DOB", "datetime", 0, null, 0], [5, "STU_HRS", "INT", 0, null, 0], [6, "STU_CLASS", "varchar(2)", 0, null, 0], [7, "STU_GPA", "float(8)", 0, null, 0], [8, "STU_TRANSFER", "numeric", 0, null, 0], [9, "DEPT_CODE", "varchar(18)", 0, null, 0], [10, "STU_PHONE", "varchar(4)", 0, null, 0], [11, "PROF_NUM", "INT", 0, null, 0]], "primary_keys": ["STU_NUM"], "foreign_keys": [[0, 0, "DEPARTMENT", "DEPT_CODE", "DEPT_CODE", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "STU_NUM"]]], "check_constraints": []}}
CREATE TABLE CLASS (
    CLASS_CODE varchar(5)   PRIMARY KEY,
    CRS_CODE varchar(10),
    CLASS_SECTION varchar(2),
    CLASS_TIME varchar(20),
    CLASS_ROOM varchar(8),
    PROF_NUM INT,
    UNIQUE (CLASS_CODE),
    FOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM),
    FOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)
);

CREATE TABLE COURSE (
    CRS_CODE varchar(10)   PRIMARY KEY,
    DEPT_CODE varchar(10),
    CRS_DESCRIPTION varchar(35),
    CRS_CREDIT float(8),
    UNIQUE (CRS_CODE),
    FOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)
);

CREATE TABLE DEPARTMENT (
    DEPT_CODE varchar(10)   PRIMARY KEY,
    DEPT_NAME varchar(30),
    SCHOOL_CODE varchar(8),
    EMP_NUM INT,
    DEPT_ADDRESS varchar(20),
    DEPT_EXTENSION varchar(4),
    UNIQUE (DEPT_CODE),
    FOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)
);

CREATE TABLE EMPLOYEE (
    EMP_NUM INT   PRIMARY KEY,
    EMP_LNAME varchar(15),
    EMP_FNAME varchar(12),
    EMP_INITIAL varchar(1),
    EMP_JOBCODE varchar(5),
    EMP_HIREDATE datetime,
    EMP_DOB datetime,
    UNIQUE (EMP_NUM)
);

CREATE TABLE ENROLL (
    CLASS_CODE varchar(5),
    STU_NUM INT,
    ENROLL_GRADE varchar(50),
    FOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM),
    FOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)
);

CREATE TABLE PROFESSOR (
    EMP_NUM INT,
    DEPT_CODE varchar(10),
    PROF_OFFICE varchar(50),
    PROF_EXTENSION varchar(4),
    PROF_HIGH_DEGREE varchar(5),
    FOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE),
    FOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)
);

CREATE TABLE STUDENT (
    STU_NUM INT   PRIMARY KEY,
    STU_LNAME varchar(15),
    STU_FNAME varchar(15),
    STU_INIT varchar(1),
    STU_DOB datetime,
    STU_HRS INT,
    STU_CLASS varchar(2),
    STU_GPA float(8),
    STU_TRANSFER numeric,
    DEPT_CODE varchar(18),
    STU_PHONE varchar(4),
    PROF_NUM INT,
    UNIQUE (STU_NUM),
    FOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)
);