0% found this document useful (0 votes)
76 views42 pages

Infomatics Project Record - ASMA

This document is a project file submitted by Asma Obri of class XII at Integrated Indian School in Kuwait for their AISSC practical examination in Informatics Practices. The project involves developing a software for airline ticket reservation using Python and MySQL to reduce manual errors and make the reservation process more convenient for customers. The file includes sections on the theory of the project, steps to develop it, theories of Python and MySQL, programming details with screenshots and source code, and a bibliography.

Uploaded by

shubarnika k
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)
76 views42 pages

Infomatics Project Record - ASMA

This document is a project file submitted by Asma Obri of class XII at Integrated Indian School in Kuwait for their AISSC practical examination in Informatics Practices. The project involves developing a software for airline ticket reservation using Python and MySQL to reduce manual errors and make the reservation process more convenient for customers. The file includes sections on the theory of the project, steps to develop it, theories of Python and MySQL, programming details with screenshots and source code, and a bibliography.

Uploaded by

shubarnika k
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/ 42

INTEGRATED INDIAN SCHOOL, KUWAIT

INFORMATICS PRACTICES
PROJECT FILE
Submitted for the partial fulfillment of AISSC
practical examination
DONE BY: ASMA OBRI
BONAFIDE CERTIFICATE
Certified to be the bonafide work done by Asma Obri of class
XII in the Informatics Practices during the academic year 2020-
2021.

Mrs. Jinshy Ajish


P.G.T in Informatics Practices
Integrated Indian School, Kuwait

Submitted for all Indian Senior Secondary School


CERTIFIED PRACTICAL EXAMINATION
Held in the Informatics Practices Laboratory of IIS
Date:
External Examiner
Seal:
ACKNOWLEDGEMENT
It is with great pleasure that I find myself
penning down these words to express my sincere
thanks to all those people who helped me along
the way in completing this practical file.

The harmonious climate in our institution


provided proper academic setting. It was a
privilege to have been guided by Mrs. Jinshy
Ajish.

Special thanks to all my friends who helped me


during the development of this practical file.

Without the support extended by my parents this


project could not have attained its present form
and moreover I would like to thank the Lord for
this abundant grace upon me.
DECLARATION
This is to certify that this practical file is
the original work of Asma Obri of
Integrated Indian School under the
guidance of Mrs. Jinshy Ajish during the
academic year 2020-2021 in the
fulfillment of the requirement of CBSE

Done By: Asma Obri


Class: XII
INDEX PAGE
S.no Program Page Sign
Name No.
01. Theory of the project
02. Steps for developing the
program
03. Theory of Python
04. Features of Python
05. Theory of MySQL
06. Programming with
Snapshots and Source
Code
07. Bibliography
THEORY OF THE PROJECT
The main purpose of the software is to reduce the
manual errors involved in the airline ticket reservation
and make it convenient for the customers. This software
provides option for viewing different types of classes
available. But it does not allow the customer to modify a
particular part if he/she wants to.

This project helps to do many operations to the


operations to the database table in MySQL.
Library is simply a menu based project and has various
options like:
ADD (): Used to add a new record to the item table.
DELETE (): Used to deleted a record from the item
table.
DISPLAY (): Used to display all the record in the
item table.
UPDATE (): Used to update details of the item table.
STEPS FOR DEVELOPING THE PROJECT:
Create table in MySQL with a name “airline”.
Insert some records into the table.
Now open anaconda python and do the codings
according to the requirements.
Write the code for various button like add, delete,
update, insert, clear, search and exit.
Open anaconda powershell prompt and install pip.
Now you can see that MySQL is connected to
Python.
THEORY OF PYTHON
Python is an interpreted, high-level and general-
purpose programming language. Created by Guido van
Rossum and first released in 1991, Python's design
philosophy emphasizes code readability with its notable
use of significant whitespace. Its language
constructs and object-oriented approach aim to
help programmers write clear, logical code for small
and large-scale projects.[28]
Python is dynamically typed and garbage-collected. It
supports multiple programming paradigms,
including structured (particularly, procedural), object-
oriented, and functional programming. Python is often
described as a "batteries included" language due to its
comprehensive standard library.[29]
Python was created in the late 1980s as a successor to
the ABC language. Python 2.0, released in 2000,
introduced features like list comprehensions and a
garbage collection system with reference counting.
Python 3.0, released in 2008, was a major revision of
the language that is not completely backward-
compatible, and much Python 2 code does not run
unmodified on Python 3.
The Python 2 language was officially discontinued in
2020 (first planned for 2015), and "Python 2.7.18 is the
last Python 2.7 release and therefore the last Python 2
release."[30] No more security patches or other
improvements will be released for it.[31][32] With Python
2's end-of-life, only Python 3.6.x[33] and later are
supported.
Python interpreters are available for many operating
systems. A global community of programmers develops
and maintains CPython, a free and open-
source[34] reference implementation. A non-profit
organization, the Python Software Foundation, manages
and directs resources for Python and Python
development.
Features of Python
As a programming language, the features of Python
brought to the table are many. Some of the most
significant features of Python are:

