In Python-MySQL connectivity, what is the primary purpose of a Cursor object?

2026

In Python-MySQL connectivity, what is the primary purpose of a Cursor object?

  1. A.

    To store the password for the database connection.

  2. B.

    To visually point to the data in the MySQL Workbench.

  3. C.

    To execute SQL queries and fetch results from the database.

  4. D.

    To act as a backup of the entire database.

Attempted by 127 students.

Show answer & explanation

Correct answer: C

In Python-MySQL connectivity, a Cursor object is primarily used to execute SQL statements and retrieve results from the database. It acts as an interface between Python code and the MySQL server, allowing for query execution and data fetching.

Explore the full course: Rssb Senior Computer Instructor