   `name` VARCHAR(100) NOT NULL,
   PRIMARY KEY (`buildingid`));
 
+CREATE TABLE `reservation_system`.`departments` (
+  `departmentid` INT NOT NULL AUTO_INCREMENT,
+  `name` VARCHAR(45) NOT NULL,
+  PRIMARY KEY (`departmentid`));
+
 CREATE TABLE `reservation_system`.`rooms` (
   `roomid` INT NOT NULL AUTO_INCREMENT,
   `name` VARCHAR(100) NOT NULL,
   `buildingid` INT NOT NULL,
-  `department` VARCHAR(30) NOT NULL DEFAULT 'ITS',
+  `departmentid` INT NOT NULL,
   PRIMARY KEY (`roomid`),
   INDEX `buildingid_idx` (`buildingid` ASC),
+  INDEX `department_idx` (`departmentid` ASC),
   CONSTRAINT `buildingid`
     FOREIGN KEY (`buildingid`)
     REFERENCES `reservation_system`.`buildings` (`buildingid`)
+    ON DELETE NO ACTION
+    ON UPDATE NO ACTION,
+  CONSTRAINT `departmentid`
+    FOREIGN KEY (`departmentid`)
+    REFERENCES `reservation_system`.`departments` (`departmentid`)
     ON DELETE NO ACTION
     ON UPDATE NO ACTION);
 

       (1, 11425520, "kevin_gray_chan@dlsu.edu.ph", "2016-10-20", "11:00:00", "11:14:59", 2, 2, "45t45y0965134213yktreioet54j211"),
	   (1, 11425520, "kevin_gray_chan@dlsu.edu.ph", "2016-10-20", "11:15:00", "11:29:59", 2, 2, "45t45y0965134213yktreioet54j211"),
       (1, 11425520, "kevin_gray_chan@dlsu.edu.ph", "2016-10-21", "11:00:00", "11:14:59", 2, 2, "45t45y0965134213yktreioet54j212"),
	   (1, 11425520, "kevin_gray_chan@dlsu.edu.ph", "2016-10-21", "11:15:00", "11:29:59", 2, 2, "45t45y0965134213yktreioet54j212");
	   ("Miguel Hall"),
	   ("Saint Joseph Hall");

INSERT INTO `reservation_system`.`departments` (`name`)
VALUES ("ITS"),
	   ("Library");

INSERT INTO `reservation_system`.`rooms` (`name`, `buildingid`, `departmentid`)
VALUES ("G202A", 1, 1),
	   ("G202B", 1, 1);

INSERT INTO `reservation_system`.`computers` (`computerno`, `roomid`)
VALUES (1, 1),
