0% found this document useful (0 votes)
16 views17 pages

ASSIGNMENT

The document outlines a project on a railway reservation system using Python and MySQL, detailing its features, coding structure, and user manual. It provides an introduction to Python as a programming language, its applications, and advantages, as well as an overview of MySQL's functionalities. Additionally, it includes coding examples, hardware and software requirements, and acknowledgments for the project work.

Uploaded by

Aastha Singh
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)
16 views17 pages

ASSIGNMENT

The document outlines a project on a railway reservation system using Python and MySQL, detailing its features, coding structure, and user manual. It provides an introduction to Python as a programming language, its applications, and advantages, as well as an overview of MySQL's functionalities. Additionally, it includes coding examples, hardware and software requirements, and acknowledgments for the project work.

Uploaded by

Aastha Singh
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/ 17

INDEX

1. Introduction

2. About Python

3. MYSQL

4. Module

5. Project View

6. Python coding

7. User Manual

8. Bibliography
INTRODUCTION

This project introduces railway


reservation system. It explains how
reservation is being done in Indian
Railways. The step by step procedure
is explained. Proper comments have
been given at desired location to
make the project user friendly.
Various functions and structures are
used to make a complete use of this
language, this project is well versed
with the programming. Railway
reservation can easily accompany
with the help of this.
ABOUT PYTHON

Python is a high-level, interpreted programming language


known for its simplicity and readability. Created by Guido van
Rossum and first released in 1991, Python has become one of
the most popular languages in the world due to its versatility
and ease of use. It is widely used in web development, data
science, artificial intelligence, machine learning, automation,
and many other fields.
Features of Python
Python's syntax is clean and easy to understand, making it an
excellent choice for beginners and experienced developers
alike. It follows an object-oriented programming approach
but also supports functional and procedural programming
paradigms. Python’s dynamic typing and automatic memory
management simplify the development process, reducing the
need for complex code structures.
One of Python's key strengths is its extensive standard library,
which provides modules for handling everything from file I/O
and networking to mathematical operations and data
visualization. Additionally, Python has a large and active
community that continuously develops third-party libraries,
such as NumPy and Pandas for data science, TensorFlow for
machine learning, and Flask and Django for web
development.
Python in Different Domains
Python’s flexibility allows it to be used in various fields. In
web development, frameworks like Django and Flask enable
developers to create robust web applications efficiently. In
data science and artificial intelligence, Python’s rich
ecosystem of libraries makes it the preferred language for
researchers and engineers. It is also widely used in
automation and scripting, helping developers automate
repetitive tasks with minimal effort.
Python is a popular choice in the cybersecurity industry for
ethical hacking and penetration testing, thanks to libraries
like Scapy and PyCrypto. In game development, it is used with
frameworks like Pygame to create simple games. Python is
also utilized in finance and fintech applications for
quantitative analysis and algorithmic trading.
Advantages of Python
One of Python’s biggest advantages is its readability, which
enhances collaboration among developers. Its cross-platform
nature means that Python code can run on different
operating systems with little to no modification. The language
also has strong support for integration with other languages
like C, C++, and Java, making it highly adaptable.
MODULES
Modules refer to a file containing Python statements and
definitions. A file containing Python code, for e.g.:
example.py, is called a module and its module name would
be example. We use modules to break down large programs
into small manageable and organized files. Furthermore,
modules provide reusability of code.

We can define our most used functions in a module and


import it, instead of copying their definitions into different
programs. We can import the definitions inside a module to
another module or the interactive interpreter in Python.

Python has a ton of standard modules available. Standard


modules can be imported the same way as we import our
user-defined modules.

Some advantages of modules are:


