0% found this document useful (0 votes)
26 views24 pages

Directory Storing System

Computer Cs directory storing system class 12
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)
26 views24 pages

Directory Storing System

Computer Cs directory storing system class 12
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/ 24

BHOLANANDA NATIONAL

VIDYALAYA
BARRACKPORE

COMPUTER SCIENCE (083)


PROJECT
2024-2025
TOPIC:
DIRECTORY SYSTEM
GUIDED BY:- MR. JAIDEEP BISWAS

SUBMITTED BY:
CLASS AND SECTION : XII-
ROLL NUMBER:
TABLE OF CONTENTS

 INTRODUCTION TO PYTHON.
 INTRODUCTION TO THE
PROJECT.
 ACKNOWLEDGEMENT.
 SYSTEM REQUIREMENTS.
 MYSQL TABLE DETAILS.
 FLOWCHART
 PROGRAM CODE DETAILS.
 SCREEN SHOTS OF EXECUTION.
 BIBLIOGRAPHY.
 CERTIFICATE.
INTRODUCTION TO PYTHON

Python is an interpreted, object-oriented,


high-level programming language with
dynamic semantics. Its high-level built in
data structures, combined with dynamic
typing and dynamic binding, make it very
attractive for Rapid Application
Development, as well as for use as a
scripting or glue language to connect
existing components together. Python's
simple, easy to learn syntax emphasizes
readability and therefore reduces the cost
of program maintenance. Python supports
modules and packages, which encourages
program modularity and code reuse. The
Python interpreter and the extensive
standard library are available in source or
binary form without charge for all major
platforms, and can be freely distributed.
History of Python:

Python is a widely used general-purpose,


high-level programming language. It was
initially designed by Guido van Rossum in
1991 and developed by Python Software
Foundation. It was mainly developed for
emphasis on code readability, and its syntax
allows programmers to express concepts in
fewer lines of code.
INTRODUCTION TO THE PROJECT

DIRECTORY SYSTEM
is an program which can be used to store
records of people. This application stores
the details of people( ID, FIRST NAME,
LAST NAME AND ADDRESS). With the
help of this project we can insert new
records, modify a record, delete a
record, search a record. We can also
display all the records.
ACKNOWLEDGEMENT

I thank my computer teacher Mr. Jaideep


Biswas for guidance and support. I would
also thank to my parent for encouraging
during the course of this project. Finally, I
would like to thank CBSE for giving me
this opportunity to undertake this
project.
SYSTEM REQUIREMENTS

HARDWARE REQUIREMENT:

Printer- to print the required


documents of the project.
Compact Drive
Proccesor: Pentium III and above
RAM: 256 MB(minimum)
Hard-Disk : 20 GB(minimum)

SOFTWARE REQUIREMENT:

 Windows 7 or higher
 MYSQL SERVER 5.1.
 Python idle 3.6 or higher or spyder.
 Microsoft Word 2010 or higher for
documentation.
MYSQL TABLE DETAILS

Database Name: school


TABLE Name: DIRECTORY

COMMAND TO CREATE TAHE TABLE


CREATE TABLE EMP
(
ID INT PRIMARY KEY,
FNAME CHAR(40),
LNAME CHAR(40),
ADDRESS CHAR(50)
);
FLOWCHART

INSERT A SEARCH A
RECORD RECORD

DISPLAY
DELETE A DIRECTORY SYSTEM
ALL
RECORD
RECORDS

EXIT FROM
MODIFY A
THE
RECORD
PROJECT
PROGRAM CODE

import mysql.connector
import sys
mycon=mysql.connector.connect(host='localhost',u
ser='root',

password='tiger',database='school')
mycur=mycon.cursor()

