0% found this document useful (0 votes)
46 views1 page

Sakila

This document contains the table structures for a database that tracks information for a video rental store. There are tables for stores, staff, addresses, cities, countries, films, inventories, rentals, payments and more. Each table lists the fields, data types and any indexes. The tables are connected through foreign key relationships like staff being linked to a store or rentals connected to customers, inventory and films.

Uploaded by

Ricardo Chávez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

Sakila

This document contains the table structures for a database that tracks information for a video rental store. There are tables for stores, staff, addresses, cities, countries, films, inventories, rentals, payments and more. Each table lists the fields, data types and any indexes. The tables are connected through foreign key relationships like staff being linked to a store or rentals connected to customers, inventory and films.

Uploaded by

Ricardo Chávez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

store

store_id TINYINT(3)
staff manager_staff_id TINYINT(3)

staff_id TINYINT(3) address_id SMALLINT(5)

first_name VARCHAR(45) last_update TIMESTAMP

last_name VARCHAR(45) Indexes


city
address_id SMALLINT(5)
picture BLOB city_id SMALLINT(5)

email VARCHAR(50) city VARCHAR(50)

store_id TINYINT(3) country_id SMALLINT(5)

active TINYINT(1) last_update TIMESTAMP


Indexes
username VARCHAR(16)
password VARCHAR(40)
last_update TIMESTAMP rental
Indexes
rental_id INT(11)
film
rental_date DATETIME
country film_id SMALLINT(5)
inventory_id MEDIUMINT(8)
country_id SMALLINT(5) title VARCHAR(255)
customer_id SMALLINT(5) language
country VARCHAR(50) description TEXT
return_date DATETIME
last_update TIMESTAMP language_id TINYINT(3) release_year YEAR(4)
staff_id TINYINT(3)
Indexes name CHAR(20) language_id TINYINT(3)
last_update TIMESTAMP
last_update TIMESTAMP original_language_id TINYINT(3)
Indexes
Indexes
rental_duration TINYINT(3)
Triggers
rental_rate DECIMAL(4,2)
length SMALLINT(5)
film_text
replacement_cost DECIMAL(5,2)
film_id SMALLINT(6) staff_list
film_list rating ENUM(...)
title VARCHAR(255) special_features SET(...)
description TEXT last_update TIMESTAMP
Indexes inventory Indexes
inventory_id MEDIUMINT(8) payment Triggers
film_id SMALLINT(5) payment_id SMALLINT(5)
store_id TINYINT(3) customer_id SMALLINT(5)
sales_by_store last_update TIMESTAMP staff_id TINYINT(3)
Indexes rental_id INT(11)
amount DECIMAL(5,2)
customer_list payment_date DATETIME
category film_category
last_update TIMESTAMP
category_id TINYINT(3) film_id SMALLINT(5)
Indexes
name VARCHAR(25) category_id TINYINT(3) Triggers
address last_update TIMESTAMP last_update TIMESTAMP
address_id SMALLINT(5) Indexes Indexes

address VARCHAR(50) film_actor


address2 VARCHAR(50) actor_id SMALLINT(5)
district VARCHAR(20) film_id SMALLINT(5)
actor
city_id SMALLINT(5) customer last_update TIMESTAMP
actor_id SMALLINT(5)
postal_code VARCHAR(10) customer_id SMALLINT(5) Indexes
first_name VARCHAR(45)
phone VARCHAR(20) store_id TINYINT(3)
last_name VARCHAR(45)
last_update TIMESTAMP first_name VARCHAR(45)
last_update TIMESTAMP
Indexes last_name VARCHAR(45)
Indexes
email VARCHAR(50)
address_id SMALLINT(5)
active TINYINT(1)
create_date DATETIME
last_update TIMESTAMP
Indexes
Triggers

actor_info nicer_but_slower_film_list sales_by_film_category

You might also like