--
-- Table structure for table `weight_and_height_measurement_by_course`
--

DROP TABLE IF EXISTS `weight_and_height_measurement_by_course`;

CREATE TABLE `weight_and_height_measurement_by_course` (
  `serial_whm` int(11) NOT NULL auto_increment,
  `serial_crs` int(11) NOT NULL,
  `date_whm` date NOT NULL,
  `status_whm` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_whm`),
  KEY `fk_relationship_8877` (`serial_crs`),
  CONSTRAINT `fk_relationship_8877` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `student_weight_and_height_by_course`
--

DROP TABLE IF EXISTS `student_weight_and_height_by_course`;
 
CREATE TABLE `student_weight_and_height_by_course` (
  `serial_swh` int(11) NOT NULL auto_increment,
  `serial_whm` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `height_swh` DECIMAL( 5, 2 ) NULL DEFAULT NULL,
  `weight_swh` DECIMAL( 5, 2 ) NULL DEFAULT NULL,
  `bmi_swh` DECIMAL( 4, 2 ) NULL DEFAULT NULL ,
  `percentile_swh` DECIMAL( 5, 2 ) NULL DEFAULT NULL,
  `date_swh` date NOT NULL,
  `status_swh` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_swh`),
  KEY `fk_relationship_8888` (`serial_whm`),
  KEY `fk_relationship_8889` (`serial_std`),
  CONSTRAINT `fk_relationship_8888` FOREIGN KEY (`serial_whm`) REFERENCES `weight_and_height_measurement_by_course` (`serial_whm`),
  CONSTRAINT `fk_relationship_8889` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;