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

VJ Project

The document is an acknowledgment and overview of a project on Python and SQL, detailing their advantages, limitations, and applications. Python is highlighted as a versatile, open-source programming language, while SQL is presented as a standard language for managing relational databases. The document also includes hardware and software requirements for running Python and SQL, along with a structured table of contents.

Uploaded by

svr04841
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)
4 views30 pages

VJ Project

The document is an acknowledgment and overview of a project on Python and SQL, detailing their advantages, limitations, and applications. Python is highlighted as a versatile, open-source programming language, while SQL is presented as a standard language for managing relational databases. The document also includes hardware and software requirements for running Python and SQL, along with a structured table of contents.

Uploaded by

svr04841
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

Acknowledgement:

This project has been possible due to the kind guidance of my principal sir
and vice principal mam. I would like to thank my parents and my brother
for helping at my times of need during the making of this project and
helping me get factual information on the topic. I would also love to thank
my caring and righteous teachers and my computer teacher, Mrs.Sudha T
mam for helping me clarify my repetitive doubts and showing me a proper
path down the making of this project. Last but not least , I am very much
grateful to all my teachers and my friends and I would like to thank them
for encouraging me and motivating me to do the project with my full
interest.
Thank you everyone!

1
S.No Topic Page No.

1 Overview of python 3
2 Overview of SQL 4
3 Advantages of python 5
4 Limitations of python 7
5 Applications of python 12
6 Hardware requirements 13
7 Advantages Of SQL 14
8 Limitations of SQL 17

2
9 Modules 20
10 Program code 22
11 Screenshots 27
12 Bibliography 30

Overview of the programming language

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.

3
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. Python has a large community of developers who are
actively using python for software development.

Python is also being used in the fields of machine learning, neural


networks, and much more! Python is an open-source software, and it gets
frequently updated which makes it bug-free and largely compatible with
different types of devices and platforms.

Python is a wonderful language and you can too start to learn!

SQL

SQL is Structured Query Language, which is a computer language for


storing, manipulating and retrieving data stored in a relational database.

SQL is the standard language for Relational Database System. All the
Relational Database Management Systems (RDMS) like MySQL, MS
Access, Oracle, Sybase, Informix, Postgres and SQL Server use SQL as
their standard database language.

SQL is perfect for managing databases, manipulating them and even can
be connected to Python via certain modules like mysqlconnector. SQL

4
databases can be accessed via python and this is implemented in my
project too.

SQL along with python is a perfect blend of processing brains and


storaging mind. SQL along with python connectivity is perfect for
blending the processing nature of python along with the easy to use nature
of SQL.

SQL is perfect for first time data structure users and also has a good
number of modules for connectivity with python.

Advantages of Python Programming language

The application of python is a result of the combination of features that


give this language an edge over others.Some of the benefits of
programming in python include

1. Presence of third party modules:

The Python Package Index (PyPI) contains numerous third-party modules


that make python capable of interacting with most of the other languages
and platforms.

2. Extensive network of libraries:

Python provides it’s users with large library which includes areas like
machine learning, internet protocols, neural network, web services,

5
operating system interfaces. Many of the programming tasks have already
been scripted into the library and can be used in just a couple of lines. This
increases the workflow and also allows us the concentrate on the project
more efficiently.

3. Open source and community development:

Python is an open-source language means anyone can look into its source
code and make changes to it. This means many people are working with
python and also for python making the language almost bug-less.

4. Learning ease and support available:

Python is an excellent language which offers readability and also


uncluttered simple syntax. This makes it an perfect language for the
beginners and also it is a high level language meaning it can be used in a
variety of scenarios .

5. User-friendly data structure:

Python has built in data-structures like list, dictionary, tuple etc. and also
the modules to access, modify and use them to their fullest. Python also
provide the option of dynamic high level data typing which reduces the
length of the support code that is needed.

6. Productivity and speed:

Python is an object-oriented language , provides enhanced process and


control capabilities and possesses strong integration and text processing
capabilities and its own unit testing framework, all of which contribute to
the increase in its speed and productivity. Python is considered a viable

6
option for building complex multi-protocol network applications. Python
also has a robust standard library, which enables web programmers to
Accomplish common programming tasks like web service implementation,
String operation, etc. without writing additional code. They can use
specific frameworks to use Python for developing web applications,
desktop GUI applications, and scientific and numeric application and
cross-platform mobile apps. But Python, like other programming
languages, has several shortcomings. It’s essential for programmers to
know some of the major limitations of the Python programming language.

Limitations of python programming language:

