练习2_习题_结果.docVIP

  • 2
  • 0
  • 约9.62千字
  • 约 21页
  • 2017-07-29 发布于河南
  • 举报
练习2_习题_结果

现在有一教学管理系统,具体的关系模式如下: Student (no, name, sex, birthday, class) Teacher (no, name, sex, birthday, prof, depart) Course (cno, cname, tno) Score (no, cno, degree) 其中表中包含如下数据: Course表: Score表: Student表: Teacher表: 根据上面描述完成下面问题: (注意:注意保存脚本,尤其是DDL和DML,以便进行数据还原) DDL 写出上述表的建表语句。 命令: USE 教学库 CREATE TABLE Student (no char(10) NOT NULL, name char(10) NOT NULL, sex char(5) NOT NULL, birthday smalldatetime NOT NULL, class char(10) NOT NULL ) USE 教学库 CREATE TABLE Teacher (no char(4) NOT NULL, name char(8) NOT NULL, sex char(2) NOT NULL, birthday smalldatetime NOT NULL, pro char(6) NOT NULL, depart char(10) NOT NULL ) USE 教学库 CREATE TABLE Course (cno char(6) NOT NULL, cname char(10) NOT NULL, tno tinyint NOT NULL ) USE 教学库 CREATE TABLE Score (no char(10) NOT NULL, cno char(6) NOT NULL, degree tinyint NOT NULL )USE 教学库 INSERT into Student(no,name,sex,birthday,class) VALUES(5001,李勇,男,1987-7-22 0:00:00,95001) INSERT into Student(no,name,sex,birthday,class) VALUES(5002,刘晨,女,1987-11-15 0:00:00,95002) INSERT into Student(no,name,sex,birthday,class) VALUES(5003,王敏,女,1987-10-5 0:00:00,95001) INSERT into Student(no,name,sex,birthday,class) VALUES(5004,李好尚,男,1987-9-25 0:00:00,95003) INSERT into Student(no,name,sex,birthday,class) VALUES(5005,李军,男,1987-7-17 0:00:00,95004) INSERT into Student(no,name,sex,birthday,class) VALUES(5006,范新位,女,1987-6-18 0:00:00,95005) INSERT into Student(no,name,sex,birthday,class) VALUES(5007,张霞东,女,1987-8-29 0:00:00,95006) INSERT into Student(no,name,sex,birthday,class) VALUES(5008,赵薇,男,1987-6-15 0:00:00,95007) INSERT into Student(no,name,sex,birthday,class) VALUES(5009,钱明将,女,1987-6-23 0:00:00,95008) INSERT into Student(no,name,sex,birthday,class) VALUES(5010,孙俪,女,1987-9-24 0:00:00,95002) INSERT into Student(no,name,sex,birthday,class) VALUES(108,赵里,男,1987-6-15 0:00:00,95007) INSERT into Student(no,name,sex,birthday,class) VALUES(109,丘处机,男,1987-6-23 0:00:00,95008) INSERT into Student(no,name,sex,birthday,class) VALUES(107,杨康,男,1987-9-24 0:00:00,95001) USE 教学库 INSER

文档评论(0)

1亿VIP精品文档

相关文档