-- -- Table structure for table `family` -- DROP TABLE IF EXISTS `family`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `family` ( `serial_fml` int(11) NOT NULL AUTO_INCREMENT, `first_surname_fml` varchar(255) NOT NULL, `last_surname_fml` varchar(255) DEFAULT NULL, `address_fml` text, `phone_fml` varchar(255) DEFAULT NULL, `status_fml` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE', PRIMARY KEY (`serial_fml`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `family_guardian` -- DROP TABLE IF EXISTS `family_guardian`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `family_guardian` ( `serial_grd` int(11) NOT NULL, `serial_fml` int(11) NOT NULL, `status_fmg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE', PRIMARY KEY (`serial_grd`,`serial_fml`), KEY `fk_relationship_345` (`serial_fml`), CONSTRAINT `fk_relationship_343` FOREIGN KEY (`serial_grd`) REFERENCES `guardian` (`serial_grd`), CONSTRAINT `fk_relationship_345` FOREIGN KEY (`serial_fml`) REFERENCES `family` (`serial_fml`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `special_subject_course` -- DROP TABLE IF EXISTS `special_subject_course`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `special_subject_course` ( `serial_sps` int(11) NOT NULL AUTO_INCREMENT, `serial_emp` int(11) DEFAULT NULL, `serial_csb` int(11) DEFAULT NULL, `serial_crs` int(11) DEFAULT NULL, `nomenclature_sps` text, PRIMARY KEY (`serial_sps`), KEY `fk_relationship_357` (`serial_csb`), KEY `fk_relationship_358` (`serial_crs`), KEY `fk_relationship_359` (`serial_emp`), CONSTRAINT `fk_relationship_357` FOREIGN KEY (`serial_csb`) REFERENCES `cat_subject` (`serial_csb`), CONSTRAINT `fk_relationship_358` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`), CONSTRAINT `fk_relationship_359` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `special_subject_discipline_grade` -- DROP TABLE IF EXISTS `special_subject_discipline_grade`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `special_subject_discipline_grade` ( `serial_sps` int(11) DEFAULT NULL, `serial_sbp` int(11) DEFAULT NULL, `serial_prd` int(11) DEFAULT NULL, `discipline_spg` text, `serial_std` int(11) DEFAULT NULL, KEY `fk_relationship_370` (`serial_sps`), KEY `fk_relationship_371` (`serial_std`), KEY `fk_relationship_372` (`serial_prd`), KEY `fk_relationship_373` (`serial_sbp`), CONSTRAINT `fk_relationship_370` FOREIGN KEY (`serial_sps`) REFERENCES `special_subject_course` (`serial_sps`), CONSTRAINT `fk_relationship_371` FOREIGN KEY (`serial_std`) REFERENCES `student_by_course` (`serial_std`), CONSTRAINT `fk_relationship_372` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`), CONSTRAINT `fk_relationship_373` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `special_subject_grade` -- DROP TABLE IF EXISTS `special_subject_grade`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `special_subject_grade` ( `serial_sbp` int(11) DEFAULT NULL, `serial_sps` int(11) DEFAULT NULL, `serial_prd` int(11) DEFAULT NULL, `grade_spg` text, `serial_std` int(11) DEFAULT NULL, `date_spg` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, KEY `fk_relationship_360` (`serial_sps`), KEY `fk_relationship_361` (`serial_std`), KEY `fk_relationship_362` (`serial_prd`), KEY `fk_relationship_363` (`serial_sbp`), CONSTRAINT `fk_relationship_360` FOREIGN KEY (`serial_sps`) REFERENCES `special_subject_course` (`serial_sps`), CONSTRAINT `fk_relationship_361` FOREIGN KEY (`serial_std`) REFERENCES `student_by_course` (`serial_std`), CONSTRAINT `fk_relationship_362` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`), CONSTRAINT `fk_relationship_363` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `student_subject_subperiod_average` -- DROP TABLE IF EXISTS `student_subject_subperiod_average`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `student_subject_subperiod_average` ( `serial_sss` int(11) NOT NULL AUTO_INCREMENT, `serial_lop` int(11) DEFAULT NULL, `serial_sbc` int(11) DEFAULT NULL, `serial_sbp` int(11) DEFAULT NULL, `serial_std` int(11) DEFAULT NULL, `serial_spt` int(11) DEFAULT NULL, `serial_lvl` int(11) DEFAULT NULL, `serial_scy` int(11) DEFAULT NULL, `serial_set` int(11) DEFAULT NULL, `average_sss` decimal(8,5) DEFAULT NULL, PRIMARY KEY (`serial_sss`), KEY `fk_relationship_346` (`serial_sbp`), KEY `fk_relationship_347` (`serial_sbc`), KEY `fk_relationship_348` (`serial_lop`), KEY `fk_relationship_349` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`), CONSTRAINT `fk_relationship_346` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`), CONSTRAINT `fk_relationship_347` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`), CONSTRAINT `fk_relationship_348` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`), CONSTRAINT `fk_relationship_349` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `student_subperiod_discipline_subject` -- DROP TABLE IF EXISTS `student_subperiod_discipline_subject`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `student_subperiod_discipline_subject` ( `serial_sdg` int(11) NOT NULL AUTO_INCREMENT, `serial_sbp` int(11) DEFAULT NULL, `serial_sbc` int(11) DEFAULT NULL, `serial_lop` int(11) DEFAULT NULL, `serial_std` int(11) DEFAULT NULL, `serial_spt` int(11) DEFAULT NULL, `serial_lvl` int(11) DEFAULT NULL, `serial_scy` int(11) DEFAULT NULL, `serial_set` int(11) DEFAULT NULL, `grade_sdg` decimal(8,5) DEFAULT NULL, PRIMARY KEY (`serial_sdg`), KEY `fk_relationship_353` (`serial_lop`), KEY `fk_relationship_354` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`), KEY `fk_relationship_355` (`serial_sbc`), KEY `fk_relationship_356` (`serial_sbp`), CONSTRAINT `fk_relationship_353` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`), CONSTRAINT `fk_relationship_354` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`), CONSTRAINT `fk_relationship_355` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`), CONSTRAINT `fk_relationship_356` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `student_subperiod_discipline_supervisor` -- DROP TABLE IF EXISTS `student_subperiod_discipline_supervisor`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `student_subperiod_discipline_supervisor` ( `serial_sds` int(11) NOT NULL AUTO_INCREMENT, `serial_sbp` int(11) DEFAULT NULL, `serial_std` int(11) DEFAULT NULL, `serial_spt` int(11) DEFAULT NULL, `serial_lvl` int(11) DEFAULT NULL, `serial_scy` int(11) DEFAULT NULL, `serial_set` int(11) DEFAULT NULL, `grade_sds` decimal(8,5) DEFAULT NULL, PRIMARY KEY (`serial_sds`), KEY `fk_relationship_454` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`), KEY `fk_relationship_456` (`serial_sbp`), CONSTRAINT `fk_relationship_454` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`), CONSTRAINT `fk_relationship_456` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;