1) Performance and Speed Many studies have proved that Python is slower
than other modern programming languages like Java and C++. So the
developers have to frequently explore ways to enhance the Python
application’s speed. However, they have a number of options to make the
applications written in Python run faster. For instance, the developers can
create a custom runtime, and use it instead of the default runtime of the
programming language. Likewise, they can rewrite the existing Python
code to take advantage of the existing execution speed.

2) Incompatibility of Two Versions Beginners often find it pick and learn


the right version of Python. Officially, Python 2.x is described as legacy,
whereas Python 3.x is described as current and futuristic. But both

7
versions of the programming language have been updated on a regular
basis. Also, a large percentage of programmers still prefer Python 2 to
Python 3. There are also a number of popular frameworks and libraries
that support only Python 2.

3) Application Portability Python is a high-level programming language.


So developers use interpreters to convert Python code into code
understandable by the operating system. They need to install specific
version of Python interpreter on the operating system to run the Python
application on that platform. The shortcoming does not allow
programmers to use Python for developing cross-platform applications.
Also, they could not port the application from one platform to another
smoothly.

4) Requires Additional Testing Python is a dynamically typed


programming language. It does not require programmers to define the type
of a variable while declaring it. The feature makes it easier for
programmers to write code freely. But a number of critical bugs or defects
emerge at the time of compilation as the variable types are not defined
explicitly. So the developers must perform a number of tests additionally
to identify and fix the bugs during runtime.

5) Lacks Web Development Capabilities Many programmers prefer using


Python as a scripting language to build web applications rapidly. But

8
Python does not come with built-in web development capabilities. Also,
the standard implementation of Python does not boost the web
applications’ performance across multiple browsers. That is why, the
Python developers have to use a number of Python web frameworks
additionally to effectuate web application development. However, they
have option to choose from several full-stack web frameworks for Python
including Django, TurboGear, web2py, Reahland and Zope2.

6) Weak in Mobile Computing The steady decline in mobile web usage has
made it essential for modern businesses to launch mobile apps. Often
developers have to write mobile apps in a particular programming
language according to the targeted mobile platform. For instance, they
need to write iOS app in either Objective-C or Swift. Likewise, mobile
apps for Android need to be written in Java. But the developers cannot use
Python directly for developing mobile apps by targeting any popular
mobile platforms. They have to use frameworks like Kivy to build
cross-platform mobile apps using Python.

7) Depends on Third-Party Frameworks and Libraries Python lacks a


number of features provided by other modern programming languages. So
the programmers have to use a number of third-party frameworks and tools
to build web applications and mobile apps in Python. However, they need
to use open source frameworks and libraries to avoid increasing project
overheads. The cost factor restricts the developers from availing the

9
advanced features and functionality provided by commercial frameworks.
8) No Option to Embed Block Comments Nowadays, developers are
required to make the application code readable and maintainable. While
writing code, programmers frequently deactivate a specific section or
block of code by using block comments. Unlike other modern
programming languages, Python does not support block comments. Hence,
the programmers have to assess the quality of the code either by writing
comments for each line of code or removing a specific section of code at
the time of execution. The lack of block comments support requires
programmers to put additional effort. 9) Many Python Modules Lack
Adequate Support Python is supported by a large and active community.
The members of the Python community regularly share new packages or
modules to make it easier for programmers to add functionality to the
application. But developers often complain that the quality of individual
Python modules or packages differs. Some of these packages lack
adequate support, and are not updated regularly. Hence, the programmers
have to do some initial research to pick the right packages or modules.

10) Does not Provide Prebuilt Statistical Models and Tests Many
developers prefer using Python for developing custom statistical and big
data applications. But developers need to use additional statistical and data
analysis packages to write statistical applications more efficiently. Also,
they have to use specific libraries like Pygal, Seaborn and Bokeh to
accomplish data visualization. They cannot make the Python application
present and analyze huge volumes of data without using these libraries and

10
tools. On the whole, the developers can use Python to build a variety of
software applications rapidly. But they have to use a number of third-party
libraries and frameworks additionally to overcome the limitations of this
high-level programming language. At the same time, they also need to
explore ways to enhance the performance and speed of the Python
applications consistently. Python Syntax compared to other programming
languages

● Python was designed for readability and has some similarities to the
English language with influence from mathematics.

● Python uses new lines to complete a command, as opposed to other


programming languages which often use semicolons or parentheses.

● Python relies on indentation, using whitespace, to define scope; such as


the scope of loops, functions, and classes. Other programming languages
often use curly brackets for this purpose. time and effort to assess the
quality of Python code

