-- phpMyAdmin SQL Dump -- version 5.2.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 28, 2026 at 09:50 PM -- Server version: 5.7.44 -- PHP Version: 8.1.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `medler_schedule` -- -- -------------------------------------------------------- -- -- Table structure for table `class_meetings` -- CREATE TABLE `class_meetings` ( `meeting_id` int(11) NOT NULL, `course_id` int(11) NOT NULL, `location_id` int(11) NOT NULL, `type_id` int(11) NOT NULL, `meeting_date` date NOT NULL, `start_time` time NOT NULL, `end_time` time NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `class_meetings` -- INSERT INTO `class_meetings` (`meeting_id`, `course_id`, `location_id`, `type_id`, `meeting_date`, `start_time`, `end_time`) VALUES (1, 1, 1, 1, '2026-09-14', '12:00:00', '13:30:00'), (2, 3, 4, 1, '2026-09-14', '14:00:00', '15:50:00'), (3, 1, 2, 2, '2026-09-15', '11:00:00', '11:50:00'), (4, 4, 5, 3, '2026-09-15', '12:00:00', '13:50:00'), (5, 2, 3, 1, '2026-09-15', '14:00:00', '15:20:00'), (6, 1, 1, 1, '2026-09-16', '12:00:00', '13:30:00'), (7, 3, 4, 1, '2026-09-16', '14:00:00', '15:50:00'), (8, 4, 5, 3, '2026-09-17', '12:00:00', '13:50:00'), (9, 2, 3, 1, '2026-09-17', '14:00:00', '15:20:00'), (10, 1, 1, 1, '2026-09-21', '12:00:00', '13:30:00'), (11, 3, 4, 1, '2026-09-21', '14:00:00', '15:50:00'), (12, 1, 2, 2, '2026-09-22', '11:00:00', '11:50:00'), (13, 4, 5, 3, '2026-09-22', '12:00:00', '13:50:00'), (14, 2, 3, 1, '2026-09-22', '14:00:00', '15:20:00'), (15, 1, 1, 1, '2026-09-23', '12:00:00', '13:30:00'), (16, 3, 4, 1, '2026-09-23', '14:00:00', '15:50:00'), (17, 4, 5, 3, '2026-09-24', '12:00:00', '13:50:00'), (18, 2, 3, 1, '2026-09-24', '14:00:00', '15:20:00'), (19, 1, 1, 1, '2026-09-28', '12:00:00', '13:30:00'), (20, 3, 4, 1, '2026-09-28', '14:00:00', '15:50:00'), (21, 1, 2, 2, '2026-09-29', '11:00:00', '11:50:00'), (22, 4, 5, 3, '2026-09-29', '12:00:00', '13:50:00'), (23, 2, 3, 1, '2026-09-29', '14:00:00', '15:20:00'), (24, 1, 1, 1, '2026-09-30', '12:00:00', '13:30:00'), (25, 3, 4, 1, '2026-09-30', '14:00:00', '15:50:00'), (26, 4, 5, 3, '2026-10-01', '12:00:00', '13:50:00'), (27, 2, 3, 1, '2026-10-01', '14:00:00', '15:20:00'), (28, 1, 1, 1, '2026-10-05', '12:00:00', '13:30:00'), (29, 3, 4, 1, '2026-10-05', '14:00:00', '15:50:00'), (30, 1, 2, 2, '2026-10-06', '11:00:00', '11:50:00'), (31, 4, 5, 3, '2026-10-06', '12:00:00', '13:50:00'), (32, 2, 3, 1, '2026-10-06', '14:00:00', '15:20:00'), (33, 1, 1, 1, '2026-10-07', '12:00:00', '13:30:00'), (34, 3, 4, 1, '2026-10-07', '14:00:00', '15:50:00'), (35, 4, 5, 3, '2026-10-08', '12:00:00', '13:50:00'), (36, 2, 3, 1, '2026-10-08', '14:00:00', '15:20:00'); -- -------------------------------------------------------- -- -- Table structure for table `courses` -- CREATE TABLE `courses` ( `course_id` int(11) NOT NULL, `course_code` varchar(20) NOT NULL, `course_name` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `courses` -- INSERT INTO `courses` (`course_id`, `course_code`, `course_name`) VALUES (1, 'PHIL-260', 'Ethical Theory and Practice'), (2, 'WRIT-340', 'Advanced Writing'), (3, 'ACAD-475A', 'GX'), (4, 'ACAD-276', 'Dev II'); -- -------------------------------------------------------- -- -- Table structure for table `locations` -- CREATE TABLE `locations` ( `location_id` int(11) NOT NULL, `room_name` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `locations` -- INSERT INTO `locations` (`location_id`, `room_name`) VALUES (1, 'THH 201'), (2, 'MRF 206'), (3, 'GFS 220'), (4, 'IYH 210'), (5, 'IYH 210'); -- -------------------------------------------------------- -- -- Table structure for table `meeting_types` -- CREATE TABLE `meeting_types` ( `type_id` int(11) NOT NULL, `type_name` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `meeting_types` -- INSERT INTO `meeting_types` (`type_id`, `type_name`) VALUES (1, 'Lecture'), (2, 'Lab'), (3, 'Lecture/Lab'); -- -------------------------------------------------------- -- -- Stand-in structure for view `schedule_view` -- (See below for the actual view) -- CREATE TABLE `schedule_view` ( `MeetingID` int(11) ,`MeetingDate` date ,`StartTime` time ,`EndTime` time ,`Location` varchar(50) ,`Type` varchar(20) ,`Course` varchar(122) ); -- -- Indexes for dumped tables -- -- -- Indexes for table `class_meetings` -- ALTER TABLE `class_meetings` ADD PRIMARY KEY (`meeting_id`), ADD KEY `fk_meeting_course` (`course_id`), ADD KEY `fk_meeting_location` (`location_id`), ADD KEY `fk_meeting_type` (`type_id`); -- -- Indexes for table `courses` -- ALTER TABLE `courses` ADD PRIMARY KEY (`course_id`); -- -- Indexes for table `locations` -- ALTER TABLE `locations` ADD PRIMARY KEY (`location_id`); -- -- Indexes for table `meeting_types` -- ALTER TABLE `meeting_types` ADD PRIMARY KEY (`type_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `class_meetings` -- ALTER TABLE `class_meetings` MODIFY `meeting_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37; -- -- AUTO_INCREMENT for table `courses` -- ALTER TABLE `courses` MODIFY `course_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `locations` -- ALTER TABLE `locations` MODIFY `location_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `meeting_types` -- ALTER TABLE `meeting_types` MODIFY `type_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -------------------------------------------------------- -- -- Structure for view `schedule_view` -- DROP TABLE IF EXISTS `schedule_view`; CREATE ALGORITHM=UNDEFINED DEFINER=`medler`@`localhost` SQL SECURITY DEFINER VIEW `schedule_view` AS SELECT `cm`.`meeting_id` AS `MeetingID`, `cm`.`meeting_date` AS `MeetingDate`, `cm`.`start_time` AS `StartTime`, `cm`.`end_time` AS `EndTime`, `l`.`room_name` AS `Location`, `mt`.`type_name` AS `Type`, concat(`c`.`course_code`,': ',`c`.`course_name`) AS `Course` FROM (((`class_meetings` `cm` join `courses` `c` on((`cm`.`course_id` = `c`.`course_id`))) join `locations` `l` on((`cm`.`location_id` = `l`.`location_id`))) join `meeting_types` `mt` on((`cm`.`type_id` = `mt`.`type_id`))) ORDER BY `cm`.`meeting_date` ASC, `cm`.`start_time` ASC ; -- -- Constraints for dumped tables -- -- -- Constraints for table `class_meetings` -- ALTER TABLE `class_meetings` ADD CONSTRAINT `fk_meeting_course` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`), ADD CONSTRAINT `fk_meeting_location` FOREIGN KEY (`location_id`) REFERENCES `locations` (`location_id`), ADD CONSTRAINT `fk_meeting_type` FOREIGN KEY (`type_id`) REFERENCES `meeting_types` (`type_id`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;