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_infoview provides a list of all actors, including the films they performed, broken down by category.The
actor_infoview incorporates data from thefilm,actor,category,film_actorandfilm_categorytables. -
customer_list
The
customer_listview provides a list of customers, concatenates the customer’s first name and last name, and merges the address information into one view.The
customer_listview incorporates data from thecustomer,address,cityandcountrythe tables. -
film_list
The
film_listview contains a formatted view of thefilmtable, with a list of actors in each film separated by commas.The
film_listview incorporates data from thefilm,category,film_category,actorandfilm_actortables. -
nicer_but_slower_film_list
The
nicer_but_slower_film_listview contains thefilmformatted view of the table, with a list of actors in each film separated by commas.The
nicer_but_slower_film_listview differs from thefilm_listview 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_listview perform additional processing, and therefore takes longer to return data than thefilm_listview.The
nicer_but_slower_film_listview incorporates data from thefilm,category,film_category,actorandfilm_actortables. -
sales_by_film_category
The
sales_by_film_categoryview 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_categoryview incorporates data from thecategory,payment,rental,inventory,film,film_categoryandcategorytables. -
sales_by_store
The
sales_by_storeview provides a list of total sales broken down by store.The
sales_by_storeview returns the store location, manager name, and total sales.The
sales_by_storeview incorporates data from thecity,country,payment,rental,inventory,store,addressandstafftables. -
staff_list
The
staff_listview provides a list of all employees, including address and store information.The
staff_listview incorporates data from thestaffandaddresstable.