Schema Report for database: sakila

Table List
Table: actor
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
actor_idSMALLINTYesYesNo
first_nameVARCHAR(45)YesNoNo
last_nameVARCHAR(45)YesNoNo
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: address
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
address_idSMALLINTYesYesNo
addressVARCHAR(50)YesNoNo
address2VARCHAR(50)NoNoNoNULL
districtVARCHAR(20)YesNoNo
city_idSMALLINTYesNoYes
postal_codeVARCHAR(10)NoNoNoNULL
phoneVARCHAR(20)YesNoNo
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: category
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
category_idTINYINTYesYesNo
nameVARCHAR(25)YesNoNo
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: city
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
city_idSMALLINTYesYesNo
cityVARCHAR(50)YesNoNo
country_idSMALLINTYesNoYes
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: country
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
country_idSMALLINTYesYesNo
countryVARCHAR(50)YesNoNo
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: customer
Table CommentsTable storing all customers. Holds foreign keys to the address table and the store table where this customer is registered. Basic information about the customer like first and last name are stored in the table itself. Same for the date the record was created and when the information was last updated.
Columns
Name Data Type Nullable PK FK Default Comment
customer_idSMALLINTYesYesNo
store_idTINYINTYesNoYes
first_nameVARCHAR(45)YesNoNo
last_nameVARCHAR(45)YesNoNo
emailVARCHAR(50)NoNoNoNULL
address_idSMALLINTYesNoYes
activeTINYINT(1)YesNoNoTRUE
create_dateDATETIMEYesNoNo
last_updateTIMESTAMPNoNoNoCURRENT_TIMESTAMP
Table List
Table: film
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
film_idSMALLINTYesYesNo
titleVARCHAR(255)YesNoNo
descriptionTEXTNoNoNo
release_yearYEARNoNoNo
language_idTINYINTYesNoYes
original_language_idTINYINTNoNoYesNULL
rental_durationTINYINTYesNoNo3
rental_rateDECIMAL(4,2)YesNoNo4.99
lengthSMALLINTNoNoNoNULL
replacement_costDECIMAL(5,2)YesNoNo19.99
ratingENUM('G','PG','PG-13','R','NC-17')NoNoNo'G'
special_featuresSET('Trailers','Commentaries','Deleted Scenes','Behind the Scenes')NoNoNo
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: film_actor
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
actor_idSMALLINTYesYesYes
film_idSMALLINTYesYesYes
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: film_category
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
film_idSMALLINTYesYesYes
category_idTINYINTYesYesYes
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: film_text
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
film_idSMALLINTYesYesYes
titleVARCHAR(255)YesNoNo
descriptionTEXTNoNoNo
Table List
Table: inventory
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
inventory_idMEDIUMINTYesYesNo
film_idSMALLINTYesNoYes
store_idTINYINTYesNoYes
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: language
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
language_idTINYINTYesYesNo
nameCHAR(20)YesNoNo
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: payment
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
payment_idSMALLINTYesYesNo
customer_idSMALLINTYesNoYes
staff_idTINYINTYesNoYes
rental_idINTNoNoYesNULL
amountDECIMAL(5,2)YesNoNo
payment_dateDATETIMEYesNoNo
last_updateTIMESTAMPNoNoNoCURRENT_TIMESTAMP
Table List
Table: rental
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
rental_idINTYesYesNo
rental_dateDATETIMEYesNoNo
inventory_idMEDIUMINTYesNoYes
customer_idSMALLINTYesNoYes
return_dateDATETIMENoNoNo
staff_idTINYINTYesNoYes
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: staff
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
staff_idTINYINTYesYesNo
first_nameVARCHAR(45)YesNoNo
last_nameVARCHAR(45)YesNoNo
address_idSMALLINTYesNoYes
pictureBLOBNoNoNo
emailVARCHAR(50)NoNoNoNULL
store_idTINYINTYesNoYes
activeTINYINT(1)YesNoNoTRUE
usernameVARCHAR(16)YesNoNo
passwordVARCHAR(40)NoNoNoNULL
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List
Table: store
Table Comments
Columns
Name Data Type Nullable PK FK Default Comment
store_idTINYINTYesYesNo
manager_staff_idTINYINTYesNoYes
address_idSMALLINTYesNoYes
last_updateTIMESTAMPYesNoNoCURRENT_TIMESTAMP
Table List