use University;
-- delete from prereq;
-- delete from time_slot;
-- delete from advisor;
-- delete from takes;
-- delete from student;
-- delete from teaches;
-- delete from section;
-- delete from instructor;
-- delete from course;
-- delete from department;
-- delete from classroom;

insert into classroom values ('南疆雨林', '101', '500');
insert into classroom values ('嵩山少林', '514', '10');
insert into classroom values ('湖底深渊', '3128', '70');
insert into classroom values ('精武馆', '100', '30');
insert into classroom values ('精武馆', '120', '50');

insert into department values ('拳脚学院', '精武馆', '90000');
insert into department values ('内功学院', '湖底深渊', '100000');
insert into department values ('兵器学院', '嵩山少林', '120000');
insert into department values ('邪门学院', '南疆雨林', '80000');

insert into course values ('cq1', '少林长拳', '拳脚学院', '4');
insert into course values ('cq2', '散打', '拳脚学院', '4');
insert into course values ('cq3', '自由搏击', '拳脚学院', '3');
insert into course values ('cn1', '内功基础', '内功学院', '4');
insert into course values ('cn2', '九阴真经', '内功学院', '4');
insert into course values ('cn3', '九阳神功', '内功学院', '3');
insert into course values ('cn4', '易筋经', '内功学院', '3');
insert into course values ('cn5', '太极', '内功学院', '3');
insert into course values ('cb1', '刀法', '兵器学院', '3');
insert into course values ('cb2', '枪法', '兵器学院', '3');
insert into course values ('cb3', '剑法', '兵器学院', '3');
insert into course values ('cx1', '坑蒙拐骗', '邪门学院', '3');
insert into course values ('cx2', '整蛊术', '邪门学院', '4');

insert into instructor values ('10101', '张无忌', '内功学院', '65000');
insert into instructor values ('12121', '杨铁心', '兵器学院', '90000');
insert into instructor values ('15151', '韦小宝', '邪门学院', '40000');
insert into instructor values ('22222', '挞拔玉儿', '邪门学院', '95000');
insert into instructor values ('32343', '令狐冲', '兵器学院', '60000');
insert into instructor values ('33456', '裘千仞', '邪门学院', '87000');
insert into instructor values ('45565', '虚竹', '内功学院', '75000');
insert into instructor values ('58583', '独孤九剑', '兵器学院', '62000');
insert into instructor values ('76543', '宇文拓', '兵器学院', '80000');
insert into instructor values ('76766', '乔峰', '拳脚学院', '72000');
insert into instructor values ('83821', '黄老邪', '内功学院', '92000');
insert into instructor values ('98345', '胡一刀', '兵器学院', '80000');

insert into section values ('cq1', '1', 'Summer', '2009', '嵩山少林', '514', 'B');
insert into section values ('cq2', '1', 'Summer', '2010', '嵩山少林', '514', 'A');
insert into section values ('cn1', '1', 'Fall', '2009', '南疆雨林', '101', 'H');
insert into section values ('cn1', '1', 'Spring', '2010', '南疆雨林', '101', 'F');
insert into section values ('cn2', '1', 'Spring', '2009', '湖底深渊', '3128', 'E');
insert into section values ('cn2', '2', 'Spring', '2009', '湖底深渊', '3128', 'A');
insert into section values ('cn3', '1', 'Spring', '2010', '精武馆', '120', 'D');
insert into section values ('cn4', '1', 'Spring', '2010', '精武馆', '100', 'B');
insert into section values ('cn4', '2', 'Spring', '2010', '湖底深渊', '3128', 'C');
insert into section values ('cn5', '1', 'Fall', '2009', '湖底深渊', '3128', 'A');
insert into section values ('cb1', '1', 'Spring', '2009', '湖底深渊', '3128', 'C');
insert into section values ('cb2', '1', 'Spring', '2010', '南疆雨林', '101', 'B');
insert into section values ('cb3', '1', 'Spring', '2010', '嵩山少林', '514', 'C');
insert into section values ('cx1', '1', 'Spring', '2010', '南疆雨林', '101', 'D');
insert into section values ('cx2', '1', 'Fall', '2009', '精武馆', '100', 'A');

insert into teaches values ('10101', 'cn1', '1', 'Fall', '2009');
insert into teaches values ('10101', 'cn3', '1', 'Spring', '2010');
insert into teaches values ('10101', 'cn5', '1', 'Fall', '2009');
insert into teaches values ('12121', 'cb2', '1', 'Spring', '2010');
insert into teaches values ('15151', 'cx1', '1', 'Spring', '2010');
insert into teaches values ('22222', 'cx2', '1', 'Fall', '2009');
insert into teaches values ('32343', 'cb3', '1', 'Spring', '2010');
insert into teaches values ('45565', 'cn1', '1', 'Spring', '2010');
insert into teaches values ('45565', 'cn4', '1', 'Spring', '2010');
insert into teaches values ('76766', 'cq1', '1', 'Summer', '2009');
insert into teaches values ('76766', 'cq2', '1', 'Summer', '2010');
insert into teaches values ('83821', 'cn2', '1', 'Spring', '2009');
insert into teaches values ('83821', 'cn2', '2', 'Spring', '2009');
insert into teaches values ('83821', 'cn4', '2', 'Spring', '2010');
insert into teaches values ('98345', 'cb1', '1', 'Spring', '2009');