o Easy to Code

Python is a very developer-friendly language which


means that anyone and everyone can learn to code it in
a couple of hours or days. As compared to other
object-oriented programming languages like Java, C,
C++, and C#, Python is one of the easiest to learn.

o Open Source and Free

Python is an open-source programming language which


means that anyone can create and contribute to its
development. Python has an online forum where
thousands of coders gather daily to improve this
language further. Along with this Python is free to
download and use in any operating system, be it
Windows, Mac or Linux.
o Support for GUI

GUI or Graphical User Interface is one of the key


aspects of any programming language because it has
the ability to add flair to code and make the results
more visual. Python has support for a wide array of
GUIs which can easily be imported to the interpreter,
thus making this one of the most favorite languages for
developers.

o Object-Oriented Approach

One of the key aspects of Python is its object-oriented


approach. This basically means that Python recognizes
the concept of class and object encapsulation thus
allowing programs to be efficient in the long run.

o High-Level Language

Python has been designed to be a high-level


programming language, which means that when you code
in Python you don’t need to be aware of the coding
structure, architecture as well as memory management.
o Integrated by Nature

Python is an integrated language by nature. This means


that the python interpreter executes codes one line at
a time. Unlike other object-oriented programming
languages, we don’t need to compile Python code thus
making the debugging process much easier and
efficient. Another advantage of this is, that upon
execution the Python code is immediately converted
into an intermediate form also known as byte-code
which makes it easier to execute and also saves
runtime in the long run.

o Highly Portable

Suppose you are running Python on Windows and you


need to shift the same to either a Mac or a Linux
system, then you can easily achieve the same in Python
without having to worry about changing the code. This
is not possible in other programming languages, thus
making Python one of the most portable languages
available in the industry.
o Highly Dynamic

As mentioned in an earlier paragraph, Python is one of


the most dynamic languages available in the industry
today. What this basically means is that the type of a
variable is decided at the run time and not in advance.
Due to the presence of this feature, we do not need to
specify the type of the variable during coding, thus
saving time and increasing efficiency.

o Extensive Array of Library

Out of the box, Python comes inbuilt with a large


number of libraries that can be imported at any
instance and be used in a specific program. The
presence of libraries also makes sure that you don’t
need to write all the code yourself and can import the
same from those that already exist in the libraries.

o Support for Other Languages

Being coded in C, Python by default supports the


execution of code written in other programming
languages such as Java, C, and C#, thus making it one
of the versatile in the industry.
Advantages of Python

1. Easy to Read, Learn and Write


Python is a high-level programming language that has
English-like syntax. This makes it easier to read and
understand the code.
Python is really easy to pick up and learn, that is why
a lot of people recommend Python to beginners.
You need less lines of code to perform the same task
as compared to other major languages like C/C++ and
Java.

2. Improved Productivity
Python is a very productive language. Due to the
simplicity of Python, developers can focus on solving
the problem.
They don’t need to spend too much time in
understanding the syntax or behaviour of the
programming language. You write less code and get
more things done.
3. Interpreted Language
Python is an interpreted language which means that
Python directly executes the code line by line. In case
of any error, it stops further execution and reports
back the error which has occurred.
Python shows only one error even if the program has
multiple errors. This makes debugging easier.

4. Dynamically Typed
Python doesn’t know the type of variable until we run
the code. It automatically assigns the data type during
execution. The programmer doesn’t need to worry
about declaring variables and their data types.

5. Free and Open-Source


