|
ToDo:
|
CREATE TABLE `test`.`Department` ( `ID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `Name` VARCHAR(45) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE = InnoDB; CREATE TABLE `test`.`Employee` ( `ID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `FirstName` VARCHAR(45) NOT NULL, `LastName` VARCHAR(45) NOT NULL, `DepartmentID` INTEGER UNSIGNED NOT NULL, PRIMARY KEY (`ID`), CONSTRAINT `FK_Employee_1` FOREIGN KEY `FK_Employee_1` (`DepartmentID`) REFERENCES `department` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB;