CREATE TABLE `student_profile` (
  `serial_stp` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `serial_scy` INT NOT NULL,
  `serial_set` INT NOT NULL,
  `serial_spt` INT NOT NULL,
  `serial_lvl` INT NOT NULL,
  `profile_stp` VARCHAR(100) NOT NULL,
  `month_stp` VARCHAR(15) NOT NULL,
  `status_stp` ENUM('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_stp`),
  INDEX `school_year_student_profile_fk1_idx` (`serial_scy` ASC),
  INDEX `school_year_student_profile_fk2_idx` (`serial_lvl` ASC),
  INDEX `school_year_student_profile_fk3_idx` (`serial_set` ASC),
  INDEX `school_year_student_profile_fk4_idx` (`serial_spt` ASC),
  CONSTRAINT `school_year_student_profile_fk`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `level_student_profile_fk`
    FOREIGN KEY (`serial_lvl`)
    REFERENCES `level` (`serial_lvl`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `section_student_profile_fk`
    FOREIGN KEY (`serial_set`)
    REFERENCES `section` (`serial_set`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `specialty_student_profile_fk`
    FOREIGN KEY (`serial_spt`)
    REFERENCES `specialty` (`serial_spt`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
COMMENT = 'Contains student profiles related to PEP';