0% found this document useful (0 votes)
22 views2 pages

Lab 01

The document outlines the design of a relational database schema for an educational institute, detailing the structure needed to manage departments, courses, students, faculty, and various academic records. It specifies the tables and attributes required, including constraints for data integrity and relationships between entities. Additionally, it includes tasks for schema creation, data insertion, and retrieval queries to interact with the database.

Uploaded by

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

Lab 01

The document outlines the design of a relational database schema for an educational institute, detailing the structure needed to manage departments, courses, students, faculty, and various academic records. It specifies the tables and attributes required, including constraints for data integrity and relationships between entities. Additionally, it includes tasks for schema creation, data insertion, and retrieval queries to interact with the database.

Uploaded by

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

LAB-01

Time: 1.5Hr max

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.

You might also like