Computer Science (083)
A Project Report on
    Student Management System
                  Submitted By
                  J. Sri Hamsini
                      Jay Patel
               Mahesh Bawankule
                     Class: XII
               (Computer Science)
                     2023-24
             Under the Guidance of
              Mr. Gokul A. Mole
        Department of Computer Science
Bharatiya Vidya Bhavan’s N.T.P.C. Vidya Mandir
 N.T.P.C. Township, UtkarshNagar, Ramtek Road, Mouda,
         Nagpur (Dist), Maharashtra – 441104.
TABLE OF CONTENT
   1. Certificates
   2. Declaration
   3. Acknowledgement
   4. About Python & MySQL Database
   5. Requirements
   6. Coding
   7. Output Screenshots
   8. Conclusion
   9.   Bibliography
               Department of Computer Science
                  Bharatiya Vidya Bhavan’s
                       N.T.P.C. Vidya Mandir
                         CBSE Affiliation. No: 1130601
                         CERTIFICATE
 This is to certify that, Master / Miss____________________________________, of
 class XII has completed his / her Computer Science project entitled “Student
 Management System” under my supervision of Central Board of Secondary
 Education for the Session 2023-2024. He/She has taken proper care and shown
 utmost sincerity in completion of this Project Report. I further certify that the
 project report is up to my expectation and as per the guidelines issued by Central
 Board of Secondary Education.
     Mr. Gokul Mole                                         Janaki Mani
Department of Computer Science                                Principal
           Department of Computer Science
              Bharatiya Vidya Bhavan’s
                   N.T.P.C. Vidya Mandir
                   CBSE Affiliation. No: 1130601
                   CERTIFICATE
                     The project report entitled
                “Student Management System”,
 submitted by ___________________________________of Class XII for
  the CBSE Senior Secondary Examination class XII of Computer
Science at Bhavan’s NTPC Vidya Mandir, Mouda has been examined.
                                                   External Examiner
                         DECLARATION
    I hereby declare that the project work entitled “Student Management System”
submitted to Department of Computer Science Bhavan’s NTPC Vidya Mandir, Mouda
which is prepared by me and my group member. All the coding is result of my group
member efforts and proper guidance of our principal and subject teachers.
                                                        _____________________
                                                               Class XII
                  ACKNOWLEDGEMENT
   I would like to take this opportunity to express my deep sense of gratitude to all those
people without whom this project would not be completed. I would like to thank my
parents for inexhaustible source of inspiration.
   I would like to extend my gratitude to Ms. Janki Mani, Principal, Bhavan’s NTPC
Vidya Mandir, Mouda for constant encouragement and moral support without I never
been able to give in my best.
   I would like to thank my Computer Teacher Mr. Gokul Mole, Bhavan’s NTPC Vidya
Mandir, Mouda for his been interest in the work and ever useful practical knowledge and
for the supervision.
   Finally I would like to thank CBSE for giving me this opportunity to undertake this
project
                         ABOUT PYTHON
Introduction
      It is widely used general purpose, high level programming language
developed by Guido van Rossum in 1991. It is used for software development, web
development (server-side), system scripting, and mathematics.
Features:
1. Easy to use: due to simple syntax
2. Interpreted Language: code execution and interpretation line by line.
3. Cross Platform Language: It can run on Windows, Linux and Macintosh etc.
    equally.
4. Expressive Language: less code to be written as it express the purpose of
    the code.
5. Completeness: Support wide range of libraries.
6. Free & Open Source: can be download freely and source code can be modify for
    Improvement
                         ABOUT MySQL
    Introduction
    MySQL is currently the most popular open source database software. It is a multi-user,
multithreaded database management system. MySQL is especially popular on the web. It is
one of the parts of the very popular lamp platform. Linux, apache, MySQL and platform
windows, apache, MySQL and PHP. MySQL was founded by Michael Widenius (Monty),
David Axmark and Allan Larsson in Sweden in year 1995.
Features of MySQL
   Open source & free of cost: it is open source and available at free of cost.
   Portability: Small enough in size to install and run it on any types of hardware and OS
    like Linux, MS windows or Mac etc.
   Security: its databases are secured & protected with password.
   Connectivity: various APIs are developed to connect it with many programming
    languages.
   Query language: it supports SQL (structured Query language) for handling database.
                 REQUIREMENTS
Minimum Hardware Requirements:
     Computer for coding and typing the required documents of the project.
     Printer, to print the required documents of the project.
     Compact drive.
     Processor : Pentium IV or higher
     RAM : 2 GB
     Hard Disk : 120 GB
Software Requirements:
     Operating System : Windows 7/10
     Python 3.X IDLE, for execution of program.
     Microsoft Office 2010 or 2013 for documentation
                         CODING
 # student management system
 import mysql.connector as mycon
 from tabulate import tabulate
 try:
# Create connection object and establish connection to MySQL
    con=mycon.connect(host="localhost", user="root",
                     passwd="Computer@12")
# Create cursor instance to execute query
    cur=con.cursor()
# Create database and open it for use
    cur.execute("CREATE DATABASE IF NOT EXISTS SMS")
    cur.execute("USE SMS")
# Create tables to stored data
    cur.execute("CREATE TABLE IF NOT EXISTS student(adno
                 integer primary key, sname varchar(50),fname
                 varchar(50), dob varchar(20),sclass
                 varchar(15),sec varchar(2),phone bigint,
                 address varchar(50))")
     con.commit()
 except:
     print("Sorry connection fail due to an exception")
