MySQL Sakila Sample Database
This article introduces the Sakila sample database used in this tutorial.
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
If you choose the Full type of MySQL Installation, the Sakila sample database will be installed by default. If not, please install the Sakila sample database first.
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:
actor
: Theactor
table lists information for all the actors, includes first name and last name of actors.address
: Theaddress
table contains address information for customers, staff, and stores.category
: Thecategory
table lists the categories that can be assigned to films.city
: Thecity
table contains a list of cities.country
: Thecountry
table contains a list of countries or regions.customer
: Thecustomer
table contains a list of all customers.film
: Thefilm
table lists all the films that may be in stock in the store.film_text
: The content offilm_text
table is kept in synchrony with thefilm
table by means of triggers on thefilm
table INSERT, UPDATE and DELETE operations。film_actor
: Thefilm_actor
table is used to support many-to-many relationships between films and actors.film_category
: Thefilm_category
table is used to support many-to-many relationships between films and categories.inventory
: A row in theinventory
table represents a copy of a given film in a given store.language
: Thelanguage
table lists all possible values for the film language and original language.payment
: Thepayment
table records every payment made by the customer, includes information such as the amount and rent paid.rental
: Therental
table 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.staff
: Thestaff
table lists all staff information, including email addresses, login information, and pictures.store
: Thestore
table lists all stores in the system.
Conclusion
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.