1. Division of development
2.Increases readability of program
3. Programming errors can easily be detected
4. Allows reuse of code
5.Improves manageability
MY SQL
MySQL is an open-source relational database management
system (RDBMS) that is widely used for managing structured
data. It was originally developed by MySQL AB and later
acquired by Oracle Corporation. MySQL is known for its
reliability, performance, and ease of use, making it a popular
choice for web applications, data storage, and enterprise
solutions.
Features of MySQL
MySQL uses Structured Query Language (SQL) to manage and
manipulate data efficiently. It supports features like ACID
(Atomicity, Consistency, Isolation, Durability) compliance,
transactions, indexing, and multiple storage engines such as
InnoDB and MyISAM. MySQL also offers strong security
features, including user authentication, data encryption, and
access controls.
Applications of MySQL
MySQL is commonly used in web development, powering
content management systems (CMS) like WordPress, Joomla,
and Drupal. It is a key component in the LAMP stack (Linux,
Apache, MySQL, PHP/Python/Perl) used for web applications.
MySQL is also used in banking systems, e-commerce
platforms, and data analytics.
PYTHON CODING
PRINT("****RAILWAY MANAGEMENT****")
IMPORT MYSQL.CONNECTOR
MYDB=MYSQL.CONNECTOR.CONNECT(HOST="LOCALHOST
",USER="ROOT",PASSWD="1234")
MYCURSOR=MYDB.CURSOR()
MYCURSOR.EXECUTE("CREATE DATABASE IF NOT EXISTS
RAILWAY")
MYCURSOR.EXECUTE("USE RAILWAY")
MYCURSOR.EXECUTE("CREATE TABLE IF NOT EXISTS
PASSENGER(NAME VARCHAR(50) NOT NULL,WORK
VARCHAR(25) NOT NULL, NO VARCHAR(25),GENDER
CHAR(1))")
MYCURSOR.EXECUTE("CREATE TABLE IF NOT EXISTS
RLSTAFF(NAME VARCHAR(50) NOT NULL,GENDER
CHAR(1),WORK VARCHAR(25) NOT NULL,SALARY
VARCHAR(25))")
MYDB.COMMIT()
WHILE(TRUE):
PRINT("1=ENTER DATA FOR NEW PASSENGER")
PRINT("2=ENTER DATA FOR NEW STAFF DATA")
PRINT("3=SEARCH PASSAENGER DATA")
PRINT("4=SEARCH STAFF DATA")
PRINT("5=REMOVE PASSAENGER RECORD")
PRINT("6=REMOVE STAFF RECORD")
PRINT("7=EXIT")
CH=INT(INPUT("ENTER YOUR CHOICE:"))
IF(CH==1):
PRINT(‘ALL INFORMATION PROMPTED ARE
MANADATORY TO BE FILLED”)
NAME=INPUT("ENTER NAME(LIMIT 35
CHARACTERS):")
WORK=STR(INPUT("ENTER WORK:"))
NO=STR(INPUT("ENTER NUMBER:"))
GENDER=STR(INPUT("ENTER GENDER(M/F):"))
MYCURSOR.EXECUTE("INSERT INTO RAILWAY)
VALUES('"+NAME+"','"+WORK+"','"+ NO+"','"+GENDER+" ')")
MYDB.COMMIT()
PRINT("PASSENGER RECORD HAS BEEN SAVED
SUCCESSFULLY!!")
ELIF(CH==2):
SNAME=STR(INPUT("ENTER STAFF MEMBER NAME:"))
GENDER=STR(INPUT("ENTER GENDER(M/F):"))
DEP=STR(INPUT("ENTER DEPARTMENT:"))
SAL=INT(INPUT("ENTER SALARY"))
MYCURSOR.EXECUTE("INSERT INTO RLSTAFF
VALUES('"+SNAME+"','"+GENDER+"','"+DEP+"','"+STR(SAL)+"')
MYDB.COMMIT()
PRINT("STAFF RECORD HAS BEEN SAVED
SUCCESSFULLY!!!")
ELIF(CH==3):
NO=STR(INPUT("ENTER PASSENGER NO:"))
MYCURSOR.EXECUTE("SELECT * FROM RAILWAY WHERE
NO='"+ NO+"'")
FOR I IN MYCURSOR:
NAME,WORK, NO,GENDER=I
PRINT(F'NAME:- {NAME}')
PRINT(F'WORK:- {WORK}')
PRINT(F'NUMBER:- { NO}')
PRINT(F'GENDER:- {GENDER}')
ELIF(CH==4):
NAME=STR(INPUT("ENTER NAME"))
MYCURSOR.EXECUTE("SELECT * FROM RLSTAFF WHERE
NAME='"+NAME+"'")
FOR I IN MYCURSOR:
NAME,GENDER,DEP,SAL=I
PRINT(F"NAME:- {NAME}")
PRINT(F"GENDER:- {GENDER}")
PRINT(F"DEPARTMANT:- {DEP}")
PRINT(F"SAL:- {SAL}")
ELIF(CH==5):
R_NO=STR(INPUT("ENTER NUMBER"))
MYCURSOR.EXECUTE("DELETE FROM RAILWAY WHERE
NO='"+ NO+"'")
MYDB.COMMIT()
PRINT("PASSENGER RECORD IS SUCCESSFULLY
DELETED")
ELIF(CH==6):
NAME=STR(INPUT("ENTER NAME"))
MYCURSOR.EXECUTE("DELETE FROM RLSTAFF WHERE
NAME='"+NAME+"'")
MYDB.COMMIT()
PRINT("STAFF RECORD IS SUCCESSFULLY DELETED")
ELSE:
BREAK
PROJECT VIEW
User Manual
How to installSoftware:
Hardware Requirement-
 Intel Pentium/Celeron or similar processor based PC at
Client/Server end.
 128 MB RAM and 4GB HDD space (for Database) is
desirable.
 Standard I/O devices like Keyboard and Mouse etc.
 Printer is needed for hard-copy reports.
 Local Area Network(LAN) is required for Client-Server

Installation Software Requirement-


 Windows XP/2007 OS is desirable.
 Python must be installed and mysql connector must be
installed.
 MySQL Ver 6.1 with Library Database must be present at
machine.
REFERENCES

In order to work on this project titled –School


Managewment System, the following books and
literature are refered by me during the various phases
of development of the project.

(1) COMPUTER SCIENE


- RITU MAM

(2) http://www.mysql.org/
(3) Course Book for class XII
(4) Various websites of discussion forum and
software development activities.

Other than the above mentioned books, the


suggestion of my teacher and my class experience
also helped me to develop this software project.
CERTIFICATE
This is to certify that the project/
dissertation

entitled Railway Management System is a


Bonafide

work done by ANUJ SRIVASTAVA of class


XII,

Session 2024-25 in partial fulfilment of


CBSE’s

Examination 2025 and has been carried


out under my

direct supervision and guidance. This


report or a

similar report on the topic has not been


submitted for

any other examination and does not form


a part of any
other course undergone by the candidate.

TEACHER’S
SIGN

ACKNOWLEDGEMENT

I under this Project work, as the part of my


XII
Computer Science course. I had tried to
apply my
best of knowledge and experience, gained
during the
study and class work experience. It
requires a
systematic study, insight vision and
professional
approach during the design and
development. I
would like to extend my sincere thanks
and
gratitude to my teacher Mrs. Ritu mam.

You might also like