-- Database: `cms2` -- Table structure for table `class` CREATE TABLE `class` ( `classID` int NOT NULL, `courseID` int DEFAULT NULL, `teacherID` int DEFAULT NULL, `semester` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `year` int DEFAULT NULL, `room` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `schedule` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL ); INSERT INTO `class` (`classID`, `courseID`, `teacherID`, `semester`, `year`, `room`, `schedule`) VALUES (1, 1, 1, 'Summer', 2024, ' Room 201', '(M-F) at 10:00 AM'), (2, 2, 1, 'Summer', 2024, ' Room 202', '(M-F) at 10:00 AM'), (3, 3, 3, 'Summer', 2024, 'Room 203', '(M-F) at 1:00 PM'); -- -------------------------------------------------------- -- Table structure for table `classlist` CREATE TABLE `classlist` ( `classlistID` int NOT NULL, `classID` int DEFAULT NULL, `studentID` int DEFAULT NULL ); INSERT INTO `classlist` (`classlistID`, `classID`, `studentID`) VALUES (1, 1, 20151230), (2, 1, 20190748), (3, 1, 20180824), (4, 1, 20210436), (5, 1, 20210186), (6, 1, 20210427), (7, 1, 20211165), (8, 1, 20161710), (9, 1, 20151147), (10, 1, 20210733), (11, 1, 20190065), (12, 1, 20220050), (13, 1, 20220150), (14, 1, 20220250), (15, 1, 20220350), (16, 1, 20220450), (17, 1, 20220550), (18, 1, 20220650), (19, 1, 20220750), (20, 1, 20220850), (21, 2, 20220950), (22, 2, 20221050), (23, 2, 20221150), (24, 2, 20221250), (25, 2, 20221350), (26, 2, 20221450), (27, 2, 20221550), (28, 2, 20221650), (29, 2, 20221750), (30, 2, 20221850), (31, 2, 20221950), (32, 2, 20222050), (33, 2, 20222150), (34, 2, 20222250), (35, 2, 20222350); -- -------------------------------------------------------- -- Table structure for table `course` CREATE TABLE `course` ( `courseID` int NOT NULL, `coursename` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `description` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `units` int DEFAULT NULL ); INSERT INTO `course` (`courseID`, `coursename`, `description`, `units`) VALUES (1, 'Database Management System(CS101A)', 'Students are required to learn basic to advance database commands', 3), (2, 'Object Oriented Programming(CS102A).', 'Students are required to learn basic to advance OOP', 3), (3, 'IT228A-Advance Database Systems', 'Advanced topics in database systems.', 3); -- -------------------------------------------------------- -- Table structure for table `department` CREATE TABLE `department` ( `departmentID` int NOT NULL, `departmentName` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL ); INSERT INTO `department` (`departmentID`, `departmentName`) VALUES (1, 'College of Computer Studies'); -- -------------------------------------------------------- -- Table structure for table `enrollment` CREATE TABLE `enrollment` ( `enrollmentID` int NOT NULL, `classID` int DEFAULT NULL, `studentID` int DEFAULT NULL ); INSERT INTO `enrollment` (`enrollmentID`, `classID`, `studentID`) VALUES (1, 1, 20151230), (2, 1, 20190748), (3, 1, 20180824), (4, 1, 20210436), (5, 1, 20210186), (6, 1, 20210427), (7, 1, 20211165), (8, 1, 20161710), (9, 1, 20151147), (10, 1, 20210733), (11, 1, 20190065), (12, 1, 20220050), (13, 1, 20220150), (14, 1, 20220250), (15, 1, 20220350), (16, 1, 20220450), (17, 1, 20220550), (18, 1, 20220650), (19, 1, 20220750), (20, 1, 20220850), (21, 2, 20220950), (22, 2, 20221050), (23, 2, 20221150), (24, 2, 20221250), (25, 2, 20221350), (26, 2, 20221450), (27, 2, 20221550), (28, 2, 20221650), (29, 2, 20221750), (30, 2, 20221850), (31, 2, 20221950), (32, 2, 20222050), (33, 2, 20222150), (34, 2, 20222250), (35, 2, 20190748), (36, 3, 20210733), (37, 3, 20211165), (38, 3, 20220050), (39, 3, 20220150), (40, 3, 20220250), (41, 3, 20220350), (42, 3, 20220450), (43, 3, 20220550), (44, 3, 20220650), (45, 3, 20220750), (46, 3, 20220850), (47, 3, 20220950), (48, 3, 20221050), (49, 3, 20221150), (50, 3, 20221250), (51, 3, 20221350); -- -------------------------------------------------------- -- Table structure for table `grade` CREATE TABLE `grade` ( `gradeID` int NOT NULL, `enrollmentID` int DEFAULT NULL, `participation` decimal(5,2) DEFAULT NULL, `performance` decimal(5,2) DEFAULT NULL, `majorexam` decimal(5,2) DEFAULT NULL, `finaloutput` decimal(5,2) DEFAULT NULL, `dateupdated` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL ); INSERT INTO `grade` (`gradeID`, `enrollmentID`, `participation`, `performance`, `majorexam`, `finaloutput`, `dateupdated`) VALUES (1, 1, 56.00, 82.00, 90.00, 51.00, '2026-10-13'), (2, 2, 91.00, 100.00, 73.00, 66.00, '2026-10-13'), (3, 3, 63.00, 68.00, 51.00, 54.00, '2026-10-13'), (4, 4, 65.00, 64.00, 73.00, 75.00, '2026-10-13'), (5, 5, 56.00, 57.00, 68.00, 68.00, '2026-10-13'), (6, 6, 86.00, 74.00, 63.00, 96.00, '2026-10-13'), (7, 7, 88.00, 100.00, 88.00, 88.00, '2026-10-13'), (8, 8, 77.00, 73.00, 83.00, 95.00, '2026-10-13'), (9, 9, 74.00, 88.00, 65.00, 62.00, '2026-10-13'), (10, 10, 65.00, 92.00, 62.00, 86.00, '2026-10-13'), (11, 11, 93.00, 55.00, 99.00, 78.00, '2026-10-13'), (12, 12, 96.00, 91.00, 69.00, 71.00, '2026-10-13'), (13, 13, 99.00, 81.00, 56.00, 90.00, '2026-10-13'), (14, 14, 80.00, 79.00, 54.00, 86.00, '2026-10-13'), (15, 15, 67.00, 77.00, 82.00, 81.00, '2026-10-13'), (16, 16, 59.00, 55.00, 97.00, 66.00, '2026-10-13'), (17, 17, 93.00, 66.00, 50.00, 56.00, '2026-10-13'), (18, 18, 81.00, 84.00, 76.00, 78.00, '2026-10-13'), (19, 19, 62.00, 76.00, 97.00, 52.00, '2026-10-13'), (20, 20, 73.00, 56.00, 65.00, 55.00, '2026-10-13'), (21, 21, 82.00, 91.00, 61.00, 84.00, '2026-10-13'), (22, 22, 86.00, 78.00, 83.00, 79.00, '2026-10-13'), (23, 23, 98.00, 51.00, 64.00, 65.00, '2026-10-13'), (24, 24, 83.00, 70.00, 52.00, 100.00, '2026-10-13'), (25, 25, 93.00, 62.00, 83.00, 78.00, '2026-10-13'), (26, 26, 91.00, 68.00, 72.00, 52.00, '2026-10-13'), (27, 27, 98.00, 81.00, 63.00, 72.00, '2026-10-13'), (28, 28, 70.00, 87.00, 71.00, 98.00, '2026-10-13'), (29, 29, 72.00, 66.00, 68.00, 91.00, '2026-10-13'), (30, 30, 100.00, 76.00, 79.00, 69.00, '2026-10-13'), (31, 31, 57.00, 81.00, 82.00, 66.00, '2026-10-13'), (32, 32, 84.00, 71.00, 52.00, 52.00, '2026-10-13'), (33, 33, 53.00, 59.00, 85.00, 97.00, '2026-10-13'), (34, 34, 79.00, 56.00, 93.00, 96.00, '2026-10-13'), (35, 35, 50.00, 67.00, 83.00, 61.00, '2026-10-13'); -- -------------------------------------------------------- CREATE TABLE `student` ( `studentID` int NOT NULL, `name` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `lname` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `fname` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `mname` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `dateOfBirth` date DEFAULT NULL, `barangay` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `city` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `province` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `country` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `email` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `phone` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL ); INSERT INTO `student` (`studentID`, `name`, `lname`, `fname`, `mname`, `dateOfBirth`, `barangay`, `city`, `province`, `country`, `email`, `phone`) VALUES (20151147, 'ROMAS ADAM R.', '', 'ROMAS ADAM', 'R.', '2002-12-11', 'Balugo', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'adam.romas@foundationu.com', '0213123123109'), (20151230, 'BALASABAS, ROSE SHARON M.', 'BALASABAS', 'ROSE SHARON', 'M.', '2002-03-08', 'Batinguel', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'rosesharon.balasabas@foundationu.com', '021312312312'), (20161710, 'NILLAS MA GWYNETH MAY T.', '', 'NILLAS MA GWYNETH MAY', 'T.', '2001-05-20', 'Balugo', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'ma.gwynethmay.nillas@foundationu.com', '0213123123133'), (20180824, 'CAGMAT PRINCESS O.', '', 'CAGMAT PRINCESS', 'O.', '2001-02-05', 'Balugo', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'princess.cagmat@foundationu.com', '021312312322'), (20190065, 'VINCOY JOHN CHRISLAR D.', '', 'VINCOY JOHN CHRISLAR', 'D.', '2002-02-20', 'Poblacion', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'johnchrislar.vincoy@foundationu.com', '0213123123199'), (20190748, 'BALDOZA TACHE JEYNARD L.', '', 'BALDOZA TACHE JEYNARD', 'L.', '2002-12-05', 'Canduay', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'tachejeynard.baldoza@foundationu.com', '021312312356'), (20210186, 'ENTIA KAYE Z.', '', 'ENTIA KAYE', 'Z.', '1999-07-11', 'Batinguel', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'kaye.entia@foundationu.com', '0213123123112'), (20210427, 'INOFERIO LOUIE JAY G.', '', 'INOFERIO LOUIE JAY', 'G.', '2002-06-19', 'Batinguel', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'louiejay.inoferio@foundationu.com', '0213123123164'), (20210436, 'CATACUTAN KINNITH JAY G.', '', 'CATACUTAN KINNITH JAY', 'G.', '2002-01-10', 'Batinguel', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'kinnithjay.catacutan@foundationu.com', '021312312319'), (20210733, 'TAUB CHARLIE ELTON A.', '', 'TAUB CHARLIE ELTON', 'A.', '2002-02-20', 'Balugo', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'charlieelton.taub@foundationu.com', '0213123123111'), (20211165, 'MACALUA DWAIN G.', '', 'MACALUA DWAIN', 'G.', '2002-06-19', 'Batinguel', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'dwain.macalua@foundationu.com', '021312312312'), (20220050, 'ALOJADO ADRIANE T.', '', 'ALOJADO ADRIANE', 'T.', '2002-02-14', 'Poblacion', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'adriane.alojado@foundationu.com', '0213123123134'), (20220150, 'ELECO JONATHAN Z.', '', 'ELECO JONATHAN', 'Z.', '2001-02-10', 'Poblacion', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'jonathanjr.eleco@foundationu.com', '0213123123144'), (20220250, 'ALCORIZA FLAUREN GEFF G.', '', 'ALCORIZA FLAUREN GEFF', 'G.', '2000-01-12', 'Poblacion', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'flaurengeff.alcoriza@foundationu.com', '0213123123112'), (20220350, 'DELA CRUZ MARIA A.', '', 'DELA CRUZ MARIA', 'A.', '2001-08-15', 'Looc', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'maria.delacruz@foundationu.com', '0213123123210'), (20220450, 'FERNANDEZ JUAN P.', '', 'FERNANDEZ JUAN', 'P.', '2002-09-25', 'Tabuc-tubig', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'juan.fernandez@foundationu.com', '0213123123221'), (20220550, 'GARCIA LUISA M.', '', 'GARCIA LUISA', 'M.', '2001-03-14', 'Poblacion', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'luisa.garcia@foundationu.com', '0213123123132'), (20220650, 'HERNANDEZ MIGUEL A.', '', 'HERNANDEZ MIGUEL', 'A.', '2002-07-30', 'Calindagan', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'miguel.hernandez@foundationu.com', '0213123123143'), (20220750, 'IVANOV IVAN D.', '', 'IVANOV IVAN', 'D.', '2000-12-05', 'Pulantubig', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'ivan.ivanov@foundationu.com', '0213123123154'), (20220850, 'JIMENEZ ALEXANDRA L.', '', 'JIMENEZ ALEXANDRA', 'L.', '2001-11-22', 'Cadawinonan', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'alexandra.jimenez@foundationu.com', '0213123123165'), (20220950, 'LIM, RYAN K.', 'LIM', 'RYAN', 'K.', '2001-10-10', 'Bagacay', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'ryan.lim@foundationu.com', '0213123123121'), (20221050, 'DAVID, ANGELA B.', 'DAVID', 'ANGELA', 'B.', '2000-11-11', 'Batinguel', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'angela.david@foundationu.com', '0213123123122'), (20221150, 'CRUZ, MARIO S.', 'CRUZ', 'MARIO', 'S.', '2002-02-12', 'Canduay', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'mario.cruz@foundationu.com', '0213123123123'), (20221250, 'BAUTISTA, LUKE N.', 'BAUTISTA', 'LUKE', 'N.', '2001-03-13', 'Tabuc-tubig', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'luke.bautista@foundationu.com', '0213123123124'), (20221350, 'SORIANO, PAMELA O.', 'SORIANO', 'PAMELA', 'O.', '2002-04-14', 'Looc', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'pamela.soriano@foundationu.com', '0213123123125'), (20221450, 'RIVERA, KARLA J.', 'RIVERA', 'KARLA', 'J.', '2000-05-15', 'Balugo', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'karla.rivera@foundationu.com', '0213123123126'), (20221550, 'LOPEZ, ERIC P.', 'LOPEZ', 'ERIC', 'P.', '2001-06-16', 'Cadawinonan', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'eric.lopez@foundationu.com', '0213123123127'), (20221650, 'GONZALES, ISABEL R.', 'GONZALES', 'ISABEL', 'R.', '2002-07-17', 'Calindagan', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'isabel.gonzales@foundationu.com', '0213123123128'), (20221750, 'MENDOZA, CHRIS M.', 'MENDOZA', 'CHRIS', 'M.', '2001-08-18', 'Poblacion', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'chris.mendoza@foundationu.com', '0213123123129'), (20221850, 'TORRES, MICHAEL A.', 'TORRES', 'MICHAEL', 'A.', '2002-09-19', 'Pulantubig', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'michael.torres@foundationu.com', '0213123123130'), (20221950, 'SANTIAGO, LARA E.', 'SANTIAGO', 'LARA', 'E.', '2000-10-20', 'Bagacay', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'lara.santiago@foundationu.com', '0213123123131'), (20222050, 'OCAMPO, JUAN A.', 'OCAMPO', 'JUAN', 'A.', '2001-11-21', 'Balugo', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'juan.ocampo@foundationu.com', '0213123123132'), (20222150, 'REYES, ANA P.', 'REYES', 'ANA', 'P.', '2002-12-22', 'Cadawinonan', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'ana.reyes@foundationu.com', '0213123123133'), (20222250, 'VELASCO, JAMES N.', 'VELASCO', 'JAMES', 'N.', '2000-01-23', 'Calindagan', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'james.velasco@foundationu.com', '0213123123134'), (20222350, 'CRUZ, NINA G.', 'CRUZ', 'NINA', 'G.', '2001-02-24', 'Tabuc-tubig', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'nina.cruz@foundationu.com', '0213123123135'); -- -------------------------------------------------------- CREATE TABLE `teacher` ( `teacherID` int NOT NULL, `name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `lname` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `fname` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `mname` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `dateOfBirth` date DEFAULT NULL, `barangay` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `city` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `province` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `country` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `email` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL, `phone` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL ); INSERT INTO `teacher` (`teacherID`, `name`, `lname`, `fname`, `mname`, `dateOfBirth`, `barangay`, `city`, `province`, `country`, `email`, `phone`) VALUES (1, 'DOE JOHN R', '', 'DOE JOHN', 'R', '2001-12-11', 'Cadawinonan', 'Dumaguete City', 'Negros Oriental', 'Philippines', 'johndoeservices@foundationu.com', '0213123123100'), (3, 'DOE, JANE CRUZ', 'DOE', 'JANE', 'CRUZ', NULL, NULL, NULL, NULL, 'Philippines', 'jane.doe@foundationu.com', NULL); -- Indexes for table `class` ALTER TABLE `class` ADD PRIMARY KEY (`classID`), ADD KEY `courseID` (`courseID`), ADD KEY `teacherID` (`teacherID`); -- Indexes for table `classlist` ALTER TABLE `classlist` ADD PRIMARY KEY (`classlistID`), ADD KEY `classID` (`classID`), ADD KEY `studentID` (`studentID`); -- Indexes for table `course` ALTER TABLE `course` ADD PRIMARY KEY (`courseID`); -- Indexes for table `department` ALTER TABLE `department` ADD PRIMARY KEY (`departmentID`); -- Indexes for table `enrollment` ALTER TABLE `enrollment` ADD PRIMARY KEY (`enrollmentID`), ADD KEY `classID` (`classID`), ADD KEY `studentID` (`studentID`); -- Indexes for table `grade` ALTER TABLE `grade` ADD PRIMARY KEY (`gradeID`), ADD KEY `enrollmentID` (`enrollmentID`); -- Indexes for table `student` ALTER TABLE `student` ADD PRIMARY KEY (`studentID`); -- Indexes for table `teacher` ALTER TABLE `teacher` ADD PRIMARY KEY (`teacherID`); -- AUTO_INCREMENT for table `class` ALTER TABLE `class` MODIFY `classID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- AUTO_INCREMENT for table `classlist` ALTER TABLE `classlist` MODIFY `classlistID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36; -- AUTO_INCREMENT for table `course` ALTER TABLE `course` MODIFY `courseID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- AUTO_INCREMENT for table `department` ALTER TABLE `department` MODIFY `departmentID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- AUTO_INCREMENT for table `enrollment` ALTER TABLE `enrollment` MODIFY `enrollmentID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67; -- AUTO_INCREMENT for table `grade` ALTER TABLE `grade` MODIFY `gradeID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36; -- AUTO_INCREMENT for table `student` ALTER TABLE `student` MODIFY `studentID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20222352; -- AUTO_INCREMENT for table `teacher` ALTER TABLE `teacher` MODIFY `teacherID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- Constraints for table `class` ALTER TABLE `class` ADD CONSTRAINT `class_ibfk_1` FOREIGN KEY (`courseID`) REFERENCES `course` (`courseID`), ADD CONSTRAINT `class_ibfk_2` FOREIGN KEY (`teacherID`) REFERENCES `teacher` (`teacherID`); -- Constraints for table `classlist` ALTER TABLE `classlist` ADD CONSTRAINT `classlist_ibfk_1` FOREIGN KEY (`classID`) REFERENCES `class` (`classID`), ADD CONSTRAINT `classlist_ibfk_2` FOREIGN KEY (`studentID`) REFERENCES `student` (`studentID`); -- Constraints for table `enrollment` ALTER TABLE `enrollment` ADD CONSTRAINT `enrollment_ibfk_1` FOREIGN KEY (`classID`) REFERENCES `class` (`classID`), ADD CONSTRAINT `enrollment_ibfk_2` FOREIGN KEY (`studentID`) REFERENCES `student` (`studentID`); -- Constraints for table `grade` ALTER TABLE `grade` ADD CONSTRAINT `grade_ibfk_1` FOREIGN KEY (`enrollmentID`) REFERENCES `enrollment` (`enrollmentID`); COMMIT; -- Query statements here -- select * from student;
To embed this project on your website, copy the following code and paste it into your website's HTML: