Views
The article describes the views in the Sakila sample database.
There are 7 views defined in the Sakila database. The following describes each views.
-
actor_info
The
actor_info
view provides a list of all actors, including the films they performed, broken down by category.The
actor_info
view incorporates data from thefilm
,actor
,category
,film_actor
andfilm_category
tables. -
customer_list
The
customer_list
view provides a list of customers, concatenates the customer’s first name and last name, and merges the address information into one view.The
customer_list
view incorporates data from thecustomer
,address
,city
andcountry
the tables. -
film_list
The
film_list
view contains a formatted view of thefilm
table, with a list of actors in each film separated by commas.The
film_list
view incorporates data from thefilm
,category
,film_category
,actor
andfilm_actor
tables. -
nicer_but_slower_film_list
The
nicer_but_slower_film_list
view contains thefilm
formatted view of the table, with a list of actors in each film separated by commas.The
nicer_but_slower_film_list
view differs from thefilm_list
view in the list of actors. The lettercase of the actor names is adjusted so that the first letter of each name is capitalized, rather than having the name in all-caps.As its name implies, the
nicer_but_slower_film_list
view perform additional processing, and therefore takes longer to return data than thefilm_list
view.The
nicer_but_slower_film_list
view incorporates data from thefilm
,category
,film_category
,actor
andfilm_actor
tables. -
sales_by_film_category
The
sales_by_film_category
view provides a list of aggregate sales for a single film category.Because a film can be included in multiple categories, it is not recommended to add up the rows of this view to calculate total sales.
The
sales_by_film_category
view incorporates data from thecategory
,payment
,rental
,inventory
,film
,film_category
andcategory
tables. -
sales_by_store
The
sales_by_store
view provides a list of total sales broken down by store.The
sales_by_store
view returns the store location, manager name, and total sales.The
sales_by_store
view incorporates data from thecity
,country
,payment
,rental
,inventory
,store
,address
andstaff
tables. -
staff_list
The
staff_list
view provides a list of all employees, including address and store information.The
staff_list
view incorporates data from thestaff
andaddress
table.