0% found this document useful (0 votes)
47 views30 pages

Final Ip Project Avi and Hiral

Uploaded by

rishabhseth7777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views30 pages

Final Ip Project Avi and Hiral

Uploaded by

rishabhseth7777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

SHRI RAM CENTENNIAL SCHOOL

NAME – HIRAL HARIA , AVI CHOPRA


SESSION-2023-2024
CLASS-XII
SUBMITTED TO- Priya Kaplay Mam
SUBJECT- Information Practices
TOPIC -Performing Practical (Project)
Questions Based on syllabusof Class XII
CERTIFICATE
This is to certify that Mr.Avi Chopra bonafide
students of Class X I I has successfully completed
the Informatics Practices Group Project on
“Performing Practical (Project) Questions
Based on syllabus of Class XII” in the academic
year 2022-23

INCHARGE TEACHER EXTERNAL EXAMINER


(MRS. PRIYA KAPLEY)

PRINCIPAL
(MR. CHANDRASHEKHAR YADAV)
DECLARATION

We Avi Chopra AND Hiral Haria of Class


XII , SHRI RAM CENTENNIAL SCHOOL
Indore, declare that the following Group
project on “Performing Practical (Project)
Questions Based on syllabus of Class XII.”
has been accomplished under the able
guidance of our Informatics Practices
Teacher, MRs PRIYA KAPLEY Ma'am of
SHRI RAM CENTENNIAL SCHOOL Indore,
M.P.
ACKNOWLEDGEMENT

We hereby express our gratitude to our


Principal Mr. ChandraShekhar Yadav Sir and
Mrs. Priya Kapley Ma'am for their guidance
throughout our studies. we also thank our
parents who supported us in all our
endeavors. we also thank our classmates who
have equally worked hard to make our project
a success. And last but not the least we thank
the almighty for whatever we have achieved
till now.
INDEX
Certificate 02
1

2 Declaration 03

3 Acknowledgement 04

4 Index 05

5 introduction 06

6 theoritical background 07-11

7 mysql and python connectivity 12

8 main_menu 13

9 student table code 14

1 admission table code 15

0 coding for admission 16

1 Code Excecution Of Admission 17

1 Data coding for student 22-27

1 TAbles as output of codes 29

2 Bibliography 29

1
MYSQL
PYTHON
Theoritical
Background
DataBase
A database is a systematic collection of data.
They support electronic storage and
manipulation of data. Databases make data
management easy.
Let us discuss a database example: An online
telephone directory uses a database to store
data of people, phone numbers, and other
contact details. Your electricity service
provider uses a database to manage billing,
client-related issues, handle fault data, etc.
Let us also consider Facebook. It needs to
store, manipulate, and present data related
to members, their friends, member activities,
messages, advertisements, and a lot more.
We can provide a countless number of
examples for the usage of databases.
DataBase Management
System (DBMS)
Database is a collection of interrelated data which helps in
the efficient retrieval, insertion, and deletion of data from
the database and organizes the data in the form of tables,
views, schemas, reports, etc. For Example, a university
database organizes the data about students, faculty,
admin staff, etc. which helps in the efficient retrieval,
insertion,
and deletion of data from it.
There are four types of Data Languages

1.Data Definition Language (DDL)


