1 Sample Schema HTML5 interactive image documentation. Move the mouse over tables to read the comments. Powered by DbSchema staff inventory store film address hobbies film_actor film_text product_share_classes codes table_7 table_b test_backup film_list Fk fk_address_city address ref city ( city_id ) city_id Fk fk_city_country city ref country ( country_id ) country_id Fk fk_customer_address customer ref address ( address_id ) address_id Fk fk_customer_store customer ref store ( store_id ) store_id Fk fk_film_language film ref language ( language_id ) language_id Fk fk_film_language_original film ref language ( original_language_id -> language_id ) original_language_id Fk fk_film_actor_actor film_actor ref actor ( actor_id ) actor_id Fk fk_film_actor_film film_actor ref film ( film_id ) film_id Fk fk_film_category_category film_category ref category ( category_id ) category_id Fk fk_film_category_film film_category ref film ( film_id ) film_id Fk fk_hobbies hobbies ref persons ( personida -> personid ) personida Fk fk_inventory_film inventory ref film ( film_id ) film_id Fk fk_inventory_store inventory ref store ( store_id ) store_id Fk fk_payment_customer payment ref customer ( customer_id ) customer_id Fk fk_payment_rental payment ref rental ( rental_id ) rental_id Fk fk_payment_staff payment ref staff ( staff_id ) staff_id Fk fk_products products ref codes ( codeid ) codeid Fk fk_rental_customer rental ref customer ( customer_id ) customer_id Fk fk_rental_inventory rental ref inventory ( inventory_id ) inventory_id Fk fk_rental_staff rental ref staff ( staff_id ) staff_id Fk fk_staff_address staff ref address ( address_id ) address_id Fk fk_staff_store staff ref store ( store_id ) store_id Fk fk_store_address store ref address ( address_id ) address_id Fk fk_store_staff store ref staff ( manager_staff_id -> staff_id ) manager_staff_id Fk fk_table_10 table_10 ref table_11 ( refaa -> id ) refaa Fk fk_table_3 table_3 ref table_4 ( id ) id Fk fk_table_5 table_3 ref table_6 ( id ) id Fk fk1 table_a ref table_b ( ref1 -> id ) ref1 actorTable sakila.actor Pk pk_actor ( actor_id ) actor_idactor_id * smallint Referred by film_actor ( actor_id ) first_namefirst_name * varchar(45) idx_actor_last_name ( last_name ) last_namelast_name * varchar(45) last_updatelast_update * timestamp default CURRENT_TIMESTAMP addressTable sakila.address Pk pk_address ( address_id ) address_idaddress_id * smallint Referred by customer ( address_id ) Referred by staff ( address_id ) Referred by store ( address_id ) addressaddress * varchar(50) address2address2 varchar(50) districtdistrict * varchar(20) idx_fk_city_id ( city_id ) city_idcity_id * smallint References city ( city_id ) postal_codepostal_code varchar(10) phonephone * varchar(20) last_updatelast_update * timestamp default CURRENT_TIMESTAMP categoryTable sakila.category Pk pk_category ( category_id ) category_idcategory_id * tinyint Referred by film_category ( category_id ) namename * varchar(25) last_updatelast_update * timestamp default CURRENT_TIMESTAMP cityTable sakila.city Pk pk_city ( city_id ) city_idcity_id * smallint Referred by address ( city_id ) citycity * varchar(50) idx_fk_country_id ( country_id ) country_idcountry_id * smallint References country ( country_id ) last_updatelast_update * timestamp default CURRENT_TIMESTAMP codesTable sakila.codes Pk pk_codes ( codeid ) codeidcodeid * char(3) Referred by products ( codeid ) namename * varchar(100) countryTable sakila.country Pk pk_country ( country_id ) country_idcountry_id * smallint Referred by city ( country_id ) countrycountry * varchar(50) last_updatelast_update * timestamp default CURRENT_TIMESTAMP customerTable sakila.customer Pk pk_customer ( customer_id ) customer_idcustomer_id * smallint Referred by payment ( customer_id ) Referred by rental ( customer_id ) idx_fk_store_id ( store_id ) store_idstore_id * tinyint References store ( store_id ) first_namefirst_name * varchar(45) idx_last_name ( last_name ) last_namelast_name * varchar(45) booadsf < > & @ _ ! *''##;""" emailemail varchar(50) idx_fk_address_id ( address_id ) address_idaddress_id * smallint References address ( address_id ) activeactive * bit default 1 create_datecreate_date * datetime last_updatelast_update * timestamp default CURRENT_TIMESTAMP filmTable sakila.film Pk pk_film ( film_id ) film_idfilm_id * smallint Referred by film_actor ( film_id ) Referred by film_category ( film_id ) Referred by inventory ( film_id ) idx_title ( title ) titletitle * varchar(255) descriptiondescription text wurra release_yearrelease_year year idx_fk_language_id ( language_id ) language_idlanguage_id * tinyint References language ( language_id ) idx_fk_original_language_id ( original_language_id ) original_language_idoriginal_language_id tinyint References language ( original_language_id -> language_id ) rental_durationrental_duration * tinyint default 3 rental_raterental_rate * decimal(4,2) default 4.99 lengthlength smallint replacement_costreplacement_cost * decimal(5,2) default 19.99 ratingrating enum('g','pg','pg-13','r','nc-17') default 'G' special_featuresspecial_features set('trailers','commentaries','deleted scenes','behind the scenes') last_updatelast_update * timestamp default CURRENT_TIMESTAMP film_actorTable sakila.film_actor Pk pk_film_actor ( actor_id, film_id ) actor_idactor_id * smallint References actor ( actor_id ) Pk pk_film_actor ( actor_id, film_id ) idx_fk_film_id ( film_id ) film_idfilm_id * smallint References film ( film_id ) last_updatelast_update * timestamp default CURRENT_TIMESTAMP film_categoryTable sakila.film_category Pk pk_film_category ( film_id, category_id ) film_idfilm_id * smallint References film ( film_id ) Pk pk_film_category ( film_id, category_id ) fk_film_category_category ( category_id ) category_idcategory_id * tinyint References category ( category_id ) last_updatelast_update * timestamp default CURRENT_TIMESTAMP film_textTable sakila.film_text Pk pk_film_text ( film_id ) film_idfilm_id * smallint idx_title_description ( title, description ) titletitle * varchar(255) idx_title_description ( title, description ) descriptiondescription text hobbiesTable sakila.hobbies idx_hobbies ( personida ) personidapersonida * int References persons ( personida -> personid ) hobbyhobby * enum('ski','swim','run','badminton','tennis','walking') inventoryTable sakila.inventory Pk pk_inventory ( inventory_id ) inventory_idinventory_id * mediumint Referred by rental ( inventory_id ) idx_fk_film_id ( film_id ) idx_store_id_film_id ( store_id, film_id ) film_idfilm_id * smallint References film ( film_id ) idx_store_id_film_id ( store_id, film_id ) store_idstore_id * tinyint References store ( store_id ) last_updatelast_update * timestamp default CURRENT_TIMESTAMP languageTable sakila.language Pk pk_language ( language_id ) language_idlanguage_id * tinyint Referred by film ( language_id ) Referred by film ( original_language_id -> language_id ) namename * char(20) last_updatelast_update * timestamp default CURRENT_TIMESTAMP mo_static_offerTable sakila.mo_static_offer Pk pk_mo_static_offer ( ID ) IDID * bigint TITLETITLE * varchar(36) DETAILSDETAILS varchar(360) START_DATESTART_DATE date END_DATEEND_DATE date TERMSTERMS varchar(360) IMAGE_URLIMAGE_URL varchar(200) ICON_URLICON_URL varchar(200) FK_MO_STATIC_OFFER_MERCHANT_ID ( MERCHANT_ID ) MERCHANT_IDMERCHANT_ID * bigint TYPETYPE * varchar(20) BULK_PAID_QTYBULK_PAID_QTY int BULK_GET_QTYBULK_GET_QTY int DELTADELTA decimal(19,2) FROMTO_FROMFROMTO_FROM decimal(19,2) FROMTO_TOFROMTO_TO decimal(19,2) PERCENTAGEPERCENTAGE decimal(5,3) UNITUNIT varchar(50) STATUSSTATUS * varchar(50) OFFERED_FOR_REVIEWOFFERED_FOR_REVIEW datetime ordersTable sakila.orders Pk pk_orders ( orderid ) orderidorderid * int customer_namecustomer_name * varchar(100) valuevalue * int patient_employees_relTable sakila.patient_employees_rel Pk pk_patient_employees_rel ( id ) idid * int FK_patient_employees_rel_patients ( patientid ) patientidpatientid int FK_patient_employees_rel_employees ( employeeid ) employeeidemployeeid int date_assigneddate_assigned * timestamp default CURRENT_TIMESTAMP paymentTable sakila.payment Pk pk_payment ( payment_id ) payment_idpayment_id * smallint idx_fk_customer_id ( customer_id ) customer_idcustomer_id * smallint References customer ( customer_id ) idx_fk_staff_id ( staff_id ) staff_idstaff_id * tinyint References staff ( staff_id ) fk_payment_rental ( rental_id ) rental_idrental_id int References rental ( rental_id ) amountamount * decimal(5,2) payment_datepayment_date * datetime as last_updatelast_update * timestamp default CURRENT_TIMESTAMP personsTable sakila.persons Pk pk_persons ( personid ) personidpersonid * int Referred by hobbies ( personida -> personid ) namename * varchar(100) firstnamefirstname * varchar(100) malemale * bit birthdatebirthdate * date weightweight decimal(5,2) photophoto blob product_share_classesTable sakila.product_share_classes Pk pk_product_share_classes ( product_share_class_id ) product_share_class_idproduct_share_class_id * int product_share_class_product_idproduct_share_class_product_id * int product_share_class_nameproduct_share_class_name varchar(10) product_share_class_is_hedgedproduct_share_class_is_hedged bit product_share_class_hedged_currency_idproduct_share_class_hedged_currency_id int product_share_class_dividend_frequency_idproduct_share_class_dividend_frequency_id varchar(10) product_share_class_terproduct_share_class_ter decimal(4,0) product_share_class_nav_currency_idproduct_share_class_nav_currency_id * int product_share_class_is_peaproduct_share_class_is_pea bit product_share_class_isin_codeproduct_share_class_isin_code varchar(25) product_share_class_law_firm_idproduct_share_class_law_firm_id int product_share_class_accounting_firm_idproduct_share_class_accounting_firm_id int product_share_class_is_ucitsproduct_share_class_is_ucits bit product_share_class_is_ucits_eligibleproduct_share_class_is_ucits_eligible bit product_share_class_underlying_index_class_idproduct_share_class_underlying_index_class_id int productsTable sakila.products Pk pk_products ( productid ) productidproductid * int idx_products ( codeid ) codeidcodeid char(3) References codes ( codeid ) quantityquantity * int rentalTable sakila.rental Pk pk_rental ( rental_id ) rental_idrental_id * int Referred by payment ( rental_id ) Unq rental_date ( rental_date, inventory_id, customer_id ) rental_daterental_date * datetime Unq rental_date ( rental_date, inventory_id, customer_id ) idx_fk_inventory_id ( inventory_id ) inventory_idinventory_id * mediumint References inventory ( inventory_id ) Unq rental_date ( rental_date, inventory_id, customer_id ) idx_fk_customer_id ( customer_id ) customer_idcustomer_id * smallint References customer ( customer_id ) return_datereturn_date datetime idx_fk_staff_id ( staff_id ) staff_idstaff_id * tinyint References staff ( staff_id ) last_updatelast_update * timestamp default CURRENT_TIMESTAMP staffTable sakila.staff Pk pk_staff ( staff_id ) staff_idstaff_id * tinyint Referred by payment ( staff_id ) Referred by rental ( staff_id ) Referred by store ( manager_staff_id -> staff_id ) first_namefirst_name * varchar(45) last_namelast_name * varchar(45) idx_fk_address_id ( address_id ) address_idaddress_id * smallint References address ( address_id ) picturepicture blob emailemail varchar(50) idx_fk_store_id ( store_id ) store_idstore_id * tinyint References store ( store_id ) activeactive * bit default 1 usernameusername * varchar(16) passwordpassword varchar(40) last_updatelast_update * timestamp default CURRENT_TIMESTAMP storeTable sakila.store Pk pk_store ( store_id ) store_idstore_id * tinyint Referred by customer ( store_id ) Referred by inventory ( store_id ) Referred by staff ( store_id ) Unq idx_unique_manager ( manager_staff_id ) manager_staff_idmanager_staff_id * tinyint References staff ( manager_staff_id -> staff_id ) idx_fk_address_id ( address_id ) address_idaddress_id * smallint References address ( address_id ) last_updatelast_update * timestamp default CURRENT_TIMESTAMP t1Table sakila.t1 Unq pk_t1 ( id ) idid int table_0Table sakila.table_0 Pk pk_table_0 ( id ) idid * int namename varchar(100) dddd double table_1Table sakila.table_1 Pk pk_table_1 ( id ) idid * int namename varchar(100) asasaasasa int table_10Table sakila.table_10 Pk pk_table_10 ( id ) idid * int idx_table_10 ( refaa ) refaarefaa int References table_11 ( refaa -> id ) table_10aTable sakila.table_10a Pk pk_table_10a ( id ) idid * int bubunel2bubunel2 int table_11Table sakila.table_11 Pk pk_table_11 ( id ) idid * int Referred by table_10 ( refaa -> id ) idx_table_11 ( ref ) refref int table_12Table sakila.table_12 Pk pk_table_12 ( id2 ) id2id2 * int Also a sample idid * int Sample column table_12aTable sakila.table_12a Pk pk_table_12a ( id ) idid * int table_13Table sakila.table_13 Pk pk_table_13 ( id ) idid * int table_13aTable sakila.table_13a Pk pk_table_13a ( id ) idid * int table_2Table sakila.table_2 醙醠鍖 鬄鵊鵙 漦澌 獌 骱醙醠鍖 鬄鵊鵙 漦澌 獌 骱 * varchar(122) 醙醠鍖 鬄鵊鵙 漦澌 獌 骱 testtest varchar(12) 0-reprovado; 1-em curso; 2-aprovado; 3-abandono; aääöasdüeraääöasdüer int table_3Table sakila.table_3 Pk pk_table_3 ( id ) idid * int References table_4 ( id ) References table_6 ( id ) namename varchar(100) table_4Table sakila.table_4 Pk pk_table_4 ( id ) idid * int Referred by table_3 ( id ) namename varchar(100) table_5Table sakila.table_5 Pk pk_table_5 ( id ) idid * int namename varchar(100) table_6Table sakila.table_6 Pk pk_table_6 ( id ) idid * int Referred by table_3 ( id ) namename varchar(100) table_7Table sakila.table_7 Pk pk_table_7 ( id ) idid * int refref int table_8Table sakila.table_8 Pk pk_table_8 ( id ) idid * decimal(10,0) namename varchar(100) table_9Table sakila.table_9 Pk pk_table_9 ( bubu ) bubububu * date idx_table_9 ( id ) idid int namename varchar(100) ageage * int age1age1 int age2age2 int age3age3 int age4age4 int table_aTable sakila.table_a Pk pk_table_a ( id ) idid * int fk1 ( ref1 ) ref1ref1 int References table_b ( ref1 -> id ) table_bTable sakila.table_b Pk pk_table_b ( id ) idid * int Referred by table_a ( ref1 -> id ) namename * varchar(100) table_ddTable sakila.table_dd Pk pk_table_dd ( id ) idid * int dddd * date test_backupTable sakila.test_backup namename varchar(100) createdcreated date includedincluded bit test_comboTable sakila.test_combo Pk pk_test_combo ( id ) idid * int namename * varchar(100) statusstatus * char(1) timecoltimecol time unsgunsg * int samplesample * decimal(10,0) actor_infoView sakila.actor_info actor_idactor_id * smallint default 0 first_namefirst_name * varchar(45) last_namelast_name * varchar(45) film_infofilm_info text customer_listView sakila.customer_list IDID * smallint default 0 namename varchar(91) addressaddress * varchar(50) zip codezip code varchar(10) phonephone * varchar(20) citycity * varchar(50) countrycountry * varchar(50) notesnotes * varchar(6) default '' SIDSID * tinyint film_listView sakila.film_list FIDFID smallint default 0 titletitle varchar(255) descriptiondescription text wurra categorycategory * varchar(25) priceprice decimal(4,2) default 4.99 lengthlength smallint ratingrating enum default 'G' actorsactors text nicer_but_slower_film_listView sakila.nicer_but_slower_film_list FIDFID smallint default 0 titletitle varchar(255) descriptiondescription text wurra categorycategory * varchar(25) priceprice decimal(4,2) default 4.99 lengthlength smallint ratingrating enum default 'G' actorsactors text sales_by_film_categoryView sakila.sales_by_film_category categorycategory * varchar(25) total_salestotal_sales decimal(27,2) sales_by_storeView sakila.sales_by_store storestore varchar(101) managermanager varchar(91) total_salestotal_sales decimal(27,2) staff_listView sakila.staff_list IDID * tinyint default 0 namename varchar(91) addressaddress * varchar(50) zip codezip code varchar(10) phonephone * varchar(20) citycity * varchar(50) countrycountry * varchar(50) SIDSID * tinyint view_0View sakila.view_0 film_idfilm_id * smallint default 0 titletitle * varchar(255) descriptiondescription text wurra release_yearrelease_year year language_idlanguage_id * tinyint original_language_idoriginal_language_id tinyint rental_durationrental_duration * tinyint default 3 rental_raterental_rate * decimal(4,2) default 4.99 lengthlength smallint replacement_costreplacement_cost * decimal(5,2) default 19.99 ratingrating enum default 'G' special_featuresspecial_features set last_updatelast_update * timestamp default '0000-00-00 00:00:00' This layout demonstrates the grouping of tables and creation of multiple layouts. Layouts can be closed by clicking the 'x' on the layout tab. Delete this callout from its right-click pop-up.