Python Project
Python Project
Python Project
9 Source Code
10 Sample Outputs
11 Conclusion
12 Bibliography
ACKNOWLEDGEMENT
Last but not least , I would like to thank almighty, my parents, brothers, sisters and
friends for their constant encouragement without whom the project could not have been
finished successfully.
PROJECT
ON
STUDENT MANAGEMENT SYSTEM
INTRODUCTION
Student Management System project is written in Python language and SQL is
used for database connection. This is a simple console based system which is very
easy to understand and use. Talking about the system, it contains all the basic
functions which include insert new student details, view student’s details that
already exists, update or we can modify student details also deletion function is
there to delete the student details that no more exist. It is too easy to use; he/she
can check the total student records easily. This project is multifield project, so that
it can be modified for various purposes. The main object of this system is to
provide a secure system.
EXISTING SYSTEM
In the current system we need to keep a number of records related to the student
and want to enter the details of the student and the marks manually. In this system
only the teacher or the school authority views the mark of the student and they
want to enter the details of the student. This is time consuming and has much cost.
Example
Following is the example of connecting with MySQL database "TESTDB"
#!/usr/bin/python
importMySQLdb
READ Operation.
fetchone() − It fetches the next row of a query result set. A result set is an object that is
returned when a cursor object is used to query a table.
fetchall() − It fetches all the rows in a result set. If some rows have already been
extracted from the result set, then it retrieves the remaining rows from the result set.
rowcount − This is a read-only attribute and returns the number of rows that were
affected by an execute() method.
Source code
importos
import platform
importmysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",password="ammaamrita")
mycursor=mydb.cursor()
mycursor.execute("use school")
exit='n'
while exit=='n':
os.system('cls')
print('-' * 90)
print('-' * 90)
print('-' * 90)
ch = ch.upper()
ifch == 'I':
mydb=mysql.connector.connect(host="localhost", user="root", passwd="ammaamrita",
db="school")
mycursor=mydb.cursor()
choice='y'
while choice=='y':
data = (sno,sname)
mycursor.execute(Qry,data)
if choice=='y':
continue
mydb.commit()
mydb.close()
elifch == 'V':
mycursor=mydb.cursor()
while choice=='y':
rno=int(input('enter the roll number of student whose record you want to search '))
data = (rno,)
mycursor.execute(Qry,data)
count=0