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

CH 10 Interface Python With MySQL CPA

The document outlines key concepts related to Python's interface with MySQL, including the importance of database connectivity for application development. It defines a connection as a unique session with the database and describes the result set as records fetched from executing SQL queries. Additionally, it mentions the mysql.connector package for creating database connectivity applications and details functions for establishing connections and executing queries.

Uploaded by

01kumatyt
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)
3 views1 page

CH 10 Interface Python With MySQL CPA

The document outlines key concepts related to Python's interface with MySQL, including the importance of database connectivity for application development. It defines a connection as a unique session with the database and describes the result set as records fetched from executing SQL queries. Additionally, it mentions the mysql.connector package for creating database connectivity applications and details functions for establishing connections and executing queries.

Uploaded by

01kumatyt
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

CHECK POINT ANSWERS

CH – 10 INTERFACE PYTHON WITH MYSQL


1. How is database connectivity useful?
Database connectivity is used to manipulate the data that is stored in a database when developing
applications.
2. What is a connection?
A database connection also referred to as connection object controls the connection to the database. It
represents a unique session with a database connected from within a program.
3. What is a result set?
The result set refers to a logical set of records that are fetched from the database by executing an SQL
query and made available to the application program.
4. What is the package used for creating a Python database connectivity application?
There are many packages available through which database connectivity applications can be created in
python. One such package is mysql.connector.
5. Which function/ method do you use for establishing connection to database?
The connection to a MySQL database can be established through the connect() function of
mysql.connector package.
6. Which function/ method do you use for executing an SQL query?
The execute() function is used for executing an SQL query.
7. Which method do you use to fetch records from the resultset?
To fetch records from a result set, you can use fetchone(), fetchmany() and fetchall() methods.

You might also like