insert into student values ('00128', '丘处机', '内功学院', '102');
insert into student values ('12345', '段誉', '内功学院', '32');
insert into student values ('19991', '林平之', '兵器学院', '80');
insert into student values ('23121', '穆念慈', '兵器学院', '110');
insert into student values ('44553', '蓝凤凰', '邪门学院', '56');
insert into student values ('45678', '郭靖', '邪门学院', '46');
insert into student values ('54321', '杨过', '内功学院', '54');
insert into student values ('55739', '沙通天', '邪门学院', '38');
insert into student values ('70557', '杨康', '邪门学院', '0');
insert into student values ('76543', '段正淳', '内功学院', '58');
insert into student values ('76653', '胡斐', '兵器学院', '60');
insert into student values ('98765', '李莫愁', '兵器学院', '98');
insert into student values ('98988', '陈近南', '拳脚学院', '120');

insert into takes values ('00128', 'cn1', '1', 'Fall', '2009', 'A');
insert into takes values ('00128', 'cn5', '1', 'Fall', '2009', 'A-');
insert into takes values ('12345', 'cn1', '1', 'Fall', '2009', 'C');
insert into takes values ('12345', 'cn2', '2', 'Spring', '2009', 'A');
insert into takes values ('12345', 'cn3', '1', 'Spring', '2010', 'A');
insert into takes values ('12345', 'cn5', '1', 'Fall', '2009', 'A');
insert into takes values ('19991', 'cb3', '1', 'Spring', '2010', 'B');
insert into takes values ('23121', 'cb2', '1', 'Spring', '2010', 'C+');
insert into takes values ('44553', 'cx2', '1', 'Fall', '2009', 'B-');
insert into takes values ('45678', 'cn1', '1', 'Fall', '2009', 'F');
insert into takes values ('45678', 'cn1', '1', 'Spring', '2010', 'B+');
insert into takes values ('45678', 'cn4', '1', 'Spring', '2010', 'B');
insert into takes values ('54321', 'cn1', '1', 'Fall', '2009', 'A-');
insert into takes values ('54321', 'cn2', '2', 'Spring', '2009', 'B+');
insert into takes values ('55739', 'cx1', '1', 'Spring', '2010', 'A-');
insert into takes values ('76543', 'cn1', '1', 'Fall', '2009', 'A');
insert into takes values ('76543', 'cn4', '2', 'Spring', '2010', 'A');
insert into takes values ('76653', 'cb1', '1', 'Spring', '2009', 'A');
insert into takes values ('98765', 'cn1', '1', 'Fall', '2009', 'C-');
insert into takes values ('98765', 'cn3', '1', 'Spring', '2010', 'B');
insert into takes values ('98988', 'cq1', '1', 'Summer', '2009', 'A');
insert into takes values ('98988', 'cq2', '1', 'Summer', '2010', null);

insert into advisor values ('00128', '45565');
insert into advisor values ('12345', '10101');
insert into advisor values ('23121', '76543');
insert into advisor values ('44553', '22222');
insert into advisor values ('45678', '22222');
insert into advisor values ('76543', '45565');
insert into advisor values ('76653', '98345');
insert into advisor values ('98765', '98345');
insert into advisor values ('98988', '76766');

insert into time_slot values ('A', 'M', '8', '0', '8', '50');
insert into time_slot values ('A', 'W', '8', '0', '8', '50');
insert into time_slot values ('A', 'F', '8', '0', '8', '50');
insert into time_slot values ('B', 'M', '9', '0', '9', '50');
insert into time_slot values ('B', 'W', '9', '0', '9', '50');
insert into time_slot values ('B', 'F', '9', '0', '9', '50');
insert into time_slot values ('C', 'M', '11', '0', '11', '50');
insert into time_slot values ('C', 'W', '11', '0', '11', '50');
insert into time_slot values ('C', 'F', '11', '0', '11', '50');
insert into time_slot values ('D', 'M', '13', '0', '13', '50');
insert into time_slot values ('D', 'W', '13', '0', '13', '50');
insert into time_slot values ('D', 'F', '13', '0', '13', '50');
insert into time_slot values ('E', 'T', '10', '30', '11', '45 ');
insert into time_slot values ('E', 'R', '10', '30', '11', '45 ');
insert into time_slot values ('F', 'T', '14', '30', '15', '45 ');
insert into time_slot values ('F', 'R', '14', '30', '15', '45 ');
insert into time_slot values ('G', 'M', '16', '0', '16', '50');
insert into time_slot values ('G', 'W', '16', '0', '16', '50');
insert into time_slot values ('G', 'F', '16', '0', '16', '50');
insert into time_slot values ('H', 'W', '10', '0', '12', '30');

insert into prereq values ('cq2', 'cq1');
insert into prereq values ('cq3', 'cq1');
insert into prereq values ('cn2', 'cn1');
insert into prereq values ('cn3', 'cn1');
insert into prereq values ('cn4', 'cn1');
insert into prereq values ('cn5', 'cn1');

