1:--As user root:
   2:create user testuser identified by 'testpassword';
   3:grant insert, update, delete, select on conference_rooms to testuser;
   4:grant insert, update, delete, select on room_reservations to testuser;
   5:
   6:
   7:--Table definitions:
   8:
   9:CREATE TABLE `test`.`conference_rooms` (
  10:  `room_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  11:  `room_name` VARCHAR(45) NOT NULL DEFAULT '',
  12:  `number_of_seats` INTEGER UNSIGNED NOT NULL DEFAULT 0,
  13:  `room_active` CHAR(1) NOT NULL DEFAULT 'Y',
  14:  PRIMARY KEY(`room_id`)
  15:)
  16:ENGINE = InnoDB
  17:COMMENT = 'A table containing conference room information.';
  18:
  19:
  20:
  21:
  22:CREATE TABLE `test`.`room_reservations` (
  23:  `reservation_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  24:  `room_id` VARCHAR(45) NOT NULL DEFAULT '',
  25:  `reservation_start` DATETIME NOT NULL DEFAULT 0,
  26:  `reservation_end` DATETIME NOT NULL DEFAULT 0,
  27:  `reservation_team` VARCHAR(45) NOT NULL DEFAULT '',
  28:  PRIMARY KEY(`reservation_id`)
  29:)
  30:ENGINE = InnoDB
  31:COMMENT = 'Contains reservations of conference rooms.';
  32:
  33:--Data:
  34:insert into conference_rooms (room_name, number_of_seats) values('North Conference Room', 20);
  35:insert into conference_rooms (room_name, number_of_seats) values('South Conference Room A', 20);
  36:insert into conference_rooms (room_name, number_of_seats) values('South Conference Room B', 10);
  37:insert into conference_rooms (room_name, number_of_seats) values('Executive Room #1', 25);
  38:insert into conference_rooms (room_name, number_of_seats) values('Executive Room #2', 18);
  39:insert into conference_rooms (room_name, number_of_seats) values('Executive Room #3', 6);
  40:insert into conference_rooms (room_name, number_of_seats) values('East Conference Room', 25);
  41:insert into conference_rooms (room_name, number_of_seats) values('West Conference Room',15);
  42:
  43:
  44:insert into room_reservations(room_id, reservation_start, reservation_end, reservation_team) values(1,'2006-01-15 13:00:00','2006-01-15 15:00:00','Human Resources');
  45:
  46:insert into room_reservations(room_id, reservation_start, reservation_end, reservation_team) values(1,'2006-01-16 10:00:00','2006-01-16 11:00:00','Accounting');
  47:
  48:insert into room_reservations(room_id, reservation_start, reservation_end, reservation_team) values(2,'2006-01-12 09:00:00','2006-01-12 09:30:00','Accounting');
  49:
  50:insert into room_reservations(room_id, reservation_start, reservation_end, reservation_team) values(3,'2006-01-19 14:00:00','2006-01-19 16:30:00','Sales');
  51:
  52:insert into room_reservations(room_id, reservation_start, reservation_end, reservation_team) values(6,'2006-01-25 09:30:00','2006-01-25 11:00:00','Information Technology');
  53:
  54:insert into room_reservations(room_id, reservation_start, reservation_end, reservation_team) values(7,'2006-02-12 08:00:00','2006-02-12 11:00:00','Information Technology');