Toad World® Forums

Please help me correct it

CREATE TABLE STAFF (
Staff_ID CHAR(10) NOT NULL,
Name CHAR(30) NOT NULL,
Phone_Num INTEGER NOT NULL,
Email CHAR(40) NOT NULL,
Office_Num INTEGER NOT NULL,
Activity_Code VARCHAR(10) NOT NULL,
CONSTRAINT STAFF_PK PRIMARY KEY(Staff_ID)
)

CREATE TABLE DEPARTMENT (
Department_Name CHAR(10) NOT NULL,
Staff_ID CHAR(10) NOT NULL,
)

CREATE TABLE STUDENT (
Student_ID VARCHAR(10) NOT NULL,
Name vARCHAR(30) NOT NULL,
Gender VARCHAR(10) NOT NULL,
Date_Of_Birth VARCHAR(20) NOT NULL,
Date_Amitted VARCHAR(20) NOT NULL,
CONSTRAINT STUDENT_PK PRIMARY KEY(Student_ID)
)

CREATE TABLE COURSE (
Course_ID VARCHAR(10) NOT NULL,
Course_Title VARCHAR(30) NOT NULL,
Course_Coordinator VARCHAR(30) NOT NULL,
Student_ID VARCHAR(10) NOT NULL,
Student_ID VARCHAR(10) NOT NULL,
Unit_Code VARCHAR(10) NOT NULL,
CONSTRAINT STUDENT_FK FOREIGN KEY (STUDENT_ID)
REFERENCES STUDENT(STUDENT_ID),
CONSTRAINT UNIT_FK FOREIGN KEY (UNIT_CODE)
REFERENCES UNIT(UNIT_ID),
CONSTRAINT COURSE_PK PRIMARY KEY(Course_ID)
)

CREATE TABLE ENROLMENT(
Student_ID VARCHAR(10) NOT NULL,
Course_ID VARCHAR(10) NOT NULL,
CONSTRAINT STUDENT_PK PRIMARY KEY(Student_ID)
REFERENCES STUDENT(Student_ID),
CONSTRAINT COURSE_PK PRIMARY KEY(Course_ID)
REFERENCES COURSE(Course_ID),
CONSTRAINT ENROLMENT_PK PRIMARY KEY(Course_ID, Student_ID)
);

CREATE TABLE UNIT(
Unit_Code VARCHAR(10) NOT NULL,
Unit_Title VARCHAR(30) NOT NULL,
Student_ID VARCHAR(10) NOT NULL,
Activity_Code VARCHAR(10) NOT NULL,
CONSTRAINT ACTIVITY_FK FOREIGN KEY (ACTIVITY_CODE)
REFERENCES ACTIVITY(ACTIVITY_CODE),
CONSTRAINT UNIT_PK PRIMARY KEY(Unit_Code)
)

CREATE TABLE STUDENT_UNIT(
Student_ID VARCHAR(10) NOT NULL,
Unit_ID VARCHAR(10) NOT NULL,
CONSTRAINT STUDENT_PK PRIMARY KEY(Student_ID)
REFERENCES STUDENT(Student_ID),
CONSTRAINT UNIT_PK PRIMARY KEY(Unit_ID)
REFERENCES COURSE(Unit_ID),
CONSTRAINT STUDENT-UNIT_PK PRIMARY KEY(Unit_ID, Student_ID)
);

CREATE TABLE ACTIVITY(
Activity_Code VARCHAR(10) NOT NULL,
Activity_Type VARCHAR(30) NOT NULL,
Building_ID VARCHAR(10) NOT NULL,
Day_And_Time VARCHAR(20) NOT NULL,
CONSTRAINT ACTIVITY_PK PRIMARY KEY(Unit_ID)
)

CREATE TABLE STAFF_ACTIVE(
Staff_ID VARCHAR(10) NOT NULL,
Activity_Code VARCHAR(10) NOT NULL,
CONSTRAINT STAFF_PK PRIMARY KEY(Staff_ID)
REFERENCES STAFF(Staff_ID),
CONSTRAINT ACTIVITY_PK PRIMARY KEY(Acivity_Code)
REFERENCES ACTIVITY(Activity_Code),
CONSTRAINT STAFF-ACTIVE_PK PRIMARY KEY(Staff_ID, Activity_Code)
);