# Using `Python` to execute `SQL`
+ Create a cursor **`(Class: MySQLCursor)`** object
  + Calling **`cursor()`** function on **`MySQLConnection`** objects
+ Execute `SQL` statements using the **`execute(sql)`** Method of **`cursor`**
  + If `SQL` modifies the data:
    + Number of rows affected by the **`rowcount`** attribute store of the cursor
    + You must explicitly commit changes by using
      + **`MySQLConnection.commit()`**
  + If `SQL` does not modify the data:
    + **`execute()`** return a result set. Use **`cursor`** to read the rows in the result set as a sequence and traverse the sequence to access the rows:
      + **`fetchone()`**: Return next row as `Python` sequence, run out of rows when returns **`None`**
      + **`fetchall()/fetchmany([size=n])`** return all or more rows as a list of tuples
-------------------------------------------------------------------------------
The Python Database API Specification mandates that database connections should not enable autocommit mode by default. Use the MySQLConnection object's commit() method to commit the changes to the database.

The cursor object’s fetchall() method fetches all rows from the result set as a list of tuples. The fetchmany() method accepts an optional size argument that represents the number of rows to fetch from the result set. This might help prevent your application becoming overloaded if the result set is very large. If you do not pass a parameter to fetchmany(), it fetches only a single row by default. If no more rows are available, fetchall() or fetchmany() return an empty list.

