Rohith2 Merged
Rohith2 Merged
A project report on
BACHELOR OF ENGINEERING
IN
INFORMATION SCIENCE AND ENGINEERING
By
Rohith.R (1BM22IS164)
Sai Skandhan(1BM22IS171)
CERTIFICATE
Acknowledgements Abstract
1. Introduction ………………………………………………………………………… 01
1.1. Purpose
1.2. Scope
2. Software Requirement Specification ……………………………………………… 05
2.1. Software Requirements
2.2. Hardware Requirements
2.3. Functionality
3. ER Diagram ……………………..………………………………………………….. 06
4. Relational Schema ……………………………………………….…………………. 07
5. Implementation……………………………………………………………………… 09
5.1. SQL queries
5.2. Connecting backend to frontend
6. Conclusion…………………………………………………………………………… 25
6.1. Summary
6.2. Limitations
6.3. Further enhancements
7. References……………………………………………………………………………. 26
8. Appendix: Snapshots ……………………………………………………………… 27
ABSTRACT
This project report outlines the development and implementation of a College Database
Management System (DBMS), designed to streamline and automate various
administrative processes within a college. The system is built to efficiently manage data
related to students, courses, faculty, and departments. Key functionalities include student
registration, course enrolment, faculty assignment, and the generation of various reports
for administrative purposes.
The project utilizes a relational database model, implemented using MySQL, and
integrates a user-friendly interface developed with modern web technologies. The system
is designed to ensure data integrity, security, and ease of access, with role-based access
controls to protect sensitive information.
Through the use of entity-relationship diagrams and relational schemas, the database
design process ensures that the system is well-organized and capable of handling complex
relationships between different entities. The implementation phase covers the creation of
database tables, data manipulation, and the integration of the backend with the frontend.
The developed system provides a scalable solution that can be expanded to include
additional features and functionalities in the future. While the current implementation
focuses on core administrative tasks, potential enhancements could include advanced
analytics, real-time data synchronization, and integration with other educational
technologies.
This report concludes with a discussion of the project's limitations and future scope,
emphasizing the system's potential to significantly improve the efficiency and accuracy of
college administration.
1
ACKNOWLEDGEMENTS
We would like to extend our heartfelt gratitude to all those who have contributed to the
successful completion of the college database Management System project.
First and foremost, we are deeply grateful to our project advisor, [Preetha S], whose
guidance, support, and valuable insights were instrumental in the development of this
project. Your expertise and encouragement have been a source of inspiration throughout
this journey.
We would also like to thank our professors and faculty members at [BMSCE] for
providing us with the knowledge and skills necessary to undertake this project. Your
teachings and mentorship have laid the foundation for our academic and professional
growth.
Special thanks go to the pharmacy staff and professionals who generously shared their
experiences and provided practical insights into the day-to-day operations of a pharmacy.
Your input was invaluable in shaping the functional requirements and features of the
system.
We are indebted to our classmates and friends for their constant support, constructive
feedback, and collaboration. Your camaraderie and assistance have made this project a
rewarding experience.
Our gratitude also extends to our families, whose unwavering support and understanding
have been a pillar of strength throughout this endeavor. Your belief in us has been a
constant source of motivation.
Lastly, we acknowledge the resources and tools provided by the [BMSCE] that facilitated
the development of this project. The availability of these resources was crucial in the
successful execution of our ideas.
Thank you all for your contributions, encouragement, and support. This project would not
have been possible without your collective efforts and dedication.
2
1. Introduction
1.1 Purpose
The primary purpose of the College Database Management System (DBMS)
project is to develop a centralized system that efficiently manages and stores all essential
information related to the functioning of a college. This system aims to automate the
processes involved in student registration, course management, faculty allocation, and
other administrative tasks. By utilizing a database management system, the project seeks
to achieve the following objectives:
Data Organization: To organize and structure data related to students, courses,
faculty, and departments, allowing for easy access and management.
Data Integrity and Security: To ensure the integrity and security of the data by
implementing appropriate access controls and data validation mechanisms.
Efficiency and Accuracy: To improve the efficiency and accuracy of
administrative processes, reducing the time and effort required for data handling and
minimizing the likelihood of errors.
Accessibility and Scalability: To provide a scalable solution that can be accessed
by authorized users from different departments, enabling efficient communication and
coordination.
Reporting and Analysis: To facilitate the generation of various reports, such as
student performance, course enrolment statistics, and faculty workload, aiding in data-
driven decision-making.
Overall, the purpose of this project is to create a robust and user-friendly database
management system that enhances the operational efficiency of the college and supports
its growth and development.
3
1.2 Scope
The scope of the College Database Management System (DBMS) project encompasses the
design, development, and implementation of a comprehensive system to manage and
streamline various aspects of college administration. The project covers the following key
areas:
Registration and Enrollment: Handling the admission and registration process for new
and returning students.
Student Information: Storing personal details, academic history, and contact information.
Course Enrollment: Managing student enrollments in courses, tracking progress, and
recording grades.
Course Details: Maintaining information about courses offered, including course names,
descriptions, credits, and prerequisites.
Scheduling: Organizing course schedules, including lecture times, locations, and
instructors.
Course Materials: Managing course-related materials and resources.
Faculty Information: Storing details about faculty members, including qualifications,
contact information, and departmental affiliations.
Assignments: Allocating courses and responsibilities to faculty members.
Performance Evaluation: Tracking faculty performance and contributions.
Department Details: Maintaining information about academic departments, including
department heads and contact information.
Inter-departmental Coordination: Facilitating communication and coordination among
different departments.
User Roles and Permissions: Defining roles such as Administrator, Faculty, Student, and
setting permissions accordingly.
Access Control: Implementing security measures to ensure that only authorized users
have access to specific data and functionalities.
Report Generation: Generating various reports, such as student performance reports,
course enrollment statistics, and faculty workload analysis.
Data Analytics: Providing tools for analyzing data to support decision-making processes.
Frontend Development: Creating a user-friendly interface for different user roles,
ensuring easy navigation and data interaction.
Data Backup and Recovery: Implementing procedures for data backup and recovery to
prevent data loss.
4
2. Software Requirement Specification
6
4. Relational schema
1. Admin
Admin_id (Primary Key)
Admin_Name
Admin_Password
2. Student
Student_id (Primary Key)
Student_name
Student_Email
Course_id (Foreign Key)
3. Teacher
Teacher_id (Primary Key)
Teacher_Email
Salary
Course_id (Foreign Key)
4. Course
Course_id (Primary Key)
Course_Name
Relationships
1. Admin - Student:
o An admin takes admissions of multiple students.
o One-to-Many relationship (1)
2. Admin - Teacher:
o An admin hires multiple teachers.
o One-to-Many relationship (1)
7
3. Teacher - Course:
o A teacher teaches for multiple courses.
o One-to-One relationship (1:1)
4. Student - Course:
o A student chooses one course.
o One-to-One relationship (1:1)
Notes:
• The Admin table represents the administrative users who manage admissions and
hire teachers.
• The Student table contains information about students, including the course they
choose.
• The Teacher table holds data on teachers, including their email and salary.
• The Course table contains course details, such as course name and ID.
This schema captures the entities and relationships outlined in the ER diagram. Make sure
to use appropriate constraints, such as foreign keys, to maintain referential integrity in
your database.
8
5. Implementation
Backend
def home_view(request):
if request.user.is_authenticated:
return HttpResponseRedirect('afterlogin')
return render(request,'school/index.html')
9
def studentclick_view(request):
if request.user.is_authenticated:
return HttpResponseRedirect('afterlogin')
return render(request,'school/studentclick.html')
def admin_signup_view(request):
form=forms.AdminSigupForm()
if request.method=='POST':
form=forms.AdminSigupForm(request.POST)
if form.is_valid():
user=form.save()
user.set_password(user.password)
user.save()
my_admin_group = Group.objects.get_or_create(name='ADMIN')
my_admin_group[0].user_set.add(user)
return HttpResponseRedirect('adminlogin')
return render(request,'school/adminsignup.html',{'form':form})
def student_signup_view(request):
form1=forms.StudentUserForm()
form2=forms.StudentExtraForm()
mydict={'form1':form1,'form2':form2}
if request.method=='POST':
form1=forms.StudentUserForm(request.POST)
form2=forms.StudentExtraForm(request.POST)
if form1.is_valid() and form2.is_valid():
user=form1.save()
user.set_password(user.password)
user.save()
f2=form2.save(commit=False)
f2.user=user
10
user2=f2.save()
my_student_group = Group.objects.get_or_create(name='STUDENT')
my_student_group[0].user_set.add(user)
return HttpResponseRedirect('studentlogin')
return render(request,'school/studentsignup.html',context=mydict)
def teacher_signup_view(request):
form1=forms.TeacherUserForm()
form2=forms.TeacherExtraForm()
mydict={'form1':form1,'form2':form2}
if request.method=='POST':
form1=forms.TeacherUserForm(request.POST)
form2=forms.TeacherExtraForm(request.POST)
if form1.is_valid() and form2.is_valid():
user=form1.save()
user.set_password(user.password)
user.save()
f2=form2.save(commit=False)
f2.user=user
user2=f2.save()
my_teacher_group = Group.objects.get_or_create(name='TEACHER')
my_teacher_group[0].user_set.add(user)
return HttpResponseRedirect('teacherlogin')
return render(request,'school/teachersignup.html',context=mydict)
def afterlogin_view(request):
if is_admin(request.user):
return redirect('admin-dashboard')
elif is_teacher(request.user):
accountapproval=models.TeacherExtra.objects.all().filter(user_id=request.user.id,status=T
rue)
if accountapproval:
return redirect('teacher-dashboard')
else:
return render(request,'school/teacher_wait_for_approval.html')
elif is_student(request.user):
accountapproval=models.StudentExtra.objects.all().filter(user_id=request.user.id,status=Tr
ue)
if accountapproval:
return redirect('student-dashboard')
else:
return render(request,'school/student_wait_for_approval.html')
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_dashboard_view(request):
teachercount=models.TeacherExtra.objects.all().filter(status=True).count()
pendingteachercount=models.TeacherExtra.objects.all().filter(status=False).count()
12
studentcount=models.StudentExtra.objects.all().filter(status=True).count()
pendingstudentcount=models.StudentExtra.objects.all().filter(status=False).count()
teachersalary=models.TeacherExtra.objects.filter(status=True).aggregate(Sum('salary'))
pendingteachersalary=models.TeacherExtra.objects.filter(status=False).aggregate(Sum('sal
ary'))
studentfee=models.StudentExtra.objects.filter(status=True).aggregate(Sum('fee',default=0)
)
pendingstudentfee=models.StudentExtra.objects.filter(status=False).aggregate(Sum('fee'))
notice=models.Notice.objects.all()
mydict={
'teachercount':teachercount,
'pendingteachercount':pendingteachercount,
'studentcount':studentcount,
'pendingstudentcount':pendingstudentcount,
'teachersalary':teachersalary['salary__sum'],
'pendingteachersalary':pendingteachersalary['salary__sum'],
'studentfee':studentfee['fee__sum'],
'pendingstudentfee':pendingstudentfee['fee__sum'],
'notice':notice
}
return render(request,'school/admin_dashboard.html',context=mydict)
13
#for teacher sectionnnnnnnn by admin (by sumit)
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_teacher_view(request):
return render(request,'school/admin_teacher.html')
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_add_teacher_view(request):
form1=forms.TeacherUserForm()
form2=forms.TeacherExtraForm()
mydict={'form1':form1,'form2':form2}
if request.method=='POST':
form1=forms.TeacherUserForm(request.POST)
form2=forms.TeacherExtraForm(request.POST)
if form1.is_valid() and form2.is_valid():
user=form1.save()
user.set_password(user.password)
user.save()
f2=form2.save(commit=False)
f2.user=user
f2.status=True
f2.save()
my_teacher_group = Group.objects.get_or_create(name='TEACHER')
my_teacher_group[0].user_set.add(user)
return HttpResponseRedirect('admin-teacher')
return render(request,'school/admin_add_teacher.html',context=mydict)
14
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_teacher_view(request):
teachers=models.TeacherExtra.objects.all().filter(status=True)
return render(request,'school/admin_view_teacher.html',{'teachers':teachers})
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_approve_teacher_view(request):
teachers=models.TeacherExtra.objects.all().filter(status=False)
return render(request,'school/admin_approve_teacher.html',{'teachers':teachers})
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def approve_teacher_view(request,pk):
teacher=models.TeacherExtra.objects.get(id=pk)
teacher.status=True
teacher.save()
return redirect(reverse('admin-approve-teacher'))
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def delete_teacher_view(request,pk):
teacher=models.TeacherExtra.objects.get(id=pk)
user=models.User.objects.get(id=teacher.user_id)
user.delete()
teacher.delete()
15
return redirect('admin-approve-teacher')
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def delete_teacher_from_school_view(request,pk):
teacher=models.TeacherExtra.objects.get(id=pk)
user=models.User.objects.get(id=teacher.user_id)
user.delete()
teacher.delete()
return redirect('admin-view-teacher')
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def update_teacher_view(request,pk):
teacher=models.TeacherExtra.objects.get(id=pk)
user=models.User.objects.get(id=teacher.user_id)
form1=forms.TeacherUserForm(instance=user)
form2=forms.TeacherExtraForm(instance=teacher)
mydict={'form1':form1,'form2':form2}
if request.method=='POST':
form1=forms.TeacherUserForm(request.POST,instance=user)
form2=forms.TeacherExtraForm(request.POST,instance=teacher)
print(form1)
if form1.is_valid() and form2.is_valid():
user=form1.save()
user.set_password(user.password)
user.save()
f2=form2.save(commit=False)
16
f2.status=True
f2.save()
return redirect('admin-view-teacher')
return render(request,'school/admin_update_teacher.html',context=mydict)
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_teacher_salary_view(request):
teachers=models.TeacherExtra.objects.all()
return render(request,'school/admin_view_teacher_salary.html',{'teachers':teachers})
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_student_view(request):
return render(request,'school/admin_student.html')
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_add_student_view(request):
form1=forms.StudentUserForm()
form2=forms.StudentExtraForm()
mydict={'form1':form1,'form2':form2}
if request.method=='POST':
form1=forms.StudentUserForm(request.POST)
form2=forms.StudentExtraForm(request.POST)
17
if form1.is_valid() and form2.is_valid():
print("form is valid")
user=form1.save()
user.set_password(user.password)
user.save()
f2=form2.save(commit=False)
f2.user=user
f2.status=True
f2.save()
my_student_group = Group.objects.get_or_create(name='STUDENT')
my_student_group[0].user_set.add(user)
else:
print("form is invalid")
return HttpResponseRedirect('admin-student')
return render(request,'school/admin_add_student.html',context=mydict)
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def admin_view_student_view(request):
students=models.StudentExtra.objects.all().filter(status=True)
return render(request,'school/admin_view_student.html',{'students':students})
@login_required(login_url='adminlogin')
@user_passes_test(is_admin)
def delete_student_from_school_view(request,pk):
student=models.StudentExtra.objects.get(id=pk)
user=models.User.objects.get(id=student.user_id)
user.delete()
18
Frontend
{% extends 'school/adminbase.html' %}
{% block content %}
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
rel="stylesheet">
<style type="text/css">
a:link {
text-decoration: none;
}
h6 {
color: white;
}
.order-card {
color: #fff;
}
.bg-c-blue {
background: linear-gradient(45deg, #4099ff, #73b4ff);
}
.bg-c-green {
background: linear-gradient(45deg, #2ed8b6, #59e0c5);
}
.bg-c-yellow {
background: linear-gradient(45deg, #FFB64D, #ffcb80);
}
19
.bg-c-pink {
background: linear-gradient(45deg, #FF5370, #ff869a) }
.card {
border-radius: 5px;
-webkit-box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
box-shadow: 0 1px 2.94px 0.06px rgba(4, 26, 55, 0.16);
border: none;
margin-bottom: 30px;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.card .card-block {
padding: 25px;
}
.order-card i {
font-size: 26px;
}
.f-left {
float: left;
}
.f-right {
float: right;
}
</style>
</head>
<body>
20
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-
awesome.min.css" rel="stylesheet">
<div class="container">
<div class="row">
<div class="col-md-4 col-xl-3">
<div class="card bg-c-blue order-card">
<div class="card-block">
<a href="admin-view-teacher">
<h6 class="m-b-20">View All Teacher</h6>
</a>
<br>
<h2 class="text-right"><i class="fas fa-eye f-left"></i></h2>
</div>
</div>
</div>
</script>
22
</body>
{% endblock content %}
23
24
6. Conclusion
Summary
The College Database Management System (DBMS) project aimed to develop a
comprehensive system to efficiently manage various aspects of college administration.
The project involved designing and implementing a database system that could handle the
data related to students, courses, faculty, and administrative staff.
The implementation phase involved the development of SQL queries for data
manipulation, including data insertion, updating, and retrieval. The system also included a
user-friendly interface to facilitate interactions between users and the database, supporting
role-based access control to secure sensitive information.
The project successfully created a scalable and efficient system that streamlines college
data management, enhancing operational efficiency and accuracy. The system provides
essential functionalities such as student registration, course selection, and faculty
assignment, along with the generation of various reports to assist in decision-making
processes.
In conclusion, the College DBMS significantly improves data organization and retrieval
processes within the college, providing a robust foundation for future enhancements and
scalability. While the current implementation focuses on core functionalities, there is
potential for further development, including the integration of advanced analytics and real-
time data features.
25
6.2. Limitations
While the system covers most of the essential functionalities, there are limitations, such as
the lack of real-time data synchronization and limited support for complex analytics.
7. References
1. Silberschatz, A., Korth, H. F., & Sudarshan, S. (2020). Database System Concepts (7th
ed.). McGraw-Hill Education.
This textbook provided foundational knowledge on database design, normalization, and
SQL query formulation, which was instrumental in the development of the College
Database Management System.
2. Connolly, T., & Begg, C. (2015). Database Systems: A Practical Approach to Design,
Implementation, and Management (6th ed.). Pearson Education.
This book offered practical insights into the implementation of relational database
systems, including schema design and ER modeling, which were applied in the project.
26
3. Appendix
Snapshot of database
27