Python comes under the OSI approved open-source
license. This makes it free to use and distribute. You
can download the source code, modify it and even
distribute your version of Python. This is useful for
organizations that want to modify some specific
behaviour and use their version for development.
6. Vast Libraries Support
The standard library of Python is huge, you can find
almost all the functions needed for your task. So, you
don’t have to depend on external libraries. But even if
you do, a Python package manager (pip) makes things
easier to import other great packages from the Python
package index (PyPi). It consists of over 200,000
packages.

7. Portability
In many languages like C/C++, you need to change your
code to run the program on different platforms. That
is not the same with Python. You only write once and
run it anywhere. However, you should be careful not to
include any system-dependent features.

Disadvantages of Python

1. Slow Speed
We discussed above that Python is an interpreted
language and dynamically-typed language. The line by
line execution of code often leads to slow execution.
The dynamic nature of Python is also responsible for
the slow speed of Python because it has to do the
extra work while executing code. So, Python is not used
for purposes where speed is an important aspect of the
project.

2. Not Memory Efficient


To provide simplicity to the developer, Python has to do
a little tradeoff. The Python programming language
uses a large amount of memory. This can be a
disadvantage while building applications when we prefer
memory optimization.

3. Weak in Mobile Computing


Python is generally used in server-side programming.
We don’t get to see Python on the client-side or mobile
applications because of the following reasons. Python
is not memory efficient and it has slow processing
power as compared to other languages.

4. Database Access
Programming in Python is easy and stress-free. But
when we are interacting with the database, it lacks
behind. The Python’s database access layer is primitive
and underdeveloped in comparison to the popular
technologies like JDBC and ODBC. Huge enterprises
need smooth interaction of complex legacy data and
Python is thus rarely used in enterprises.

5. Runtime Errors
As we know Python is a dynamically typed language so
the data type of a variable can change anytime. A
variable containing integer number may hold a string in
the future, which can lead to Runtime Errors.
Therefore Python programmers need to perform
thorough testing of the applications.
THEORY OF MYSQL
MySQL is an open-source relational database
management system (RDBMS). Its name is a
combination of "My", the name of co-founder Michael
Widenius's daughter, and "SQL", the abbreviation
for Structured Query Language.
MySQL is free and open-source software under the
terms of the GNU General Public License, and is also
available under a variety of proprietary licenses.
MySQL was owned and sponsored by
the Swedish company MySQL AB, which was bought
by Sun Microsystems (now Oracle Corporation). In
2010, when Oracle acquired Sun,
Widenius forked the open-source MySQL project to
create MariaDB.
MySQL is a component of the LAMP web
application software stack (and others), which is an
acronym for Linux, Apache, MySQL, Perl/PHP/Python.
MySQL is used by many database-driven web
applications, including Drupal, Joomla, phpBB,
and WordPress. MySQL is also used by many
popular websites,
including Facebook, Flickr, MediaWiki, Twitter,
and YouTube. MySQL is written in C and C++. Its SQL
parser is written in yacc, but it uses a home-
brewed lexical analyzer. MySQL works on many system
platforms, including AIX, BSDi, FreeBSD, HP-
UX, eComStation, i5/OS, IRIX, Linux, macOS,
Microsoft Windows, NetBSD, Novell
NetWare, OpenBSD, OpenSolaris, OS/2 Warp, QNX,
Oracle Solaris, Symbian, SunOS, SCO OpenServer,
SCO UnixWare, Sanos and Tru64. A port of MySQL
to OpenVMS also exists.
The MySQL server software itself and the client
libraries use dual-licensing distribution. They are
offered under GPL version 2, or a proprietary license.
Support can be obtained from the official manual. Free
support additionally is available in different IRC
channels and forums. Oracle offers paid support via its
MySQL Enterprise products. They differ in the scope
of services and in price. Additionally, a number of third
party organisations exist to provide support and
services, including MariaDB and Percona.
MySQL has received positive reviews, and reviewers
noticed it "performs extremely well in the average
case" and that the "developer interfaces are there,
and the documentation (not to mention feedback in the
real world via Web sites and the like) is very, very
good". It has also been tested to be a "fast, stable and
true multi-user, multi-threaded SQL database server".
Advantages of Using MySQL:
1. It’s Easy To Use

MySQL is very easy to install, and thanks to a bevy of


