 	   ("Miguel Hall"),
 	   ("Saint Joseph Hall");
 
-INSERT INTO `reservation_system`.`rooms` (`name`, `buildingid`)
-VALUES ("G202A", 1),
-	   ("G202B", 1);
+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),

    ON DELETE NO ACTION
    ON UPDATE NO ACTION);



/*dummy data*/
INSERT INTO `reservation_system`.`buildings` (`name`)

  `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,
  `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);