def SProfile():
sql="Insert into
directory(id,fname,lname,address)values(%s,%s,%s,
%s)"
print('\nPLEASE PROVIDE THE REQUIRED
INFORMATION\n')
id=int(input('\nENTER THE ID '))
fname=input('\nENTER THE FIRST NAME:')
lname=input('\nENTER THE LAST NAME:')
address=input("ENTER ADDRESS")

value=(id,fname,lname,address)
try:
mycur.execute(sql,value)
print(value,'ADDED SUCCESSFULLY ')
mycon.commit()
except:
print('UNABLE TO INSERT!!!!!')

def Show_Profile():

sql1='Select * from directory'

mycur.execute(sql1)
rec1=mycur.fetchall()
print("ID\t\tFNAME\t\tLNAME\t\tADDRESS")
for x in rec1:
id=x[0]
fname=x[1]
lname=x[2]
address=x[3]

print(id,'\t',fname,'\t',lname,'\t\t',address)
def Search_profile():
sql1="Select * from directory where id=%s"
d=int(input("ENTER ID"))
value=(d,)
mycur.execute(sql1,value)
rec1=mycur.fetchall()
print("ID\t\tFNAME\t\tLNAME\t\tADDRESS")
for x in rec1:
id=x[0]
fname=x[1]
lname=x[2]
address=x[3]

print(id,'\t',fname,'\t',lname,'\t\t',address)

def Edit_Profile():
Show_Profile()
sql="Update directory set address=%s where
id=%s";
newid=int(input('\nENTER THE ID WHOSE
ADDRESS TO MODIFY:'))
newaddress=input('\nENTER THE NEW
ADDRESS:')
value=(newaddress,newid)
try:
mycur.execute(sql,value)
mycon.commit()
print('RECORD UPDATED SUCCESSFULLY')
except:
print('UNABLE TO UPDATE')
Show_Profile()

def Remove_Profile():
Show_Profile()
d=int(input('\nENTER ID TO DELETE:'))
sql='Delete from directory where id=%s'
value=(d,)
try:
mycur.execute(sql,value)
mycon.commit()
print('RECORD DELETED SUCCESSFULLY')
except:
mycon.rollback()
print('UNABLE TO DELETE RECORD!!!')
Show_Profile()
def Close():
print('\nTHANK YOU FOR USING THE
APPLICATION')
sys.exit()

print('-----------WELCOME TO DIRECTORY SYSTEM


-------------\n\n')
while(True):
print('\n\nPRESS 1 TO CREATE A PROFILE')
print('PRESS 2 TO SHOW ALL RECORDS')
print('PRESS 3 TO EDIT A RECORD')
print('PRESS 4 TO DELETE A RECORD')
print('PRESS 5 TO SEARCH A RECORD BY ID')
print('PRESS 6 TO CLOSE THE APPLICATION')
choice=int(input('ENTER YOUR CHOICE : '))
if(choice==1):
SProfile()
elif(choice==2):
Show_Profile()
elif(choice==3):
Edit_Profile()
elif(choice==4):
Remove_Profile()
elif(choice==5):
Search_profile()
elif(choice==6):
Close()

SCREEN SHOTS OF EXECUTION


MAIN MENU
INSERTING A NEW RECORDS
DISPLAYING ALL THE RECORDS
MODIFY DETAILS
SEARCHING A RECORD
DELETE A RECORD
CLOSING THE PROGRAM
BIBLIOGRAPHY
BOOKS:

 COMPUTER SCIENCE WITH


PYTHON- BY SUMITA ARORA
 COMPUTER SCIENCE WITH
PYTHON- BY PREETI ARORA
 PYTHON COOKBOOK

WEBSITES:
 www.geeksforgeeks.org
 https://docs.python.org/3/
 https://www.w3schools.com/python/
CERTIFICATE

This is to certify that ___________________


of class XII-SC, Section __ , BOARD
Roll_______ of BHOLANANDA NATIONAL
VIDYALAYA, Barrackpore has successfully
completed his/her project in Computer
Science for the AISSCE as prescribed by
CBSE in the year 2024-2025.

_________ _________ _________


Signature Signature
Signature
INTERNAL EXTERNAL
PRINCIPAL

You might also like