Internal Lab - Assessment
Internal Lab - Assessment
1. Create Tables:
o Create the following tables with the specified columns and constraints:
▪ Students:
▪ Departments:
▪ Courses:
▪ Enrollments:
Basic Queries:
Aggregate Functions:
Department of Computer Science & Engineering
(Artificial Intelligence / Artificial Intelligence & Machine Learning)
Subqueries:
o Retrieve the names of students who are not enrolled in any courses.
o Find the department name of the student with the highest age.
Joins:
o List all students along with the courses they are enrolled in.
o Find all students and their departments, including those who are not assigned to any
department.
Constraints Testing:
o Try to insert a student with a duplicate StudentID and verify the constraint works.
o Attempt to delete a department that has students associated with it and verify the
foreign key constraint.