MySQL Referential Integrity Issue
I had some changes in that table and it got executed. mainly the primary key. pl go through the same,

    mysql&gt; CREATE TABLE Student (
        -&gt;     StudentID INT,
        -&gt;     Fname VARCHAR(30),
        -&gt;     Lname VARCHAR(30),
        -&gt;     DOB DATE,
        -&gt;     Major VARCHAR(10),
        -&gt;     PRIMARY KEY (StudentID)) ENGINE=InnoDB;
    Query OK, 0 rows affected (0.10 sec)

    mysql&gt; CREATE TABLE Professor (
        -&gt;     Emp_no INT,
        -&gt;     FName VARCHAR(10),
        -&gt;     LName VARCHAR(10),
        -&gt;     DeptCode VARCHAR(2),
        -&gt;     PRIMARY KEY (Emp_no)) ENGINE=InnoDB;
    Query OK, 0 rows affected (0.14 sec)

    mysql&gt; CREATE TABLE Phone (
        -&gt;     StudentID INT,
        -&gt;     PNumber VARCHAR(20),
        -&gt;     Type VARCHAR(5),
        -&gt;     FOREIGN KEY (StudentID) REFERENCES Student(StudentID) ON DELETE CASCADE
        -&gt;     ) ENGINE=InnoDB;
    Query OK, 0 rows affected (0.14 sec)

mysql&gt; CREATE TABLE Class (
    -&gt;     ClassID VARCHAR(5),
    -&gt;     NoCredits INT,
    -&gt;     Description VARCHAR(30),
    -&gt;     Requisite1 VARCHAR(6),
    -&gt;     Requisite2 VARCHAR(6),
    -&gt;     Requisite3 VARCHAR(6),
    -&gt;     PRIMARY KEY (ClassID)) ENGINE=InnoDB;
Query OK, 0 rows affected (0.10 sec)

            mysql&gt; CREATE TABLE Section (
                -&gt;     ClassID VARCHAR(5),
                -&gt;     SecNo VARCHAR(10),
                -&gt;     Semester VARCHAR(4),
                -&gt;     ClassRoom VARCHAR(6),
                -&gt;     TimeOffered VARCHAR(20),
                -&gt;     Emp_no INT,
                -&gt; PRIMARY KEY (SecNo, Semester),
                -&gt; FOREIGN KEY (ClassID) REFERENCES Class(ClassID),
                -&gt;     FOREIGN KEY (Emp_no) REFERENCES Professor(Emp_no)
                -&gt;     ) ENGINE=InnoDB;
            Query OK, 0 rows affected (0.13 sec)

            mysql&gt; CREATE TABLE QualToTeach (
                -&gt; ID varchar(5),
                -&gt; ClassID VARCHAR(5),
                -&gt;     Emp_no INT,
                -&gt;     PRIMARY KEY (ID),
                -&gt; FOREIGN KEY (ClassID) REFERENCES Class(ClassID),
                -&gt;     FOREIGN KEY (Emp_no) REFERENCES Professor(Emp_no)) ENGINE=InnoDB;
            Query OK, 0 rows affected (0.13 sec)

            mysql&gt; CREATE TABLE Enrolled (
                -&gt;     StudentID INT,
                -&gt;     ClassID VARCHAR(5),
                -&gt;     SecNo VARCHAR(10),
                -&gt;     Semester VARCHAR(4),
                -&gt;     Grade CHAR(2),
                -&gt;     DropDate DATE,
                -&gt; Enrolled_id INT,
                -&gt; PRIMARY KEY (Enrolled_id),
                -&gt; FOREIGN KEY (ClassID, SecNo, Semester) REFERENCES Section(ClassID, SecNo, Semester),
                -&gt;     FOREIGN KEY (StudentID) REFERENCES Student(StudentID))
                -&gt;     ENGINE=InnoDB;
            Query OK, 0 rows affected (0.19 sec)