third-party tools that can be added to the database,
setting up an implementation is a relatively simple task.
In addition, it’s also an easy database to work with. So
long as you understand the language, you shouldn’t run
into too many problems.

2. Support Is Readily Available Whenever Necessary

Although Oracle’s history of supporting its customers


can be spotty at best, the nature of MySQL – which
got its start as an open-source platform – means that
there’s a large and thriving community of developers
and enthusiasts to which one can turn for help. This is
due in large part to the popularity of the solution, the
end result of which is no shortage of experts.

3. It’ s Open-Source (Sort Of)

Oracle’s purchase of Sun Microsystems (and by


association, MySQL) was met with some contention
from the development community. The general fear was
that Oracle would transform the tool into a closed,
proprietary ecosystem. Thankfully, though Oracle has
tightened its grip on MySQL somewhat, it can still be
considered an open-source database option, as the code
is still available for free online.

4. It’ s Inc redib l y Inexpens ive

Depending on what you plan to use it for, a MySQL


implementation could range in price from free to
$10,000 or more. Either way, it’s significantly less
expensive than most other database options on the
market (save for MySQL’s open-source competitors).

5. It’ s An In dus try St andard ( And Stil l


Extremel y Popular)

Although MySQL’s popularity has waned somewhat in


recent years, it remains one of the most-used database
systems in the world. It’s compatible with virtually
every operating system, and is more or less an industry
standard. This is, of course, in spite of all the folks
who say it’s on the way out.
Disadvantages Of Using MySQL
o It’ s Got A F ew Stab il ity Is s ues

According to Digital Ocean, MySQL tends to be


somewhat less reliable than its peers. These stability
issues are related to the manner in which it handles
certain functions (such as references, transactions,
and auditing). While the database is certainly still
usable in light of these problems, they do tend to make
MySQL a poor choice for certain use cases.

o It Suffers From Relatively Poor Performance


Scaling

Although MySQL is equipped to handle a virtually


limitless volume of data, it has a troubling tendency to
come grinding to a halt if it’s forced to deal with too
many operations at a given time. This relatively poor
performance scaling means that anyone with high
concurrency levels should probably look into an
alternative.
“In my experience,” writes software engineer Koushik
Ramachandra, “I have found that MySQL works better
when you have a low write/read ratio, and offers low
scalability as the read/write ratio grows.”

o Development Is Not Community Driven – and


Hence Has Lagged

Since Oracle has taken the helm of MySQL’s


development, progress appears to have ground to a
halt, with only one major release in the past several
years. The company doesn’t accept community-
developed patches, nor has it bothered to offer users
any sort of roadmap for MySQL development. There’s
really no way for developers to discuss the database
management system with Oracle – and that’s a problem.

o Its Functionality Tends To Be Heavily Dependent


On Addons
Although MySQL is relatively easy to set up, it tends
to have less out-of-the-box functionality than many
other database systems on the market. Certain
features – such as text search and ACID compliance –
are dependant not on the core engine but on
applications and add-ons. While it’s true that there
exists a plethora of well-made applications for MySQL,
tracking them down can sometimes be a pain, and might
cause some developers to simply choose an alternative
which – while not as easily installed – offers more
immediate functionality.

o Developers May Find Some Of Its Limitations To


Be Frustrating

Not surprisingly, MySQL isn’t designed to do


