-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 18, 2023 at 06:31 AM
-- Server version: 5.7.43
-- PHP Version: 8.1.16

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: `jsteinho_schedule`
--

-- --------------------------------------------------------

--
-- Table structure for table `classes`
--

CREATE TABLE `classes` (
  `class_id` int(11) NOT NULL,
  `class` varchar(64) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `classes`
--

INSERT INTO `classes` (`class_id`, `class`) VALUES
(1, 'ACAD 324: The Practice of Design: Ideation to Innovation'),
(2, 'BISC 102: Humans and Their Environment'),
(3, 'ACAD 276: Dev II'),
(4, 'ACAD 240: Materials: Denim to Nanotubes');

-- --------------------------------------------------------

--
-- Table structure for table `classrooms`
--

CREATE TABLE `classrooms` (
  `classroom_id` int(11) NOT NULL,
  `classroom` varchar(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `classrooms`
--

INSERT INTO `classrooms` (`classroom_id`, `classroom`) VALUES
(1, 'IYH210'),
(2, 'IYH212'),
(3, 'MRF340'),
(4, 'ZHS257');

-- --------------------------------------------------------

--
-- Table structure for table `schedule`
--

CREATE TABLE `schedule` (
  `schedule_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `classroom_id` int(11) NOT NULL,
  `type_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `schedule`
--

INSERT INTO `schedule` (`schedule_id`, `date`, `start_time`, `end_time`, `classroom_id`, `type_id`, `class_id`) VALUES
(1, '2023-09-11', '09:00:00', '11:50:00', 2, 1, 1),
(2, '2023-09-12', '09:30:00', '10:50:00', 3, 1, 2),
(3, '2023-09-12', '12:00:00', '13:50:00', 4, 2, 2),
(4, '2023-09-12', '14:00:00', '16:50:00', 1, 1, 3),
(5, '2023-09-12', '18:00:00', '19:50:00', 2, 1, 4),
(6, '2023-09-13', '09:00:00', '11:50:00', 2, 1, 1),
(7, '2023-09-14', '09:30:00', '10:50:00', 3, 1, 2),
(8, '2023-09-14', '14:00:00', '16:50:00', 1, 1, 3),
(9, '2023-09-14', '18:00:00', '19:50:00', 2, 1, 4),
(10, '2023-09-18', '09:00:00', '11:50:00', 2, 1, 1),
(11, '2023-09-19', '09:30:00', '10:50:00', 3, 1, 2),
(12, '2023-09-19', '12:00:00', '13:50:00', 4, 2, 2),
(13, '2023-09-19', '14:00:00', '16:50:00', 1, 1, 3),
(14, '2023-09-19', '18:00:00', '19:50:00', 2, 1, 4),
(15, '2023-09-20', '09:00:00', '11:50:00', 2, 1, 1),
(16, '2023-09-21', '09:30:00', '10:50:00', 3, 1, 2),
(17, '2023-09-21', '14:00:00', '16:50:00', 1, 1, 3),
(18, '2023-09-21', '18:00:00', '19:50:00', 2, 1, 4),
(19, '2023-09-25', '09:00:00', '11:50:00', 2, 1, 1),
(20, '2023-09-26', '09:30:00', '10:50:00', 3, 1, 2),
(21, '2023-09-26', '12:00:00', '13:50:00', 4, 2, 2),
(22, '2023-09-26', '14:00:00', '16:50:00', 1, 1, 3),
(23, '2023-09-26', '18:00:00', '19:50:00', 2, 1, 4),
(24, '2023-09-27', '09:00:00', '11:50:00', 2, 1, 1),
(25, '2023-09-28', '09:30:00', '10:50:00', 3, 1, 2),
(26, '2023-09-28', '14:00:00', '16:50:00', 1, 1, 3),
(27, '2023-09-28', '18:00:00', '19:50:00', 2, 1, 4),
(28, '2023-10-25', '09:00:00', '11:50:00', 2, 1, 1),
(29, '2023-10-26', '09:30:00', '10:50:00', 3, 1, 2),
(30, '2023-10-26', '12:00:00', '13:50:00', 4, 2, 2),
(31, '2023-10-26', '14:00:00', '16:50:00', 1, 1, 3),
(32, '2023-10-26', '18:00:00', '19:50:00', 2, 1, 4),
(33, '2023-10-27', '09:00:00', '11:50:00', 2, 1, 1),
(34, '2023-10-28', '09:30:00', '10:50:00', 3, 1, 2),
(35, '2023-10-28', '14:00:00', '16:50:00', 1, 1, 3),
(36, '2023-10-28', '18:00:00', '19:50:00', 2, 1, 4);

-- --------------------------------------------------------

--
-- Table structure for table `type`
--

CREATE TABLE `type` (
  `type_id` int(11) NOT NULL,
  `type` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `type`
--

INSERT INTO `type` (`type_id`, `type`) VALUES
(1, 'Lecture'),
(2, 'Lab');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `classes`
--
ALTER TABLE `classes`
  ADD PRIMARY KEY (`class_id`);

--
-- Indexes for table `classrooms`
--
ALTER TABLE `classrooms`
  ADD PRIMARY KEY (`classroom_id`);

--
-- Indexes for table `schedule`
--
ALTER TABLE `schedule`
  ADD PRIMARY KEY (`schedule_id`),
  ADD KEY `classroom_id` (`classroom_id`),
  ADD KEY `type_id` (`type_id`),
  ADD KEY `class_id` (`class_id`);

--
-- Indexes for table `type`
--
ALTER TABLE `type`
  ADD PRIMARY KEY (`type_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `classes`
--
ALTER TABLE `classes`
  MODIFY `class_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `classrooms`
--
ALTER TABLE `classrooms`
  MODIFY `classroom_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `schedule`
--
ALTER TABLE `schedule`
  MODIFY `schedule_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT for table `type`
--
ALTER TABLE `type`
  MODIFY `type_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `schedule`
--
ALTER TABLE `schedule`
  ADD CONSTRAINT `schedule_ibfk_1` FOREIGN KEY (`classroom_id`) REFERENCES `classrooms` (`classroom_id`),
  ADD CONSTRAINT `schedule_ibfk_2` FOREIGN KEY (`class_id`) REFERENCES `classes` (`class_id`),
  ADD CONSTRAINT `schedule_ibfk_3` FOREIGN KEY (`type_id`) REFERENCES `type` (`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 */;
