Question: can you solve this by using sql ALTER TABLE Orders ADD FOREIGN KEY (PersonID) REEERENCES Persons (PersonID); Exercise Consider the following relational database: STUDENTDEPCOURSEENROLMENT(STDNO,SNAME,DEPTNO#)(DEPTNO,DNAME)(CORSNO,CNAME,DEPTNOH,CMAX)(STDNO#,CORSNO#,GRADE,EDATE) STUDENT.DEPTNO
ALTER TABLE Orders ADD FOREIGN KEY (PersonID) REEERENCES Persons (PersonID); Exercise Consider the following relational database: STUDENTDEPCOURSEENROLMENT(STDNO,SNAME,DEPTNO#)(DEPTNO,DNAME)(CORSNO,CNAME,DEPTNOH,CMAX)(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. PART I : DATA DESCRIPTION LANGUAGE (DDL) 1) Write DDL commands to create the four tables without any constraint. 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
Get step-by-step solutions from verified subject matter experts
