0% found this document useful (0 votes)
6 views1 page

Python Database Programming 02

Databases support query language for easy operations and require authentication for data security, storing data in tables with normalization techniques to prevent duplication. However, they have limitations in handling large amounts of data and only support structured data. Python can be used to interact with databases through specific modules for various database systems, following standard steps for connection and execution of SQL commands.

Uploaded by

vishnu200121
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)
6 views1 page

Python Database Programming 02

Databases support query language for easy operations and require authentication for data security, storing data in tables with normalization techniques to prevent duplication. However, they have limitations in handling large amounts of data and only support structured data. Python can be used to interact with databases through specific modules for various database systems, following standard steps for connection and execution of SQL commands.

Uploaded by

vishnu200121
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/ 1

2) Query Language Support is available for every Database and hence we can perform Database

Operations very easily.


3) To access Data present in the Database, compulsory username and pwd must be required.
Hence Data is secured.
4) Inside Database Data will be stored in the form of Tables. While developing Database Table
Schemas, Database Admin follow various Normalization Techniques and can implement various
Constraints like Unique Key Constrains, Primary Key Constraints etc which prevent Data
Duplication. Hence there is no chance of Data Inconsistency Problems.

Limitations of Databases:
1) Database cannot hold very Huge Amount of Information like Terabytes of Data.

2) Database can provide support only for Structured Data (Tabular Data OR Relational Data) and
cannot provide support for Semi Structured Data (like XML Files) and Unstructured Data (like
Video Files, Audio Files, Images etc)

To overcome these Problems we should go for more Advanced Storage Areas like Big Data
Technologies, Data warehouses etc.

Python Database Programming:


Sometimes as the part of Programming requirement we have to connect to the database and we
have to perform several operations like creating tables, inserting data,updating data,deleting
data,selecting data etc.

We can use SQL Language to talk to the database and we can use Python to send those SQL
commands to the database.

Python provides inbuilt support for several databases like Oracle, MySql, SqlServer, GadFly, sqlite,
etc.
Python has seperate module for each database.
Eg: cx_Oralce module for communicating with Oracle database
pymssql module for communicating with Microsoft Sql Server

Standard Steps for Python database Programming:


1. Import database specific module
Eg: import cx_Oracle

2. Establish Connection between Python Program and database.


We can create this Connection object by using connect() function of the module.
con = cx_Oracle.connect(datbase information)

Eg: con=cx_Oracle.connect('scott/tiger@localhost')

3. To execute our sql queries and to hold results some special object is required, which is nothing
but Cursor object. We can create Cursor object by using cursor() method.
nd
DURGASOFT, # 202, 2 Floor, HUDA Maitrivanam, Ameerpet, Hyderabad - 500038,
2  040 – 64 51 27 86, 80 96 96 96 96, 92 46 21 21 43 | www.durgasoft.com

You might also like