Student Database Management System Project
Student Database Management System Project
ROLL NO :
NAME : OJAS PANDEY
CLASS : XII
SUBJECT : COMPUTER SCIENCE
SUB CODE : 083
1
DELHI PUBLIC SCHOOL PRAYAGRAJ
ACADEMIC YEAR : 2025-26
ROLL NO :
NAME : NICK SHARDA
CLASS : XII
SUBJECT : COMPUTER SCIENCE
SUB CODE : 083
CERTIFICATE
2
This is to certify that Student OJAS PANDEY, CBSE
(Smita Verma)
PGT Comp Sci
CERTIFICATE
3
This is to certify that Student NICK SHARDA CBSE
(Smita Verma)
PGT Comp Sci
TABLE OF CONTENTS [ T O C]
4
01 ACKNOWLEDGEMENT 04
02 INTRODUCTION 05
04 PROPOSED SYSTEM 06
07 FLOW CHART 15
08 OUTPUT 16
09 INSTALLATION PROCEDURE 20
10 TESTING 23
12 BIBLIOGRAPHY 26
ACKNOWLEDGEMENT
5
My sincere thanks to MRS SMITA VERMA, A guide,
Mentor all the above a friend, who critically reviewed my
project and helped in solving each and every problem,
occurred during implementation of the project
The guidance and support received from all the members who
contributed and who are contributing to this project, was vital
for the success of the project. I am grateful for their constant
support and help.
INTRODUCTION:
6
The Student Database Management System is a Python-MySQL
store, retrieve, update, and delete student records while ensuring data
Through the integration of Python for frontend logic and MySQL for
authorized access and ensures that only verified users can manage
7
Enable efficient storage and retrieval of student information using a
MySQL database.
Overall, the project seeks to replicate how a real institution maintains student
records, combining simplicity with reliability.
PROPOSED SYSTEM:
The proposed Student Database Management System aims to replace the
automated, and reliable digital platform. This system focuses on improving the
8
speed, accuracy, and accessibility of academic information while ensuring
The core idea behind the system is to integrate Python and MySQL to create
an efficient environment for storing and managing student details. The system
introduces a robust login and signup mechanism so that only registered users
with valid credentials can operate the application. This ensures controlled
The system provides all essential management functions such as adding new
redundancy and manual errors. Each record includes crucial fields such as
Admission Number, Name, Class, Mobile Number, Date of Birth, and Marks,
systematically.
to enhance reliability. Inputs such as mobile number format, date of birth, and
marks are checked to avoid incorrect entries. This ensures that the database
Overall, the proposed system aims to provide a practical, real-world solution for
9
an efficient digital alternative to manual record-keeping, ultimately saving time,
10
For example, initial project activities might be designated as request,
requirements-definition, and planning phases, or initiation, concept-
development, and planning phases. End users of the system under development
should be involved in reviewing the output of each phase to ensure the system is
being built to deliver the needed functionality.
INITIATION PHASE
11
Careful oversight is required to ensure projects support strategic business objectives
and resources are effectively implemented into an organization's enterprise
architecture. The initiation phase begins when an opportunity to add, improve, or
correct a system is identified and formally requested through the presentation of a
business case. The business case should, at a minimum, describe a proposal’s purpose,
identify expected benefits, and explain how the proposed system supports one of the
organization’s business strategies. The business case should also identify alternative
solutions and detail as many informational, functional, and network requirements as
possible.
The System Concept Development Phase begins after a business need or opportunity
is validated by the Agency/Organization Program Leadership and the
Agency/Organization CIO.
❖ Identify basic functional and data requirements to satisfy the business need.
12
❖ Evaluate costs and benefits of alternative approaches to satisfy the basic
functional requirements
❖ Identify and initiate risk mitigation actions, and develop high-level technical
architecture, process models, data models, and a concept of operations. This phase
explores potential technical solutions within the context of the business need.
❖ It may include several trade-off decisions such as the decision to use COTS
software products as opposed to developing custom software or reusing software
components, or the decision to use an incremental delivery versus a complete, onetime
deployment.
❖ The ITPR must be approved by the State CIO before the project can move
forward.
13
PLANNING PHASE
14
assurance planning, concept of operations, system security,
verification and validation, and systems engineering management
planning.
This phase formally defines the detailed functional user requirements using
high-level requirements identified in the Initiation, System Concept, and
Planning phases. It also delineates the requirements in terms of data, system
performance, security, and maintainability requirements for the system. The
requirements are defined in this phase to a level of detail sufficient for systems
design to proceed. They need to be measurable, testable, and relate to the
business need or opportunity identified in the Initiation Phase. The requirements
that will be used to determine acceptance of the system are captured in the Test
and Evaluation Masterplan.
❖ Further define and refine the functional and data requirements and
document them in the Requirements Document,
❖ Develop detailed data and process models (system inputs, outputs, and
the process.
15
❖ Develop the test and evaluation requirements that will be used to
determine acceptable system performance.
DESIGN PHASE
17
Concurrent with the development of the system design, the Agency Project
Manager begins development of the Implementation Plan, Operations and
Maintenance Manual, and the Training Plan.
DEVELOPMENT PHASE
18
responsible for quality assurance, validates that the functional requirements, as
defined in the functional requirements document, are satisfied by the developed
or modified system. OIT Security staff assess the system security and issue a
security certification and accreditation prior to installation/implementation.
This phase is initiated after the system has been tested and accepted by the user.
In this phase, the system is installed to support the intended business functions.
System performance is compared to performance objectives established during
the planning phase. Implementation includes user notification, user training,
installation of hardware, installation of software onto production computers, and
integration of the system into daily work processes. This phase continues until
the system is operating in production in accordance with the defined user
requirements.
19
OPERATIONS AND MAINTENANCE PHASE
START PYTHON
CREATION OF TABLE
20
USERS, STUDENTS
PROGRAM EXECUTION BY
(“1. NAME”)
(“[Link]”)
(“3. STREAM”)
(“4. MARKS_1”)
(“5. MARKS_2)
(“6. MARKS_3”)
SOURCE CODE
(“7. DOB”)
(“8. MOBILE_NO”)
import [Link] as sqlcon
from datetime import datetime,date
21
database="STUDENT_MANAGER")
cursor = [Link]()
except [Link] as e:
print(f"Database connection error: {e}")
exit()
print("-"*100)
print("*"*30, "STUDENT DATABASE MANAGEMENT SYSTEM","*"*30)
print("-"*100)
print("\n")
22
upper = False
lower = False
digit = False
special =False
spec_symb = ['!','@','#','$','%','&','-','`','~','|','/']
for x in passwrd:
if [Link]():
upper = True
elif [Link]():
lower = True
elif [Link]():
digit = True
elif x in spec_symb:
special = True
if upper == False:
return False,"Password must contain atleast one digit, one uppercase, one
lowercase, digit, and one special symbol and should be greater than 8 digits
elif lower == False:
return False,"Password must contain atleast one digit, one uppercase, one
lowercase, digit, and one special symbol and should be greater than 8 digits"
elif digit == False:
return False,"Password must contain atleast one digit, one uppercase, one
lowercase, digit, and one special symbol and should be greater than 8 digits"
elif special == False:
return False, "Password must contain atleast one digit, one uppercase, one
lowercase, digit, and one special symbol and should be greater than 8 digits"
23
#Function to signup
def signup():
print(" "*15 + "SIGN UP")
print("="*50)
# Storing password
24
try:
[Link]("INSERT INTO USERS (username, password) VALUES
(%s, %s)",
(username, password))
[Link]()
print("\n✓ Account created successfully! Please login.")
return True
except [Link] as e:
print(f"Error creating account: {e}")
return False
#Function to login
def login():
print("\n" + "="*50)
print(" "*17 + "LOGIN")
print("="*50)
max_attempts = 3
attempts = 0
25
if result:
print("\n✓ Login successful!")
print(f"Welcome, {username}!")
return True
else:
attempts += 1
remaining = max_attempts - attempts
if remaining > 0:
print(f"\n✗ Invalid username or password! {remaining} attempt(s)
remaining.")
else:
print("\n✗ Maximum login attempts reached. Exiting...")
return False
return False
26
cur_date = [Link]()
if age<5:
return False, "Student is too young to be a student!"
elif age>20:
return False, "Student is too old to be a student!"
return True, f"Valid (Age: {age} years)"
except:
return False, "Invalid date format! Use YYYY-MM-DD (e.g., 2010-03-
15)"
27
print("Invalid input! Please enter a number.")
return
for x in range(n):
print(f"\n--- Record {x+1} of {n} ---")
try:
Admin_No = int(input("Enter the Admission Number of Student: "))
if check_admin_exists(Admin_No):
print(f"✗ Error: Admission Number {Admin_No} already exists!")
continue
28
if Marks_2 not in range(0,101):
print("✗ Invalid Marks! Must be between 0 and 100.")
continue
Data = (Admin_No,Name,Class,Stream,Marks_1,Marks_2,Marks_3,DOB,Mobile_No)
sql = "INSERT INTO STUDENTS VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s)"
29
[Link](sql,Data)
[Link]()
print(f"✓ Record for {Name} added successfully!")
except ValueError:
print("✗ Invalid input! Please enter correct data types.")
continue
except [Link] as e:
print(f"✗ Database error: {e}")
continue
30
upd_field = input("Enter the field to update
(name/class/stream/marks_1/marks_2/marks_3/dob/mobile_number):
").strip().lower()
try:
#For NAME
if upd_field == "name":
upd_value = input("Enter the New Name: ").strip()
if not upd_value:
print("✗ Name cannot be empty!")
return
sql = "UPDATE STUDENTS SET NAME = %s WHERE Admin_No = %s"
#For CLASS
elif upd_field == "class":
upd_value = int(input("Enter the New Class: "))
if upd_value not in range(1,13):
print("✗ Invalid class! Must be between 1 and 12.")
return
sql = "UPDATE STUDENTS SET CLASS = %s WHERE Admin_No = %s"
#For STREAM
elif upd_field == "stream":
upd_value = input("Enter the New Stream: ").strip().upper()
sql = "UPDATE STUDENTS SET STREAM = %s WHERE Admin_No = %s"
31
if upd_value not in range(0,101):
print("✗ Invalid Marks! Must be between 0 and 100.")
return
sql = "UPDATE STUDENTS SET MARKS_1 = %s WHERE Admin_No = %s"
#For DOB
elif upd_field == "dob":
upd_value = input("Enter Date of Birth of student (Format YYYY/MM/DD): ")
is_valid, message = validate_dob(upd_value)
if is_valid == False:
print(f"✗ {message}")
return
sql = "UPDATE STUDENTS SET DOB = %s WHERE Admin_No = %s"
32
#For Mobile Number
elif upd_field == "mobile_no":
upd_value = input("Enter the registered Mobile number: ")
if len(upd_value)<10:
print("✗ Invalid Mobile Number! Must have 10 digits")
return
elif upd_value[0] not in ['6','7','8','9']:
print("✗ Invalid Mobile Number! Must start from 6,7,8 or 9")
return
elif not upd_value.isdigit():
print("✗ Mobile number must contain only digits!")
return
sql = "UPDATE STUDENTS SET MOBILE_NO = %s WHERE Admin_No = %s"
else:
print("✗ Field doesn't exist in the database!")
return
except ValueError:
print("✗ Invalid input! Please enter correct data type.")
except [Link] as e:
print(f"✗ Database error: {e}")
33
def SHOW():
[Link]("SELECT * FROM STUDENTS")
data = [Link]()
if not data:
print("\n" + "!"*50)
print("No records found in the database.")
print("!"*50 + "\n")
return
print("\n" + "="*125)
print("\n" + "="*125)
print(f"{'ADMISSION NO':<15} {'STUDENT NAME':<25} {'CLASS':<8}
{'DOB':<12} {'MOBILE NO':<12} {'STREAM':<15} {'MARKS 1':<10}
{'MARKS 2':<10} {'MARKS 3':<10} {'TOTAL':<10} {'AVG':<8}")
print("="*125)
34
try:
Admin_No = int(input("Enter the Admission Number whose data is to be
deleted: "))
except ValueError:
print("✗ Invalid input! Please enter a valid admission number.")
return
confirm = input("Are you sure you want to delete this record? (yes/no):
").strip().lower()
if confirm != 'yes':
print("✗ Deletion cancelled.")
return
try:
sql = "DELETE FROM STUDENTS WHERE ADMIN_NO = %s"
val = (Admin_No,)
[Link](sql,val)
35
[Link]()
print("✓ Record deleted successfully!")
except [Link] as e:
print(f"✗ Database error: {e}")
if mycon.is_connected():
print("-"*100)
print("✓ Connection established successfully!")
print("-"*100)
# Authentication Menu
while True:
print("\n" + "="*50)
print("1. Login")
print("2. Sign Up")
print("3. Exit")
print("="*50)
try:
auth_choice = int(input("Enter your choice: "))
except ValueError:
print("✗ Invalid choice! Please enter a number.")
continue
if auth_choice == 1:
if login():
break
36
else:
[Link]()
exit()
elif auth_choice == 2:
signup()
elif auth_choice == 3:
print("Goodbye!")
[Link]()
exit()
else:
print("✗ Invalid choice!")
38
output
# SIGN UP
39
# LOG IN
40
# Using Wrong Username or Password while LOG IN
#SAVEING DATA
41
# If using preexisting Admission Number
42
#If entered invalid Marks
#SHOW/DISPLAY data
43
#
OUTPUT
44
45
INSTALLATON PROCEDURE
Installation: -
-------------------
1. There will be two folders namely 'TABLEE Files'
and 'MAIN files'.
2. The folder 'TABLEE Files' will contain the source
code of the software in python language. If you are
running the software by the 3rd step mentioned below
you have to pre install the following modules: -
A.) [Link]
46
B.) IMPORT time
47
TESTING
48
employed, can be implemented at any time in the development
process, however the most test effort is employed after the
requirements have been defined and coding process has been
completed.
49
HARDWARE AND SOFTWARE REQUIREMENTS
EQUIVALENT
X. Printer : required
50
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python
BIBLIOGRAPHY
***
GROUP MEMBERS:
51