RY KEY,РDname CHAR(20) UNIQUE,РDphone CHAR(20),Р);РР-- 建立教师表Рcreate table teacherР(Tno CHAR(10) PRIMARY KEY,РTname CHAR(20) not null,РTsex CHAR(2) CHECK(Tsex IN ('男','女')),РProf CHAR(4),РTage SMALLINT, РDno CHAR(10) ,РFOREIGN KEY (Dno) REFERENCES Sdept(Dno) Р);РР-- 建立学生表РCREATE TABLE studentР(Sno CHAR(10) PRIMARY KEY,РSname CHAR(20) NOT NULL,РSsex CHAR(2) CHECK(Ssex IN ('男','女')),РSage SMALLINT, РDno CHAR(10), РFOREIGN KEY (Dno) REFERENCES Sdept(Dno) Р);РР-- 建立课程表РCREATE TABLE courseР(Cno CHAR(10) PRIMARY KEY,РCname CHAR(20) UNIQUE,РCredit SMALLINT,Р);Р--建立授课表РCREATE TABLE TCР(Cno CHAR(10),РTno CHAR(10), Р);РР-- 建立选课表 РCREATE TABLE SCР(Sno CHAR(10) ,РCno CHAR(10),РGrade SMALLINT CHECK(Grade>=0 AND Grade<=100),РPRIMARY KEY (Sno, Cno),