2.Data Manipulation Language(DML)
3.Data Control Language(DCL)
4.Transactional Control Language(TCL)
MySQL is a fast, easy-to-use RDBMS being used for many
small and big businesses. MySQL is developed, marketed
and supported by MySQL AB, which is a Swedish company.
MySQL is becoming so popular because of many good
reasons −
MySQL is released under an open-source license. So you
have nothing to pay to use it.
MySQL is a very powerful program in its own right. It
handles a large subset of the functionality of the most
expensive and powerful database packages.
MySQL uses a standard form of the well-known SQL
data language.
MySQL works on many operating systems and with
many languages including PHP, PERL, C, C++, JAVA, etc.
MySQL works very quickly and works well even with
large data sets.
MySQL is very friendly to PHP, the most appreciated
language for web development.
MySQL supports large databases, up to 50 million rows
or more in a table. The default file size limit for a table is
4GB, but you can increase this (if your operating system
can handle it) to a theoretical limit of 8 million terabytes
(TB).
MySQL is customizable. The open-source GPL license
allows programmers to modify the MySQL software to fit
their own specific environments
Python is a very popular general-purpose interpreted,
interactive, object-oriented, and high-level programming
language. Python is dynamically-typed and garbage-
collected programming language. It was created by Guido
van Rossum during 1985- 1990. Like Perl, Python source
code is also available under the GNU General Public
License (GPL).
Python supports multiple programming paradigms,
including Procedural, Object Oriented and Functional
programming language. Python design philosophy
emphasizes code readability with the use of significant
indentation.
This tutorial gives a complete understanding of Python
programming language starting from basic conceopts to
advanced concepts. This tutorial will take you through
simple and practical approaches while learning Python
Programming language.
Software & Hardware
A computer system is divided into two
categories: Hardware and Software. Hardware
refers to the physical and visible components of
the system such as a monitor, CPU, keyboard and
mouse. Software, on the other hand, refers to a
set of instructions which enable the hardware to
perform a specific set of tasks. The software
must be installed in the hardware to function
properly and similarly, the hardware must be
present for the tasks to be performed. Both are
interdependent, yet they are also different from
each other.
MySQL & Python
Connectivity
MySQL Python/Connector is an interface for connecting to a
MySQL database server from Python. It implements the Python
Database API and is built on top of the MySQL.

Before establishing connection to MySQL database using


python, assume −
That we have created a database with name mydb.
We have created a table EMPLOYEE with columns
FIRST_NAME, LAST_NAME, AGE, SEX and INCOME.
The credentials we are using to connect with MySQL are
username: root, password: password.
You can establish a connection using the connect() constructor.
This accepts username, password, host and, name of the
database you need to connect with (optional) and, returns an
object of the MySQLConnection class.

You can also establish connection to MySQL by passing


credentials (user name, password, hostname, and database name)
to connection.MySQLConnection()
Coding For Main_Menu
import main_menu
import admission
import student_data
while True:
#main_menu.clrscreen()
print("*****......................................................*****")
print("*****.........WELCOME TO SCHOOL
MANAGEMENT SYSTEM.........*****")
print("*****......................................................*****")
print("*****...........|*|SHRI RAM CENTENNIAL
SCHOOl|*|...........*****")
print("1: ADMISSION")
print("2: STUDENT DATA")
print("3: EXIT")
print("*****......................................................*****")
choice=int(input("Enter your choice"))
if choice==1:
admission.ADM_MENU()
elif choice==2:
student_data.STU_MENU()
elif choice==3:
break
else:
print("Error:Invalid Choice try again......")
conti=input("Press any key to continue")
Coding For Student Table Creation
import mysql.connector as my
con=my.connect(host="localhost",user="root",password="root",
database="SRCS")
cur=con.cursor()
query="create table Student(session varchar(30),stname
varchar(50),stclass varchar(10),stsec varchar(10),stroll
varchar(5),sub1 varchar(20),sub2 varchar(20),sub3 varchar(20))"
con.commit()
cur.execute(query)
cur.execute("Show tables")
for x in cur:
print(x)
con.commit()
con.close()

OUTPUT:
Coding For Admission Table Creation
import mysql.connector as my
con=my.connect(host="localhost",user="root",password="root",
database="SRCS")
cur=con.cursor()
query="create table Admission(adno varchar(10),rno
varchar(10),sname varchar(50),address varchar(100),phon
varchar(20),clas varchar(10))"
cur.execute(query)
cur.execute("Show tables")
for x in cur:
print(x)
con.close()