def Menu_display():
    print("------------------------------------------------")
    print("|       Welcome to Student Management System\t\t|")
    print("------------------------------------------------")
    print("| \t 1. ADD NEW STUDENT\t\t\t\t|")
    print("| \t 2. VIEW ALL STUDENTS INFO\t\t\t|")
    print("| \t 3. SEARCH STUDENT INFO\t\t\t\t|")
    print("| \t 4. UPDATE STUDENT INFO\t\t\t\t|")
    print("| \t 5. DELETE STUDENT INFO\t\t\t\t|")
    print("| \t 6. Quit\t\t\t\t\t|")
    print("------------------------------------------------")
def add_student():
    print("------------------------------------------------")
    print("|                  NEW STUDENT ENTRY              |")
    print("------------------------------------------------")
    adno=int(input("Enter Student Admission No. : "))
    sname=input("Enter Student Name : ")
    fname=input("Enter Father Name : ")
    dob=input("Enter Student DOB : ")
    cl=input("Enter Class : ")
    s=input("Enter Section : ")
    ph=int(input("Enter Phone No. : "))
    add=input("Enter Address : ")
    qur="INSERT INTO   student(adno, sname, fname, dob, sclass,
         sec, phone,   address) VALUES({}, '{}', '{}', '{}',
         '{}', '{}',   {}, '{}')".format(adno, sname, fname,
         dob, cl, s,   ph, add)
    cur.execute(qur)
    con.commit()
    print("Data Saved Successfully")
    input("Press Enter key to continue..................")
def view_student():
    print("------------------------------------------------")
    print("|            STUDENTS INFORMATION              |")
    print("------------------------------------------------")
    cur.execute("SELECT * FROM student")
    data=cur.fetchall()
    if data==[]:
        print("No Record in System")
    else:
        print(tabulate(data,headers=['AdNo','Student Name',
              'Father Name', 'DOB', 'Class', 'Section',
              'Phone', 'Address'], tablefmt="grid"))
    input("Press Enter key to continue.....................")
def search_student():
    print("------------------------------------------------")
    print("|              SEARCH STUDENT                  |")
    print("------------------------------------------------")
    adn=int(input("Enter Admission No. : "))
    q="SELECT * FROM student WHERE adno={}".format(adn)
    cur.execute(q)
    data=cur.fetchall()
    if data!=[]:
        print(tabulate(data,headers=['AdNo','Student
              Name','Father Name', 'DOB', 'Class', 'Section',
             'Phone', 'Address'], tablefmt="grid"))
    else:
         print("Student Record not found")
    input("Press Enter key to continue..........")
def update_student():
    print("------------------------------------------------")
    print("|                UPDATE STUDENT INFORMATION       |")
    print("-----------------------------------------------")
    adn=int(input("Enter Admission No. to Update : "))
    q="SELECT * FROM student WHERE adno={}".format(adn)
    cur.execute(q)
    data=cur.fetchall()
    if data!=[]:
        print("PLEASE INPUT ALL THE FIELDS CORRECTLY TO
               UPDATE..")
        sname=input("Enter Student Name : ")
        fname=input("Enter Father Name : ")
        dob=input("Enter Student DOB : ")
        cl=input("Enter Class : ")
        s=input("Enter Section : ")
        ph=int(input("Enter Phone No. : "))
        add=input("Enter Address : ")
        qur="UPDATE student SET sname='{}', fname='{}',
        dob='{}', sclass='{}',sec='{}', phone={}, ddress='{}'
        WHERE dno={}".format(sname,fname,dob,cl,s,ph,add,adn)
        cur.execute(qur)
        con.commit()
        print("Record Updated Successfully")
    else:
        print("Admission No. not found")
    input("Press Enter key to continue..................")
def delete_student():
    print("------------------------------------------------")
    print("|               DELETE STUDENT INFORMATION        |")
    print("------------------------------------------------")
    adn=int(input("Enter Admission No. to Delete student
             record : "))
    q="SELECT * FROM student WHERE adno={}".format(adn)
    cur.execute(q)
    data=cur.fetchall()
    if data==[]:
        print("Admission No. not found")
    else:
        print(tabulate(data,headers=['AdNo','Student Name',
              'Father Name', 'DOB','Class', 'Section',
              'Phone', 'Address'], tablefmt="grid"))
        cur.execute("DELETE FROM student
                    WHERE adno={}".format(adn))
        print("Record Deleted Successfully")
        con.commit()
    input("Press Enter key to continue..................")
while True:
    Menu_display()
    ch = input("Enter your choice : ")
    if ch == '1' :
        add_student()
    elif ch == '2' :
        view_student()
    elif ch == '3' :
        search_student()
    elif ch == '4' :
        update_student()
    elif ch == '5' :
        delete_student()
    else:
        break
print("-----------------------------------------------")
print("|           THANK YOU FOR USING OUR SYSTEM    |")
print("------------------------------------------------")
             OUTPUT SCREENSHOTS
1. Starting screen (Menu)
2. Choice 1, To add new student information
3. Choice 2: To view all students information
4. Choice 3: To search student record using Admission No.
5. Choice 3: To search student record, if roll no. is not available.
6. Choice 4: To update student details using Admission no..
7. Choice 4: Student record updated in file.
7. Choice 4: To update Student record is not available.
8. Choice 5: To delete student record from a system.
9. Choice 5: Student record deleted from a system.
10. Choice 6: Exit from system.
                             CONCLUSION
    The project titled “Student Management System” is developed using Python module as a
front end and MySQL Database as back end to computerize the process of management of
student records. This project covers only the basic features required.
                       BIBLIOGRAPHY
References
     Computer Science in Python (Dhanpat Rai Publication)– by Sumita Arora
     Website link : http://python.MyKvs.in/
     Website link : http://www.w3school.com
     http://www.python.org/
     Youtube Channels