O'Reilly logo

MySQL for Python by Albert Lukaszewski, PhD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required