title: Table creation - foreign key constraint incorrectly formed
body: <p>I'm creating a database for a zoo for a project, and when I try to create the table "Lives" with a primary key from the table "Animals" i get an error</p>
  
  <pre><code>CREATE TABLE Department
      (DeptName       VARCHAR(35),
       DeptBuilding   VARCHAR(35),
       DeptBudget     VARCHAR(9),
       PRIMARY KEY(DeptName)
      );
  
  CREATE TABLE Animals
      (AnimalID       CHAR(5),
       NameLatin      VARCHAR(35),
       DeptName       VARCHAR(35),
       AnimalType     VARCHAR(10),
       AnimalName     VARCHAR(10),
       PRIMARY KEY(AnimalID),
       FOREIGN KEY(DeptName) REFERENCES Department(DeptName) ON DELETE SET NULL
      );
  
  CREATE TABLE Houses
      (HouseID        CHAR(5),
       HouseName      VARCHAR(35),
       TypeHouse      VARCHAR(10),
       DeptName       VARCHAR(35),
       PRIMARY KEY(HouseID), 
       FOREIGN KEY(DeptName) REFERENCES Department(DeptName) ON DELETE SET NULL
      );
  
  CREATE TABLE Lives
      (AnimalID       CHAR(5),
       HouseID        CHAR(5),
       PRIMARY KEY(AnimalID, HouseID),
       FOREIGN KEY(AnimalID) REFERENCES Animals(AnimalID) ON DELETE SET NULL,
       FOREIGN KEY(HouseID) REFERENCES Houses(HouseID) ON DELETE SET NULL
      );
  </code></pre>
  
  <p>I expected it to create the table but i get: "Foreign key constraint is incorrectly formed"</p>