OUTPUT;
Coding For Admission Data Input
import main_menu
import admission
import mysql.connector as co
def ADM_MENU():
while True:
print("*****......................................................*****")
print("*****.........WELCOME TO SCHOOL MANAGEMENT
SYSTEM.........*****")
print("*****......................................................*****")
print("*****...........|*|ADMISSION|*|...........*****")
print("1: Admin Details")
print("2: Show admin Details")
print("3: Search")
print("4: Deletion of Records")
print("5: Update Admission Details")
print("6: Return")
print("*****......................................................*****")
choice=int(input("Enter your choice"))
if choice==1:
admission.admin_details()
elif choice==2:
admission.show_admin_details()
elif choice==3:
admission.search_admin_details()
elif choice==4:
admission.delete_admin_details()
elif choice==5:
admisssion.edit_admin_details()
elif choice==6:
return
else:
print("Error:Invalid Choice try again......")
conti="Press any key to return to Main Menu"
def admin_details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
adno1=input("Enter Admission No")
rno1=input("Enter Roll no")
sname1=input("Enter Student Name")
address1=input("Enter Address")
phon1=input("Enter phone number")
clas1=input("Enter Class")
query="insert into
admission(adno,rno,sname,address,phon,clas)
values(%s,%s,%s,%s,%s,%s)"
val=(adno1,rno1,sname1,address1,phon1,clas1)

mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
cursor.execute("select* from admission")
data=cursor.fetchall()
for row in data:
print(row)
def search_admin_details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
ac=input("Enter Admission Number")
st="select * from admission where adno='%s'"%(ac)
cursor.execute(st)
data=cursor.fetchall()
print(data)
def delete_admin_details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
ac=input("Enter Admission Number")
st="delete from admission where adno='%s'"%(ac)

cursor.execute(st)
mycon.commit()
print("Data Deleted Successfully")
def edit_admin_details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()

print("1: Edit Name:")


print("2: Edit Address:")
print("3: Edit Phone Number:")
print("4: Return:")
print("*****......................................................*****")
choice=int(input("Enter your choice"))
if choice==1:
admission.edit_name()
elif choice==2:
admission.edit.address()
elif choice==3:
admission.edit_photo()
elif choice==4:
return
else:
print("Error:Invalid Choice try again......")
conti="Press any key to return to "
def edit_name():
mycon=co.connect (host="localhost", user="root", passwd="",
database="SRCS")
cursor=mycon.cursor()
ac=input ('Enetr Admission no:')
nm=input ( 'Enter correct name')
st= "update admission set sname='%s' where adno='%s'"%(nm,
ac)
cursor.execute(st)

mycon.commit()
print ('Data updated successfully')
def edit_address():
mycon=co.connect(host="localhost", user="root",
passwd="root", database="SRCS")
cursor=mycon.cursor(
ac=input('Enetr Admission no: ')
nm=input ('Enter correct address')
st= "update admission set address='%s' where adno='%s'"%(nm,
ac)
cursor.execute(st)
mycon.commit()
print ('Data updated successfully')
def edit_phno():
mycon=co.connect(host="localhost", user="root",
password="root", database="SRCS")
cursor=mycon.cursor()
ac=input ('Enetr Admission no:')
nm=input ('Enter correct phone number')
st="update admission set phon='%s' where adno='%s'"%(nm, ac)
cursor.execute(st)
mycon.commit()
print('Data Entered Successfully')
Code Excecution and OutPut Of
Admission Data Input
Coding For Student_Data Input
import main_menu
import student_data
import mysql.connector as co
def STU_MENU():
while True:
print("*****......................................................*****")
print("*****.........WELCOME TO SCHOOL MANAGEMENT
SYSTEM.........*****")
print("*****......................................................*****")
print("*****...........|*|STUDENT DATA MENU|*|...........*****")
print("1: Add Student Record")
print("2: Show Student Details")
print("3: Search Student Records")
print("4: Delete Student Records")
print("5: Edit Student Record")
print("6: Exit")
print("*****......................................................*****")
choice=int(input("Enter your choice"))
if choice==1:
student_data.Add_records()
elif choice==2:
student_data.Show_stu_Details()
elif choice==3:
student_data.Search_Stu_Details()
elif choice==4:
student_data.Delete_Stu_Details()
elif choice==5:
student_data.Edit_Stu_Details()
elif choice==6:
return
else:
print("Error:Invalid Choice try again......")
conti="Press any key to return to Main Menu"
def Add_records():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
session1=input("Enter Academic Session:")
stname1=input("Enter Student Name ")
stclass1=input("Enter Class")
stsec1=input("Enter Section")
stroll1=input("Enter Roll Number")
subj1=input("Enter Sub1")
subj2=input("Enter Sub2")
subj3=input("Enter Sub3")
query="insert into student
(session,stname,stclass,stsec,stroll,sub1,sub2,sub3)
values(%s,%s,%s,%s,%s,%s,%s,%s)"
val=(session1,stname1,stclass1,stsec1,stroll1,subj1,subj2,subj3)
cursor.execute(query,val)
print("Record has been inserted in student table")
cursor.execute("select * from student")
for x in cursor:
print(x)
mycon.commit()
mycon.close()

def Show_stu_Details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
cursor.execute("select * from student")
data=cursor.fetchall()
for row in data:
print(row)
def Search_Stu_Details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
ac=input("Enter Roll Number")
st="select * from student where stroll1='%s'"%(ac)
cursor.execute(st)
data=cursor.fetchall()
print(data)
def Delete_Stu_Details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
ac=input("Enter Roll Number")
st="delete from student where stroll1='%s'"%(ac)
cursor.execute(st)
mycon.commit()
print("Data Deleted Successfully")
def Edit_Stu_Details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()

print("1: Edit Stu Name:")


print("2: Edit Roll No:")
print("3: Edit Class:")
print("4: Return:")
print("*****......................................................*****")
data=cursor.fetchall()
for row in data:
print(row)
def Search_Stu_Details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
ac=input("Enter Roll Number")
st="select * from student where stroll1='%s'"%(ac)
cursor.execute(st)
data=cursor.fetchall()
print(data)
def Delete_Stu_Details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()
ac=input("Enter Roll Number")
st="delete from student where stroll1='%s'"%(ac)
cursor.execute(st)
mycon.commit()
print("Data Deleted Successfully")
def Edit_Stu_Details():
mycon=co.connect(host="localhost",user="root",password="roo
t",database="SRCS")
cursor=mycon.cursor()

print("1: Edit Stu Name:")


print("2: Edit Roll No:")
print("3: Edit Class:")
print("4: Return:")
print("*****......................................................*****")
choice=int(input("Enter your choice"))
if choice==1:
admission.edit_stuname()
elif choice==2:
admission.edit_rollno()
elif choice==3:
admission.edit_class()
elif choice==4:
return
else:
print("Error:Invalid Choice try again......")
conti="Press any key to return to "
def edit_stuname():
mycon=co.connect (host="localhost", user="root", passwd="",
database="SRCS")
cursor=mycon.cursor()
ac=input ('Enetr Student Name:')
nm=input ( 'Enter correct name')
st= "update student set stname='%s' where stroll1='%s'"%(nm,
ac)
cursor.execute(st)
mycon.commit()
print ('Data updated successfully')
def edit_rollno():
mycon=co.connect(host="localhost", user="root",
passwd="root", database="SRCS")
cursor=mycon.cursor()
ac=input('Enetr Roll no: ')
nm=input('Enter Roll No.')
st= "update admission set address='%s' where stroll1='%s'"%
(nm, ac)
cursor.execute(st)
mycon.commit()
print('Data updated successfully')
def edit_class():
mycon=co.connect(host="localhost", user="root",
password="root", database="SRCS")
cursor=mycon.cursor()
ac=input('Enetr Class:')
nm=input('Enter correct Class')
st="update student set phon='%s' where stroll1='%s'"%(nm, ac)
cursor.execute(st)
mycon.commit()
print('Data Entered Successfully')

Code Excecution and OutPut Of


Admission Data Input
TABLES AS OUTPUT OF CODE:
BiblioGraphy
https://www.google.co.in/

https://www.python.com/

i.p ncert book CLASS XII

https://www.youtube.com/

You might also like