DBMS Lab Assignment-8
DBMS Lab Assignment-8
1. Consider the university course enrollment system with following schema and tables:
Relational schema: Students (StudentID, StudentName, Department)
Table: Students
For the above scenario, write SQL queries for the following:
a) List all students who have enrolled in courses, along with their course names and grades.
b) List all students, including those who are not enrolled in any courses. Show the courses
they are enrolled in and their grades if available.
c) List all courses, including those with no students enrolled. Show the names of students
and their grades if available.
d) List all students and all courses, even if no enrollment exists.
For the above relational schemas, write SQL queries for the following:
a) List all customers and the products they have been ordered, including customers who
haven’t placed any orders and products that haven’t been purchased
b) List all products, their prices, and the total number of times each product has been
ordered. Include products that have never been ordered.
c) List all customers, orders, and products (including those with no orders or products)
d) List all orders and their products (including orders without products)