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

Sakila

This document provides an overview of the tables and indexes in a movie rental database. It describes tables for customer data, inventory, films, categories, addresses, staff, stores, rentals, payments, and film text. Each table listing includes the fields and data types. Indexes are also defined for most tables to support queries on the data.
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)
193 views1 page

Sakila

This document provides an overview of the tables and indexes in a movie rental database. It describes tables for customer data, inventory, films, categories, addresses, staff, stores, rentals, payments, and film text. Each table listing includes the fields and data types. Indexes are also defined for most tables to support queries on the data.
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

Inventory

Customer Data

country

customer

film

country_id SMALLINT

customer_id SMALLI

film_id SMALLINT

country VARCHAR(50)

store_id TINYINT

title VARCHAR(255)

first_name VARCHA

description TEXT

last_name VARCHA

release_year YEAR

city_id SMALLINT

email VARCHAR(50)

language_id TINYINT

city VARCHAR(50)

address_id SMALLINT

original_language_i

1 more...

Indexes

city

country_id SMALLINT
1 more...

Indexes

address

active BOOLEAN

rental_duration TIN

create_date DATETI

rental_rate DECIMA

last_update TIMEST

length SMALLINT

address_id SMALLINT

film_cate
film_id SMALLINT
category_id TINYI
1 more...

Indexes

language
language_id TINY
2 more...

Indexes

replacement_cost D

address VARCHAR(50)

category
category_id TINYI
2 more...

Indexes

actor
actor_id SMALLINT
first_name VARCH
2 more...

Indexes

3 more...

address2 VARCHAR(

Indexes

district VARCHAR(20)

Indexes

idx_title

city_id SMALLINT

PRIMARY

idx_fk_language_id

postal_code VARCH

idx_fk_store_id

idx_fk_original_langua

2 more...

Indexes

film_actor

idx_fk_address_id

PRIMARY

actor_id SMALLINT

idx_last_name

Triggers

film_id SMALLINT

AFT UPDATE upd_film

last_update TIME

AFT INSERT ins_film


Customer related data

AFT DELETE del_film

Indexes

inventory
inventory_id MEDI
film_id SMALLINT
store_id TINYINT
1 more...

Business

Indexes
Movie database

staff
staff_id TINYINT
first_name VARCH
last_name VARCH
address_id SMALL
picture BLOB

store
store_id TINYINT
manager_staff_id
2 more...

Indexes

email VARCHAR(50)
store_id TINYINT

rental

active BOOLEAN

rental_id INT

3 more...

Indexes

payment
payment_id SMAL
customer_id SMAL
staff_id TINYINT
rental_id INT
amount DECIMAL(
2 more...

Data required to run the business

Indexes

rental_date DATE
inventory_id MEDI
customer_id SMAL
return_date DATE
2 more...

Indexes

film_text
film_id SMALLINT
title VARCHAR(255)
1 more...

Indexes

You might also like