Chapter 4, Exception Handling, discusses ways to handle errors and warnings that are
passed from MySQL for Python and the differences between them. It also covers several
types of errors supported by MySQL for Python, and how to handle them effectively.
Chapter 5, Results Record-by-Record, shows situations in which record-by-record
retrieval is desirable, to use iteration to retrieve sets of records in smaller blocks and
how to create iterators and generators in Python. It also helps you in using
fetchone()
and fetchmany().
Chapter 6, Inserting Multiple Entries, discusses how iteration can help us execute several
individual INSERT statements rapidly, when to use or avoid executemany(), and
throttling how much data is inserted at a time.
Chapter 7, Creating and Dropping, shows to create and delete both databases and tables
in MySQL, to manage database instances with MySQL for Python, and to automate
database and table creation.
Chapter 8, Creating Users and Granting Access, focuses on creating and removing users
in MySQL, managing database privileges with MySQL for Python, automating user
creation and removal, to GRANT and REVOKE privileges, and the conditions under
which that can be done.
Chapter 9, Date and Time Values, discusses what data types MySQL supports for date
and time, when to use which data type and in what format and range, and frequently used
functions for handling matters of date and time.
Chapter 10, Aggregate Functions and Clauses, shows how MySQL saves us time and
effort by pre-processing data, how to perform several calculations using MySQL's
optimized algorithms, and to group and order returned data by column.
Chapter 11, SELECT Alternatives, discusses how to use HAVING clauses, how to create
temporary subtables, subqueries and joins in Python, and the various ways to join tables.
Chapter 12, String Functions, shows how MySQL allows us to combine strings and
return the single, resulting value, how to extract part of a string or the location of a part,
thus saving on processing, and how to convert cases of results.
Chapter 13, Showing MySQL Metadata, discusses the several pieces of metadata about a
given table that we can access, which system variables we can retrieve, and how to
retrieve user privileges and the grants used to give them.
Chapter 14, Disaster Recovery, focuses on when to implement one of several kinds of
database backup plans, what methods of backup and disaster recovery MySQL supports,
and how to use Python to back up databases