0% found this document useful (0 votes)
33 views3 pages

LAB1Q

The document outlines a relational database schema for an educational institute, detailing the relationships between departments, courses, faculty, students, and various records such as grades and attendance. It specifies tables and attributes necessary for managing data, including constraints for credit limits and placement records. Additionally, it includes tasks for schema creation, data insertion, retrieval queries, update and delete operations, and advanced queries to manage and analyze the data effectively.

Uploaded by

Vansh Raj Singh
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)
33 views3 pages

LAB1Q

The document outlines a relational database schema for an educational institute, detailing the relationships between departments, courses, faculty, students, and various records such as grades and attendance. It specifies tables and attributes necessary for managing data, including constraints for credit limits and placement records. Additionally, it includes tasks for schema creation, data insertion, retrieval queries, update and delete operations, and advanced queries to manage and analyze the data effectively.

Uploaded by

Vansh Raj Singh
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
You are on page 1/ 3

Problem Statement:

Design a relational database schema for an institute with the following requirements:

●​ The institute has multiple departments, each with a unique Department_ID.


●​ Each department offers multiple courses, and each course has a unique Course_ID.
●​ The institute has several students who enroll in different courses.
●​ Each faculty member belongs to one department and teaches multiple courses.
●​ Store grades for students in each course.
●​ Maintain semester-wise marksheets for students.
●​ Keep track of monthly attendance of students.
●​ Manage course registration records.
●​ Store course credits (subject-wise).
●​ Record students' total credits per semester, ensuring that the total semester-wise
credits do not exceed a specified limit during course registration.
●​ Maintain placement records, including students' 10th and 12th marks, and provide
access to placement officers to shortlist students based on company criteria.
●​ Maintain a list of companies participating in placements.
●​ Store parent details for each student, including guardian information.
●​ Manage research activities conducted by faculty, linked to departments and individual
professors.
●​ Store publications and research projects undertaken by faculty and research groups.

Tables & Attributes:

1.​ Department (Department_ID (PK), Department_Name)


2.​ Course (Course_ID (PK), Course_Name, Credits, Department_ID (FK),
Course_Type (CHECK (Course_Type IN ('Lab', 'Theory'))))
3.​ Faculty (Faculty_ID (PK), Faculty_Name, Department_ID (FK))
4.​ Student (Student_ID (PK), Student_Name, DOB, Email, Department_ID (FK))
5.​ Parent_Details (Parent_ID (PK), Student_ID (FK), Father_Name, Mother_Name,
Guardian_Name, Contact_Number, Address)
6.​ Enrollment (Enrollment_ID (PK), Student_ID (FK), Course_ID (FK), Grade)
7.​ Teaches (Faculty_ID (FK), Course_ID (FK), Semester, Year)
8.​ Marksheet (Marksheet_ID (PK), Student_ID (FK), Semester, Year, GPA)
9.​ Attendance (Attendance_ID (PK), Student_ID (FK), Course_ID (FK), Month,
Total_Classes, Classes_Attended)
10.​Course_Registration (Registration_ID (PK), Student_ID (FK), Course_ID (FK),
Semester, Year)
11.​Student_Credits (Student_ID (FK), Semester, Year, Total_Credits)
12.​Placement_Record (Student_ID (PK), 10th_Marks, 12th_Marks, CGPA,
Placement_Status)
13.​Company (Company_ID (PK), Company_Name, Eligibility_Criteria,
Job_Designation, CTC_Offered)
14.​Research (Research_ID (PK), Title, Start_Date, End_Date, Department_ID
(FK), Faculty_ID (FK), PI (FK), CO_PIs (TEXT))
15.​Publication (Publication_ID (PK), Title, Publication_Date, Journal_Name,
Faculty_ID (FK), Research_ID (FK))

Constraint: The Total_Credits column in Student_Credits must not exceed the predefined limit
per semester.

—----------------------------------

Tasks:

Task 1: Schema Creation

Write SQL statements to create the above tables with proper constraints (Primary Key, Foreign
Key, Unique, NOT NULL, CHECK constraints for credit limit enforcement).

Task 2: Data Insertion

Insert at least 5 sample records into each table.

Task 3: Retrieval Queries

Write SQL queries for the following:

1.​ Retrieve all students enrolled in a specific department.


2.​ List courses along with the faculty teaching them.
3.​ Fetch students who have received an ‘A’ grade in any course.
4.​ Count the number of students enrolled in each course.
5.​ Retrieve details of students who have enrolled in more than 3 courses.
6.​ Fetch the semester-wise mark sheet for a given student.
7.​ Retrieve the attendance percentage of students for each course.
8.​ Find students who exceeded the maximum allowed credits in a semester.
9.​ Retrieve a list of students eligible for placements based on a company’s eligibility
criteria.
10.​List companies offering placements along with their CTC details.
11.​Retrieve parent details for a specific student.
12.​List research projects along with their associated faculty members.
13.​Retrieve publications of a specific professor.

Task 4: Update and Delete Operations

1.​ Update the email ID of a specific student.


2.​ Delete enrollment records for students who have withdrawn.
3.​ Update attendance records for a specific student.
4.​ Update placement status for students who have received job offers.
5.​ Update parent contact details for a specific student.
6.​ Update research project details.

Task 5: Advanced Queries

1.​ Write a query to display the highest grade received in each course.
2.​ List faculty members along with the number of courses they teach.
3.​ Use a JOIN to retrieve the names of students along with the courses they are enrolled in
and the faculty teaching them.
4.​ Retrieve a list of students along with their semester-wise total credits.
5.​ Find students who meet a company’s placement criteria based on 10th, 12th, and CGPA
marks.
6.​ Fetch students with missing or incomplete parent details.
7.​ Retrieve research projects and their publication count.

You might also like