Assignment-V RK
Assignment-V RK
Tasks:
1. Apply PRIMARY KEY constraint to the StudentID attribute in the Students relation.
2. Apply PRIMARY KEY constraint to the CourseID attribute in the Courses relation.
3. Apply FOREIGN KEY constraint to the Department attribute in the Students relation,
referencing the Department attribute in the Courses relation.
4. Apply FOREIGN KEY constraint to the StudentID attribute in the Enrollments relation,
referencing the StudentID attribute in the Students relation.
5. Apply FOREIGN KEY constraint to the CourseID attribute in the Enrollments relation,
referencing the CourseID attribute in the Courses relation.
6. Apply NOT NULL constraint to the Name attribute in the Students relation.
7. Apply CHECK constraint to the Age attribute in the Students relation to ensure it is greater
than or equal to 18.
8. Apply CHECK constraint to the Credits attribute in the Courses relation to ensure it is greater
than 0 and less than or equal to 5.
9. Apply CHECK constraint to the Grade attribute in the Enrollments relation to ensure it is one
of the values (A, B, C, D, F).
10. Apply Unique Constraint and Ensure that each student has a unique name in the Students
table.