Dbms Case Study_student
Dbms Case Study_student
OCTOBER 2024
1|Page
1.AIM:
The aim of this project is to design and implement a Student Information System that enables
administrators and faculty to efficiently manage and access student details, course
information, hostel assignments, and grade records. This system will provide real-time access
to essential information, including student profiles, course enrollments, academic
performance, and housing arrangements, thereby facilitating seamless data management
within an academic institution.
DESCRIPTION:
A Student Information System is essential for managing the academic and administrative
information related to students within an educational institution. The system enables users to
access details about student enrollment, courses, grades, and hostel accommodations, as well
as perform essential operations on these data points.
In this project, the system is designed using a relational database model with the following
core components:
• Department: Represents various academic departments within the institution, each
housing multiple courses.
• Course: Contains the list of courses offered, specifying details such as credits and the
associated department.
• Hostel: Manages the hostel details where students are assigned, including hostel name
and location.
• Grades: Records the grades achieved by students in each course, allowing faculty and
administrators to monitor academic progress.
2. ER DIAGRAM:
The ER Diagram includes the entities attributes and relationships necessary to model the
student information system important entities could include :
• Student( Student_id,Student_name{
first_name,middle_name,last_name},Age,Date_of_birth,Gender,Phone_no,Address,M
ail_id)
• Grades (course_grades)
• Courses ( Course_id, Course_name,Course_type,credits)
• Department(Dept_id,Dept_name,Building)
• Hostel(Hostel_name,Location)
2|Page
3. Create table and insert records
✓ Department
CREATE TABLE Department (
Dept_ID INT PRIMARY KEY,
Dept_Name VARCHAR(30),
Building VARCHAR(30)
);
Inserting records:
3|Page
INSERT INTO Department VALUES (8, 'Mathematics', 'Math Wing');
✓ Courses
Course_Name VARCHAR(20),
Credits INT,
);
Inserting Records:
4|Page
Inserting Records
5|Page
✓ Students
Email VARCHAR(20),
Address VARCHAR(30),
Gender VARCHAR(10),
Age INT,
Phone_NO INT
);
Inserting Records:
6|Page
✓ Hostel
Location VARCHAR(20)
);
7|Page
Inserting Records:
INSERT INTO Hostel VALUES ('Sunrise Hall', 'North Campus');
8|Page
✓ Grades
Inserting Records:
INSERT INTO Grades VALUES (1, 101, 'A');
INSERT INTO Grades VALUES (2, 102, 'B');
INSERT INTO Grades VALUES (3, 103, 'A');
INSERT INTO Grades VALUES (4, 104, 'C');
INSERT INTO Grades VALUES (5, 105, 'B');
INSERT INTO Grades VALUES (6, 106, 'A');
INSERT INTO Grades VALUES (7, 107, 'A');
INSERT INTO Grades VALUES (8, 108, 'B');
INSERT INTO Grades VALUES (9, 109, 'C');
INSERT INTO Grades VALUES (10, 110, 'B');
9|Page
10 | P a g e
4.CREATING A VIEW
Student.Student_ID,
Student.Name AS Student_Name,
Department.Dept_Name AS Department,
Course.Course_Name AS Course_Name,
Grades.Grade
FROM
Student, Grades, Course, Department
WHERE
Student.Student_ID = Grades.Student_ID
11 | P a g e
5.CREATING USER AND GRANT PRIVILAGES
12 | P a g e
Granting insert , update privilages
6.Use of joins
• Inner join
SELECT
Student.Student_ID,
Student.Name AS Student_Name,
Course.Course_Name,
Grades.Grade
FROM
Student
INNER JOIN
INNER JOIN
13 | P a g e
• Left Outer Join
SELECT
Student.Student_ID,
Student.Name AS Student_Name,
Course.Course_Name,
Grades.Grade
FROM
Student
LEFT JOIN
Grades ON Student.Student_ID = Grades.Student_ID
LEFT JOIN
Course ON Grades.Course_ID = Course.Course_ID;
SELECT
Student.Student_ID,
Student.Name AS Student_Name,
14 | P a g e
Course.Course_Name,
Grades.Grade
FROM
Student
RIGHT JOIN
Grades ON Student.Student_ID = Grades.Student_ID
RIGHT JOIN
Course ON Grades.Course_ID = Course.Course_ID;
15 | P a g e
7. PL/SQL procedures:
CREATE TABLE LogDetails (
Operation VARCHAR(510),
TableName VARCHAR(510),
ModificationDate TIMESTAMP
);
16 | P a g e
CREATE OR REPLACE PROCEDURE LogUpdate AS
BEGIN
END;
/
17 | P a g e
8.Delete,Drop and Truncate
DELETE
TRUNCATE
18 | P a g e
DROP
19 | P a g e