0% found this document useful (0 votes)
10 views26 pages

Informatic Practices Project For Class 12

Uploaded by

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

Informatic Practices Project For Class 12

Uploaded by

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

PM SHRI KENDRIYA VIDYALAYA NO: 2

TPKM MADURAI – 625005


ACADAMIC YEAR: 2024-2025

TOPIC: store management

UNDER THE GUIDANCE OF


MRS MERINA PAUL(PGT CS)
SUBMITTED BY:
M RAGHAV RAJ
XII-B
CERTIFICATE

This is to certify that M RAGHAV RAJ of PM SHRI


KENDRIYA VIDYALAYA NO2 MADURAI has
completed his project work of INFORMATIC
PRACTICES under the guidance of Mrs. MERINA
PAUL PGT (CS)To the best of my knowledge, it is an
original piece of work and its worthy of
consideration in partial fulfilment of the
requirement of CBSE.

INTERNAL EXAMINER EXTERNALEXAMINER

PRINCIPAL
ACKNOWLEDGEMENT
I would like to express my gratitude to my teacher
INFORMATIC PRACTICES Mrs. MERINA PAUL PGT
(CS) for her unrelenting support and valuable
guidance at every step of the project till its
successful completion. I am obliged towards her
motivation throughout the conduct of the project
work.

I would like to thank our Principal mam of our


school for providing me with all the resources
required for smooth conduct of my project.

Regards,
M RAGHAV RAJ
XII-B
INDEX
 WHAT IS SQL

 ABOUT PYTHON

 INTRODUCTION

 HARDWARE AND SOFTWARE


REQUIREMENT

 CODING

 OUTPUT IN IDLE
 OUTPUT IN MYSQL

SQL
SQL (Structured Query Language)
SQL is a standard language used to manage and
manipulate relational databases. It allows users
to perform various operations like retrieving,
inserting, updating, and deleting data from a
database. SQL is essential for querying and
managing data in relational database
management systems (RDBMS) such as
MySQL, PostgreSQL, and Oracle.
Key SQL Commands:
1. DDL (Data Definition Language):
o CREATE: Used to create a new table or
database.
o ALTER: Modifies the structure of an
existing table (e.g., adding columns).
o DROP: Deletes a table or database.
2. DML (Data Manipulation Language):

o SELECT: Retrieves data from the


database.
o INSERT: Adds new rows of data into a
table.
o UPDATE: Modifies existing data in a
table.
o DELETE: Removes data from a table.
PYTHON

Python is a high level interpreted language


that can be used for many purposes,
including: Building websites and software,
Automating tasks, Analyzing data, and
Machine learning
Advantages of python
Open source: python is free and open
source which makes it available
to everyone
Easy to learn: Python is easy to read and
understand because it doesn't use curly
brackets to and is similar to English
Portability : Python can be embedded in
many apps, even those that use different
coding languages
INTRODUCTION
The automobile showroom System is a software solution
designed to efficiently manage and store automobile-
related data using Python and SQL. The primary goal of
the system is to automate tasks such as adding, updating,
retrieving, and deleting automobile records, which are
traditionally handled manually. By integrating Python
with a relational database, such as MySQL the system
allows for easy interaction between the user and the
database, improving data management efficiency and
accuracy.
This project focuses on creating a simple, user-friendly
interface for managing essential automobile information
such as brand of the car , the model, fuel type, engine,
turbo. The use of SQL enables structured and secure
storage of data, while Python facilitates easy interaction
and manipulation of this data. The system is designed to
be scalable and can be further extended to incorporate
additional features like changing models , deleting non
demanded cars.

Hardware and software requirements I


used
Hardware requirements

 CPU: Intel(R) Core(TM) i7-10510U CPU at


1.80GHz 2.30 GHz
 RAM: 8.00 GB ram
 Storage:1tb

Software requirements
 Python: version 3.11
 Mysql :8.0.29
 Internet
CODING
def menu():
c='y'
while (c=='y'):
print ("1. add record")
print("2. update record")
print("3. delete record")
print("4. display records")
print("5. Exiting")
choice=int(input("enter your
choice:"))
if choice == 1:
adddata ()
elif choice== 2:
updatedata ()
elif choice== 3:
deldata ()
elif choice==4:
fetchdata()
elif choice==5:
print("Exiting")
break
else:
print("worng input")
c=input("do you want to continue or
not: ")
def fetchdata():
import mysql.connector
try:

db=mysql.connector.connect(host="loc
alhost",user="root",password='',databa
se='s1')
cursor=db.cursor()
results = cursor.fetchall()
for x in results:
print (x)
except:
print("ERROR: unable to fetch data")
def adddata():
import mysql.connector

db=mysql.connector.connect(host="loc
alhost",user='root',password='',databas
e='s1')
cursor=db.cursor()
cursor.execute("INSERT INTO Garage
VALUES(1,'BMW','M5CS','PETROL','V8','
TWIN TURBO')")
cursor.execute("INSERT INTO Garage
VALUES(2,'AUDI','RS6','PETROL',
'V8','TWIN TURBO')")
cursor.execute("INSERT INTO Garage
VALUES(3,'PORSCHE','911','PETROL','F6'
, 'TWIN TURBO')")
cursor.execute("INSERT INTO Garage
VALUES(4,'TESLA','MODEL S','DUAL
MOTOR','EV','NIL')")
db.commit()
print("Records added")
def updatedata():
import mysql.connector
try:
db=mysql.connetor.connect(host="local
host",user="root",password='',databas
e='s1')
cursor=db.cursor()
sql=("Update Garage set Model=gt3rs
Where name='PORSCHE'")
print("Record Updated")
db.commit()
except Exception as e:
print (e)
def deldata():
import mysql.connector
mysql.connector.connect(host="localho
st",user="root",password='',database='
s1')
cursor=db.cursor()
sql= ("delete form Garage where
name='TESLA'")
cursor.execute(sql)
print("Record Deleted")
db.commit ()
menu()
OUTPUT
RECORD UPDATED
RECORD DELETED
DISPLAY RECORD
EXITING RECORD
Structure of table

Add data
Add data
Update data
delete data

You might also like