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 downloaded the file, unpack it into a temporary directory. Then you are ready to create the database.
Creating the Sakila database
To create the Sakila
database, one follows similar steps to what we did for the world
database. Where the world
database...