Project: A movie database

The project for this chapter involves querying the Sakila database from MySQL.

Note

Sakila is a database of fictitious movies and films.

For this project, we will write a program with the following features:

  • Accepts user input for the name of either a film or an actor
  • Returns the first record for confirmation by the user
  • If the first set of data is confirmed as being what the user wants, the entire set is returned
  • All errors are fatal and result in error messages being passed to the user
  • All warnings are explicitly silenced

Getting Sakila

The Sakila sample database represents the possible tables for a DVD rental store. It is available for download from the MySQL website:

http://downloads.mysql.com/docs/sakila-db.zip

Once you have ...

Get MySQL for Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.