You are on page 1of 1

Customer Data Inventory

film_cate… category
country customer film
film_id SMALLINT category_id TINY…
country_id SMALLINT customer_id SMAL… film_id SMALLINT
category_id TINY… name VARCHAR…
country VARCHAR(… store_id TINYINT title VARCHAR(255)
last_update TIME… last_update TIME…
1 more... first_name VARCH… description TEXT
Indexes Indexes Indexes
last_name VARCH… release_year YEAR
city
email VARCHAR(50) language_id TINYINT
city_id SMALLINT
address_id SMALLI… original_language_i… language
city VARCHAR(50) actor
active BOOLEAN rental_duration TIN…
country_id SMALLINT language_id TIN… actor_id SMALLINT
create_date DATET… rental_rate DECIM…
1 more... name CHAR(20) first_name VARC…
last_update TIMES… length SMALLINT 1 more...
Indexes address last_name VARC…
replacement_cost D… Indexes
address_id SMALLI… 1 more...
rating ENUM(...) Indexes
address VARCHAR…
special_features SE…
address2 VARCHA…
1 more...
district VARCHAR(20) Indexes
Indexes
city_id SMALLINT idx_title
PRIMARY
postal_code VARC… idx_fk_language_id film_actor
idx_fk_store_id
phone VARCHAR(20) idx_fk_original_langua…
idx_fk_address_id actor_id SMALLINT
1 more... PRIMARY
Indexes idx_last_name film_id SMALLINT
Triggers
PRIMARY last_update TIME…
AFT UPDATE upd_film
idx_fk_city_id
AFT INSERT ins_film
Indexes
Customer related data AFT DELETE del_film inventory
inventory_id MED…
film_id SMALLINT film_text
store_id TINYINT
film_id SMALLINT
last_update TIME…
title VARCHAR(255)
Business Indexes
description TEXT

Movie database Indexes

staff
store
staff_id TINYINT
store_id TINYINT
first_name VARC…
manager_staff_id…
last_name VARC…
address_id SMAL…
address_id SMAL… Views
1 more...
picture BLOB Indexes
email VARCHAR(… film_list nicer_but_slower_film_list Film Resources
store_id TINYINT film_in_stock get_customer_balance
active BOOLEAN rental actor_info film_not_in_stock inventory_held_by_cu...
username VARC… rental_id INT inventory_in_stock
2 more... rental_date DATE… rewards_report
payment
inventory_id MED… 4 routines
Indexes sales_by_store
payment_id SMA…
customer_id SMA…
customer_id SMA… 2 routines
return_date DAT…
sales_by_film_category
staff_id TINYINT
staff_id TINYINT
rental_id INT
last_update TIME…
staff_list customer_list
amount DECIMA…
payment_date D…
Indexes
1 more...
Data required to run the business Indexes Special view on certain data used for appraisals

You might also like