Aryan DBMS Assignment 1
Aryan DBMS Assignment 1
INFORMATION TECHNOLOGY,
BHOPAL
Assignment 1
Design a University Database Management System for a Technical University. The system
should be capable of managing various departments, student records, faculty details, course
enrollments, research activities, and administrative functions.
Solution
Entity-Sets
1. Department (Dept_ID, Dept_name)
2. Faculty (Faculty_ID, Name, Designation, Dept_ID)
3. Courses (Course_ID, Course_name, Credits, Semester, Dept_ID)
4. Student (Student_ID, Name, DOB, Gender, Address, Grade, Fee_Status, Dept_ID)
5. Enrollment (Student_ID, Course_ID, Enrollment_Date)
6. Hostel (Hostel_No, Hostel_name, Room_number)
7. TnP (Student_ID, Company_name, Package, Allocation_date, Phone_no)
8. Exam_records (Student_ID, Course_ID, Semester)
9. Offers (Offer_ID, Student_ID, Company_name, Course_ID)
10. Issues_Books (Student_ID, Book_ID, Issue_Date, Due_date)
11. Lives_in (Student_ID, Hostel_No)
12. Faculty_Courses (Faculty_ID, Course_ID)
13. Faculty_Research (Faculty_ID, Dept_ID, Research_topic)
14. Library (Book_ID, Book_Title, Author)
Relationships
● Department has Faculty (One-to-many: A department can have multiple faculty
members)
● Department offers Courses (One-to-many: A department can offer multiple courses)
● Faculty belongs to Department (Many-to-one: A faculty member belongs to one
department)
● Faculty teaches Courses (Many-to-many: A faculty member can teach multiple courses,
and a course can be taught by multiple faculty members)
● Faculty does Faculty_Research in Department (Many-to-many: Faculty can do research
in different departments, and a department has multiple research areas/faculty)
● Courses are offered by Department (Many-to-one: A course is offered by
one department)
● Student belongs to Department (Many-to-one: A student belongs to one department)
● Student enrolls in Courses (Many-to-many: A student can enroll in multiple courses, and
a course can have multiple students) - Represented by Enrollment
● Student has Exam_records for Courses (One-to-many with composite key: A student has
exam records for multiple courses)
● Student gets Offers from TnP (Many-to-many: Students can get offers from
multiple companies) - Represented by Offers
● Student lives in Hostel (Many-to-many: Students can live in different hostels over time)
- Represented by Lives_in
● Student issues Issues_Books from Library (Many-to-many: Students can issue many
books, and a book can be issued by many students)
● Courses are taught by Faculty (Many-to-many: A course can be taught by multiple
faculty, and a faculty can teach multiple courses) - Represented by
Faculty_Courses
● TnP gives Offers to Student (One-to-many)
● Library has Issues_Books issued to Student (One-to-many)
● Hostel has Lives_in with Student (One-to-many)
ER Diagram
SQL Queries for the database
Queries to:
a) Retrieve student details based on department and academic year.
SELECT s.Student_ID, s.Name, s.DOB, s.Gender, s.Address, s.Grade, s.Fee_Status,
d.Dept_name
FROM Student s
JOIN Department d ON s.Dept_ID = d.Dept_ID
WHERE d.Dept_name = 'Computer Science'
AND s.Academic_Year = 2024;