11
Applications of python programming language:
● GUI based desktop application development
● Operation system
● Web services
● Language development
● Prototyping

12
Hardware and the software requiremnts
Hardware requirements:
● PENTIUM processor
● 2 GB of RAM
● 1 GB HD
● Mouse
● Keyboard
● VGA/HDMI Software requirements:
● Windows 7
● Python IDLE

13
Advantages of utilizing SQL:

1. Faster and Efficient Query Processing

● SQL works with an efficient speed. This high speed can boost the
amount of data retrieval. It can give users a rapid and effective
means to obtain, alter, or store data.
● SQL can quickly and efficiently retrieve a large volume of data
records from a database. Compared to an unstructured database such
as MongoDB, it is a relational database that can characterize the data
in a structured way. Operations like insertion, deletion, querying,
manipulation, and calculations on data via analytical queries in a
relational database can be accomplished in a matter of seconds.

2. No Need for Coding Skills

● There is no need for large and complex code lines for data
extraction. One reason for using SQL is that it does not require
extensive coding and program writing knowledge. It is easy to
maintain database systems without having to write a good amount of

14
code. There is no need for large complex lines of code for data
extraction.
● SQL is mostly made up of English statements, making it simple to
learn and write SQL queries. All primary keywords, like SELECT,
INSERT INTO, DELETE, UPDATE, etc., can be used to carry out
operations. Also, the syntactical rules are simple and easy to
understand, making it a user-friendly language.

3. Portable

● Portability is an extremely desirable feature in any program that


stores data in a database. A software developer would like to use a
small in-memory database, such as Apache Derby, while creating an
application.
● SQL is highly portable because it is employed in programs on PCs,
servers, tablets, and independent laptops running operating systems
such as Windows, Linux, Mac, and even some mobile phones. It can
also be embedded with other programs based on the requirements.
● It can be used on local systems (internet and the intranet). SQL
databases can be easily transferred from one device to another.

4. Standardized Language

● SQL is a relational database query language that has been accepted by


ISO and ANSI. It gives all users a consistent platform worldwide due to
proper documentation and years of establishment.

15
● 1987, ANSI (American National Standards Institute) and ISO
(International Standards Organization) standardized the language. The
most recent standard part was produced in 2011

5. Interactive Language

● SQL is a domain language that is simple to learn and easy to


understand. It can also be used to interface with databases and
receive responses to complicated queries in seconds.
● It becomes an interactive language for its users because it offers easy
commands for all purposes. SQL commands are also understandable
to non-programmers.
● SQL is used to build and administer large databases, including data
sharing, updating, and retrieval from numerous tables. This is the
primary reason organizations employ SQL in various applications
such as web development, data analysis, IT support, etc.

6. Multiple Data Views

● The SQL language gives each user a unique view of the data. A view
is a SQL statement that includes specified SQL queries that are
stored in the database. It can be built from one or more tables based
on the queries written or the aim that the view satisfies.
● SQL can provide distinct views of the database's structure and
content to different users.

7. Internet Usage

16
● Three-tier Internet architectures are compatible with SQL
architecture. Client, application server, and database components
make up the architecture.

8. Large User Community

● The SQL programming language is nearly 50 years old and is


incredibly mature and still extensively used. It boasts a vibrant
network of specialists eager to provide advice and well-established
best practices.
● There are several opportunities to improve one's skills and
collaborate. Consultants and SQL suppliers can provide extra
assistance if needed. Your developers will be able to find the
answers they require using SQL.

Disadvantages of SQL
Along with its advantages, the SQL (Structured Query Language) has
several disadvantages :

1. Resource-Intensive Scaling

● SQL databases typically scale up vertically by increasing hardware


investment. This is both costly and time-consuming. An organization
may seek to scale a SQL database horizontally using partitioning in
particular instances.
● This extra complexity increases the time and resources required. The
effort will certainly require coding for dealing with a large database,

17
which will require highly talented and well-paid developers. Scaling
your SQL database as data volume grows is like playing a
never-ending game of tag, where the optimum setup is always just
out of reach.

2. Partial Control

● SQL does not provide programmers complete control over


databases. This is primarily due to hidden corporate rules.

3. Rigidity

● The schema of a SQL database must be specified before it can be


used. They are rigid once installed, and changes are often complex
and time-consuming. As a result, significant work must be invested
in upfront preparation before the database is ever put into
production.
● They are only useful when all your data is structured, and you don't
expect a considerable volume or data type change.

4. Normalization of Data

● Relational databases, which were created at a time when data storage


