0% found this document useful (0 votes)
5 views1 page

SQL

The document outlines the steps to create a database named StudentDB, including the creation of tables for Students, Departments, Courses, and Enrollments with specified columns. It also includes instructions for inserting records, writing various queries to display student and course information, and creating views for summarizing data. Additionally, it provides queries for specific data retrieval tasks such as finding students without enrollments and the highest grades in courses.

Uploaded by

maheen2407d
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

SQL

The document outlines the steps to create a database named StudentDB, including the creation of tables for Students, Departments, Courses, and Enrollments with specified columns. It also includes instructions for inserting records, writing various queries to display student and course information, and creating views for summarizing data. Additionally, it provides queries for specific data retrieval tasks such as finding students without enrollments and the highest grades in courses.

Uploaded by

maheen2407d
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1. Create a database named StudentDB.

2. Create a table Students with columns (StudentID, Name, Age, DepartmentID).

3. Create a table Departments with columns (DepartmentID, DepartmentName).

4. Create a table Courses with columns (CourseID, CourseName, DepartmentID).

5. Create a table Enrollments with columns (EnrollmentID, StudentID, CourseID, Grade).

6. Insert at least 5 records in each table.

7. Write a query to display all students with their department names.

8. Write a query to display all students along with the courses they are enrolled in and their grades.

9. Write a query to list all courses offered by a specific department.

10. Write a query to display students who have not enrolled in any course.

11. Create a view that shows StudentName, CourseName, and Grade.

12. Create a view that shows DepartmentName and total number of students in each department.

13. Write a query using a join to display students and courses from different departments.

14. Write a query to find the highest grade achieved in each course.

15. Write a query to display students enrolled in more than one course.

You might also like