表一t_class:
CREATE TABLE `t_class` (
`id` int(20) NOT NULL,`ClassName` varchar(20) DEFAULT NULL,
`GradeID` int(11) DEFAULT NULL,
`ClassDesc` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_t_class` (`GradeID`),
CONSTRAINT `FK_t_class` FOREIGN KEY (`GradeID`) REFERENCES `t_grade` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
表二t_grade:
CREATE TABLE `t_grade` (
`id` int(10) NOT NULL,
`GradeName` varchar(20) DEFAULT NULL,
`GradeDesc` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
表三t_student:
CREATE TABLE `t_student` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`Student