CREATE TABLE department ( dept_code CHAR(2) NOT NULL , dept_name VARCHAR2(30) , CONSTRAINT pk_department PRIMARY KEY (dept_code) ) ; CREATE TABLE profesor ( prof_code CHAR(2) NOT NULL , prof_name VARCHAR2(10) , CONSTRAINT pk_profesor PRIMARY KEY (prof_code) ) ; CREATE TABLE student ( s_number NUMBER(7) NOT NULL , s_name VARCHAR2(10) NOT NULL , dept_code CHAR(2) , grade NUMBER(1) , address VARCHAR2(50) , email VARCHAR2(20) , phone VARCHAR2(13) , birth CHAR(8) DEFAULT TO_CHAR(sysdate, 'yyyymmdd') , prof_code CHAR(2) , CONSTRAINT pk_student PRIMARY KEY (s_number) , CONSTRAINT uk_student_email UNIQUE (email) , CONSTRAINT ck_student_grade CHECK (grade IN (1, 2, 3)) , CONSTRAINT fk_student_dept_code FOREIGN KEY (dept_code) REFERENCES department(dept_code) ON DELETE CASCADE , CONSTRAINT fk_student_prof_code FOREIGN KEY (prof_code) REFERENCES profesor(prof_code) ON DELETE CASCADE ) ;