In the whole MySQL tutorial, we use the Sakila sample database as a demo database to learn MySQL more quickly and effectively. The Sakila sample database is one of the most widely used sample databases. The Sakila database models the DVD rental store business, which contains content such as films, actors, inventory, stores, customers and staffs.
Install the Sakila sample database
Sakila sample database architecture
There are 16 tables, 7 views, 3 stored procedures, 3 stored functions and 6 triggers in The Sakila database.
Tables in the Sakila database:
actortable lists information for all the actors, includes first name and last name of actors.
addresstable contains address information for customers, staff, and stores.
categorytable lists the categories that can be assigned to films.
citytable contains a list of cities.
countrytable contains a list of countries or regions.
customertable contains a list of all customers.
filmtable lists all the films that may be in stock in the store.
film_text: The content of
film_texttable is kept in synchrony with the
filmtable by means of triggers on the
filmtable INSERT, UPDATE and DELETE operations。
film_actortable is used to support many-to-many relationships between films and actors.
film_categorytable is used to support many-to-many relationships between films and categories.
inventory: A row in the
inventorytable represents a copy of a given film in a given store.
languagetable lists all possible values for the film language and original language.
paymenttable records every payment made by the customer, includes information such as the amount and rent paid.
rentaltable contains a row for each rental of each inventory item, which contains information about who rented what, when it rented it, and when it was returned.
stafftable lists all staff information, including email addresses, login information, and pictures.
storetable lists all stores in the system.
In this article, we introduced the Sakila sample database used in this tutorial. In the whole MySQL tutorial, the Sakila sample database is used as the demo database.
Now the Sakila sample database is ready, please start the following tutorial.