was expensive, try to eliminate data duplication. Each table has
unique data that may be linked and queried using common values.
However, as SQL databases grow in size, the lookups and joins
necessary between multiple tables can cause performance issues,
ultimately slowing down things.

18
5. Hardware Updation

● The pattern for SQL databases is to scale up the data vertically,


where capacity can only be enhanced by adding capabilities, such as
RAM, CPU, and SSD, on the existing server or by relocating to a
larger, more expensive one. As your data expands, you'll need more
hard drive space and quicker equipment to operate developing and
more advanced technologies. Your database vendor will most likely
require you to upgrade your hardware regularly in order to run their
most recent releases.
● Hardware can easily become outdated in this context. Each update
will undoubtedly be costly and resource-consuming. SQL's hardware
requirements include continuing, day-to-day maintenance and
operational costs.

19
Modules

1. Menu
This displays the options and features provided in the project

2. Converting Nomenclature to formulae


This option provides for converting Nomenclature to chemical
formulae based on the info available in the sql database named
Elements and under the tables element and ligands.
3. Converting Formulae to nomenclature
This option provides for the conversion from Chemical
Formulae of a coordinate compound to Nomeclature
Based on the IUPAC naming system and info from the
sql database.
4. Finding hybridisation
This option helps to find the hybridisation of the
Coordination compound based on the given chemical formula
of the compound.
5. Finding the oxidation state

20
The oxidation state of the ligands and the central metal ion can
be found through this option.

6. View the electron arrangement


The electron arrangement of the central metal ion can be
visualised using this option and the visualisation is a simple
one.

7. Option to change the elements and ligands in the


database:
This option allows one to add or delete or change the elements
or ligands in the sql database.
8. Exit

21
Program code:
import mysql.connector as sql
user_id=input('Enter MYSQL USER NAME : ')
password=input('Enter MYSQL PASSWORD : ')
conn = sql.connect(host="localhost", user=user_id, password=password)
cur = conn.cursor()
cur.execute('create database if not exists cur_data')
cur.execute('use cur_data')
cur.execute("create table if not exists cur_rates(cur_name varchar(10),
cur_rate decimal(10,4))")
currency_rate
={"USD":1,"AED":3.67,"AFN":99.65,"ALL":107.53,"AMD":482.85,"AN
G":1.79,"AOA":525.64,"ARS":105.26,"AUD":1.4,
"AWG":1.79,"AZN":1.7,"BAM":1.72,"BBD":2,"BDT":86.04,"BGN":1.72
,"BHD":0.376,"BIF":1997.95,"BMD":1,"BND":1.35,"BOB":6.88,"BRL":
5.29,
"BSD":1,"BTN":74.75,"BWP":11.59,"BYN":2.6,"BZD":2,"CAD":1.27,"C
DF":1996.61,"CHF":0.921,"CLP":809.28,
"CNY":6.35,"COP":3902.81,"CRC":643.51,"CUP":24,"CVE":96.98,"CZ
K":21.37,"DJF":177.72,"DKK":6.56,"DOP":57.7,
"DZD":140.59,"EGP":15.71,"ERN":15,"ETB":50.21,"EUR":0.88,"FJD":2.
14,"FKP":0.736,"FOK":6.56,"GBP":0.736,
"GEL":3.02,"GGP":0.736,"GHS":6.79,"GIP":0.736,"GMD":53.41,"GNF":
9024.69,"GTQ":7.69,"GYD":209.88,"HKD":7.79,"HNL":24.65,"HRK":6.
63,
"HTG":101.66,"HUF":312.54,"IDR":14304.96,"ILS":3.2,"IMP":0.736,"IN
R":74.75,"IQD":1464.35,"IRR":41979.23,
"ISK":126.28,"JEP":0.736,"JMD":156.53,"JOD":0.709,"JPY":114.85,"KE
S":113.56,"KGS":84.84,"KHR":4079.78,"KID":1.4,

22
"KMF":432.68,"KRW":1202.89,"KWD":0.3,"KYD":0.833,"KZT":434.56,
"LAK":11344.5,"LBP":1507.5,"LKR":202.21,"LRD":153.03,"LSL":15.29
,
"LYD":4.62,"MAD":9.25,"MDL":18.06,"MGA":3225.63,"MKD":54.62,"
MMK":1779.21,"MNT":2873.53,"MOP":8.03,"MRU":36.42,"MUR":43.6
7,
"MVR":15.42,"MWK":820.24,"MXN":20.59,"MYR":4.18,"MZN":63.63,"
NAD":15.29,"NGN":415.79,"NIO":35.51,"NOK":8.76,"NPR":119.6,
"NZD":1.5,"OMR":0.384,"PAB":1,"PEN":3.86,"PGK":3.51,"PHP":51.06,
"PKR":176.15,"PLN":4,"PYG":7135.08,
"QAR":3.64,"RON":4.36,"RSD":103.62,"RUB":76.45,"RWF":1046.81,"S
AR":3.75,"SBD":7.98,"SCR":13.07,"SDG":442.44,
"SEK":9.14,"SGD":1.35,"SHP":0.736,"SLL":11453.43,"SOS":580.32,"SR
D":21.16,"SSP":434.95,"STN":21.55,"SYP":2524.77,
"SZL":15.29,"THB":33.16,"TJS":11.27,"TMT":3.5,"TND":2.82,"TOP":2.
28,"TRY":13.55,"TTD":6.76,"TVD":1.4,"TWD":27.8,"TZS":2308.23,
"UAH":28.26,"UGX":3501.16,"UYU":43.91,"UZS":10745.45,"VES":4.52
,"VND":22669.08,
"VUV":113.89,"WST":2.61,"XAF":576.91,"XCD":2.7,"XDR":0.715,"XO
F":576.91,"XPF":104.95,"YER":250.36,"ZAR":15.29,"ZMW"
:18.3,"ZWL":116.37}

