Question: Exercise Consider the following relational database: STUDENT (STDNO, SNAME, DEPTNO#) DEP (DEPTNO, DNAME) COURSE (CORSNO, CNAME, DEPTNO#, CMAX) ENROLMENT (STDNO# CORSNO# GRADE, EDATE) STUDENT.DEPTNO is

 Exercise Consider the following relational database: STUDENT (STDNO, SNAME, DEPTNO#) DEP

Exercise Consider the following relational database: STUDENT (STDNO, SNAME, DEPTNO#) DEP (DEPTNO, DNAME) COURSE (CORSNO, CNAME, DEPTNO#, CMAX) ENROLMENT (STDNO# CORSNO# GRADE, EDATE) STUDENT.DEPTNO is the department number of the student. COURSE.DEPTNO is the department number that offers the course. ENROLMENT models the registrations of students in courses (M:M relationship) where the GRADE is the grade obtained by the student in the course. PARTI: DATA DESCRIPTION LANGUAGE (DDL) 1) Write DDL commands to create the four tables without any constraint. Nom de colonne Signification Type Size STDNO Student Number Number SNAME Student name Varchar2 DEPTNO Department Number Varchar2 2 DNAME Department name Varchar2 CORSNO Course Number Number CNAME Course Name Varchar2 CMAX Max. students allowed Number 2 GRADE Obtained Grade Number Enrolment date Date 8 30 20 3 30 2 EDATE 2) Add all the following constraints: - Primary key - Foreign Key Constraints on the STUDENT table: - Sname: Not Null . Each student must belong to a department Constraint on the ENROLMENT table Edate: have a default value equal to the system date

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!