everything (nor should it be). The database isn’t fully
SQL-compliant, and tends to be limited in areas
including data warehousing, fault tolerance, and
performance diagnostics (among others). Developers
may find this relative dearth of functionality
frustrating, particularly if they’re used to a more full-
featured alternative.
FEATURES OF MYSQL:
o Relational Database Management System
(RDBMS): MySQL is a relational database
management system.
o Easy to use: MySQL is easy to use. You have to
get only the basic knowledge of SQL. You can build
and interact with MySQL with only a few simple
SQL statements.
o It is secure: MySQL consist of a solid data
security layer that protects sensitive data from
intruders. Passwords are encrypted in MySQL.
o Client/ Server Architecture: MySQL follows a
client /server architecture. There is a database
server (MySQL) and arbitrarily many clients
(application programs), which communicate with the
server; that is, they query data, save changes, etc.
o Free to download: MySQL is free to use and you
can download it from MySQL official website.
o It is scalable: MySQL can handle almost any
amount of data, up to as much as 50 million rows or
more. The default file size limit is about 4 GB.
However, you can increase this number to a
theoretical limit of 8 TB of data.
o Compatible on many operating systems: MySQL is
compatible to run on many operating systems, like
Novell NetWare, Windows* Linux*, many varieties
of UNIX* (such as Sun* Solaris*, AIX, and DEC*
UNIX), OS/2, FreeBSD*, and others. MySQL also
provides a facility that the clients can run on the
same computer as the server or on another
computer (communication via a local network or the
Internet).
o Allows roll-back: MySQL allows transactions to be
rolled back, commit and crash recovery.
o High Performance: MySQL is faster, more reliable
and cheaper because of its unique storage engine
architecture.
o High Flexibility: MySQL supports a large number
of embedded applications which makes MySQL
very flexible.
o High Productivity: MySQL uses Triggers, Stored
procedures and views which allows the developer to
give a higher productivity.
Connecting MySQL with Python.

Showing the databases that are available.


Using the database “ Airline” .

Showing tables that are created in ‘ Airline’.


Select the classtype table from airline.

Select food from airline.


Select luggage from airline.

Select the pdata that shows the entries typed in


python.
Python codings
s=4000*n
elif (x==3):
print ("you have opted Economy class")
s=2000*n
else :
print ("please choose a class type")
print ("your room rent is =",s,"\n")
def menuview ():
print ("Do you want to see menu available Enter 1 for yes :")
ch=int (input ("enter your choice :"))
if ch==l :
sql="select * from food"
mycurso r .execute(sql)
rows=mycursor .fetchall ()
for x in rows:
print (x)

def orderitem ():


global s
print ("Do you want to see menu available Enter 1 for yes :")
ch=int (input ("enter your choice :"))
if ch==l :
sql="select ·t from food"
mycursor .execute (sql)
rows=mycursor .fetchall ()
for x in rows :
print (x)

print ("do you want to purchase from above list :enter your choice :")
d=int (input ("enter your choice :"))
if (d==l) :
print ("you have ordered tea")
a=int (input ("enter quantity "))
s=lO·*a
print ("your amount for tea is :",s,"\n")
elif (d==2) :
print ("you have ordered coffee")
a=int (input ("enter quantity "))
s=lO*a
print ("your amount for coffee is :",s,"\n")
elif (d==3):
print ("you have ordered colddrink ")
a=int (input ("enter quantity ")J
s=20*a
print ("your amount for colddrink is :",s,"\n")
elif (d==4 ):
print ("you have ordered sandwich ")
a=int (input ("enter quantity"))
s=SO*a
print("your amount fop!' sandv;ich is :",s,"\n")
e:.:f (d==S):
print ("you have ordered noodles")
a=int(input ("enter quantity"))
s=SO*a
print("your amount for noodles is :",s,"\n")
e:se :
Print("please enter your choice from the menu")
def luggagebill ():
g2.oba:. z
print ("Do you want to see rate for luggage Enter 1 for yes :")
ch=int (input ("enter your choice :"))
2.f ch==l :
sql="select * from uggage"
mycursor.execute(sql)
rows=mycursor. fetchall ()
f0r x .:n rows :
print (x)
y=int (input("Enter Your weight of extra luggage->"))
z=y*lOOO
print (''your luggage bill :",z,''\n")

def Menuset ():


print ("enter 1: To enter customer data ")
print ("enter 2 'C'o view class")
print ("enter 3 fo!' t.:.cketamount ")
print ("enter 4 for viewing food menu")
print ("enter 5 fo!' food bill ")
print ("enter 6 for :.uggage bill ")
print ("enter 7 fo!' exit:")
'''try:
Ji!userinput=int(input( "pleaseselect an above option :"))
except ValueError:
exit ("\n hi thats not a number ")• ••

userinput=int (input("enter your choice"))


if (userinput==l):
registercust ()
e:i= (userinput==2):
classtypeview ()
e:.:.f (userinput==3):
ticketprice ()
e2.if (userinput==4):
menuview()
e:.:.f (userinput==S):
After the coding are written, it has to be saved.
Python program running.
BIBILOGRAPHY
www.wikipedia.orpythontheory.about.com
www.wikipedia.ormysql.sect.com
Freebiesupply.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy