create domain GRADE CHAR(1) check (value in ('A', 'B', 'C', 'D', 'F', 'I')); create domain STATUS CHAR(10) check (value in ('freshman', 'sophomore', 'junior', 'senior')); create domain DEPT CHAR(3) check (value in ('CS', 'MAT', 'EE', 'MGT')); create table STUDENT ( Id INT, Name CHAR(40) NOT NULL, Address CHAR(100) NOT NULL, Status STATUS NOT NULL, primary key (Id), ); create table PROFESSOR ( Id INT, Name CHAR(40) NOT NULL, DeptId DEPT NOT NULL, primary key (Id) ); create table COURSE ( DeptId DEPT NOT NULL, CrsCode CHAR(6), CrsName CHAR(50) NOT NULL, Descr CHAR(500) NOT NULL, primary key (CrsCode), unique (DeptId,CrsName) ); create table TRANSCRIPT ( StudId INT, CrsCode CHAR(6), Semester CHAR(5), Grade GRADE, primary key (StudId, CrsCode, Semester), foreign key (StudId) references STUDENT(Id) on update cascade on delete cascade, foreign key (CrsCode,Semester) references TEACHING(CrsCode,Semester) on update cascade on delete no action, ); create table TEACHING ( ProfId INT NOT NULL, CrsCode CHAR(6), Semester CHAR(5), primary key (CrsCode,Semester), foreign key (ProfId) references PROFESSOR(Id) on update cascade on delete no action, foreign key (CrsCode) references COURSE on update cascade on delete cascade );