for i in currency_rate:
cur.execute("insert into cur_rates values('{}', {})".format(i,
float(currency_rate[i])))
conn.commit()

while True:
print('''
1) view the the currency exchange rate
2) convert currency
3) tax to be paid for the exchange in india
4) modify database
5) EXIT''')
to_currency_product = 0

23
decision = input("enter your choice : ")

def cur_data_retriver(conn):
cur.execute("select * from cur_rates")
currency_rate1 = cur.fetchall()
return currency_rate1

if decision == "1":
currency_rate1 = cur_data_retriver(conn)
print("conversion rates with dollar as the primary currency")
for x in currency_rate1:
print(x[0], " : ", x[1])
elif decision == "2":
from_currency = input("Enter the amount and name of currency to be
converted(eg: 100 USD): ")
to_currency = input("Enter the currency to which it should be
converted (eg:INR) : ")
split_currency = from_currency.split()
print(split_currency)
currency_rate1 = dict(currency_rate)
# 100 INR to AED
# impor_currency = split_currency[1]
intermediate = int(split_currency[0]) /
float(currency_rate1[split_currency[1]])
to_currency_product = intermediate *
int(currency_rate1[to_currency])
print(from_currency, "is equal to ", to_currency_product,
to_currency)
elif decision == '3':
currency_rate1 = dict(currency_rate)
from_currency = input("Enter the amount and name of currency to be
converted(eg: 100USD): ")
split_currency = from_currency.split()
# 100 INR to AED
# impor_currency = split_currency[1]

24
intermediate = float(split_currency[0]) /
float(currency_rate1[split_currency[1]])
to_currency_product = intermediate * float(currency_rate1["INR"])
if to_currency_product <= 100000:
print(((to_currency_product)/100))
elif to_currency_product > 100000:
if to_currency_product <= 1000000:
print(1000 + (0.5*(to_currency_product)/100))
elif to_currency_product > 1000000:
print(5500 + 0.1*(to_currency_product)/100)
elif decision == '5':
break

elif decision == '4':


print("1. to modify exisiting values"
"2. to add new values")
choice = input("enter you option:")
if choice == '1':
name = input("enter the name of the currency:")
rate = input("enter the rate:")
cur.execute('use cur_data')
cur.execute("update cur_rates set cur_rate = {} where cur_name =
{}".format(rate, name))
conn.commit()

elif choice == '2':


name = input("enter the name of the currency:")
rate = input("enter the rate:")
cur.execute('use cur_data')
cur.execute("insert into cur_rates values({}, {})".format(name,
rate))
conn.commit()
elif decision == '0':
cur.execute('create database if not exists cur_data')
cur.execute('use cur_data')

25
cur.execute("create table if not exists cur_rates(cur_name
varchar(10), cur_rate decimal(10,4))")
for i in currency_rate:
cur.execute("create database if not exists cur_data")
cur.execute("use cur_data")
cur.execute("create table cur_rates(cur_name varchar(5), cur_rate
decimal")
cur.execute("insert into cur_rates values('{}', {})".format(i,
float(currency_rate[i])))
conn.commit()
else:
print("enter an valid input!!")

26
Screenshots:

27
28
29
Bibliography:
1. Sumita arora class 12 computer science textbook

30

You might also like