CREATE SCHEMA IF NOT EXISTS `sakila` |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | actor_id | SMALLINT | Yes | ||
first_name | VARCHAR(45) | Yes | |||
last_name | VARCHAR(45) | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_actor_last_name | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_film_actor_actor | Non-Identifying | actor | film_actor | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`actor` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | address_id | SMALLINT | Yes | ||
address | VARCHAR(50) | Yes | |||
address2 | VARCHAR(50) | No | NULL | ||
district | VARCHAR(20) | Yes | |||
city_id | SMALLINT | Yes | |||
postal_code | VARCHAR(10) | No | NULL | ||
phone | VARCHAR(20) | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_fk_city_id | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_address_city | Non-Identifying | city | address | 1:n |
fk_customer_address | Non-Identifying | address | customer | 1:n |
fk_staff_address | Non-Identifying | address | staff | 1:n |
fk_store_address | Non-Identifying | address | store | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`address` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | category_id | TINYINT | Yes | ||
name | VARCHAR(25) | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_film_category_category | Non-Identifying | category | film_category | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`category` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | city_id | SMALLINT | Yes | ||
city | VARCHAR(50) | Yes | |||
country_id | SMALLINT | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_fk_country_id | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_city_country | Non-Identifying | country | city | 1:n |
fk_address_city | Non-Identifying | city | address | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`city` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | country_id | SMALLINT | Yes | ||
country | VARCHAR(50) | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_city_country | Non-Identifying | country | city | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`country` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | customer_id | SMALLINT | Yes | ||
store_id | TINYINT | Yes | |||
first_name | VARCHAR(45) | Yes | |||
last_name | VARCHAR(45) | Yes | |||
VARCHAR(50) | No | NULL | |||
address_id | SMALLINT | Yes | |||
active | BOOLEAN | Yes | TRUE | ||
create_date | DATETIME | Yes | |||
last_update | TIMESTAMP | No | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_fk_store_id | No | No | INDEX | |||
idx_fk_address_id | No | No | INDEX | |||
idx_last_name | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_customer_address | Non-Identifying | address | customer | 1:n |
fk_customer_store | Non-Identifying | store | customer | 1:n |
fk_payment_customer | Non-Identifying | customer | payment | 1:n |
fk_rental_customer | Non-Identifying | customer | rental | 1:n |
Table 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. |
CREATE TABLE IF NOT EXISTS `sakila`.`customer` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | film_id | SMALLINT | Yes | ||
title | VARCHAR(255) | Yes | |||
description | TEXT | No | NULL | ||
release_year | YEAR | No | NULL | ||
language_id | TINYINT | Yes | |||
original_language_id | TINYINT | No | NULL | ||
rental_duration | TINYINT | Yes | 3 | ||
rental_rate | DECIMAL(4,2) | Yes | 4.99 | ||
length | SMALLINT | No | NULL | ||
replacement_cost | DECIMAL(5,2) | Yes | 19.99 | ||
rating | ENUM('G','PG','PG-13','R','NC-17') | No | 'G' | ||
special_features | SET('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') | No | NULL | ||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
idx_title | No | No | INDEX | |||
idx_fk_language_id | No | No | INDEX | |||
idx_fk_original_language_id | No | No | INDEX | |||
PRIMARY | Yes | No | PRIMARY |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_film_language | Non-Identifying | language | film | 1:n |
fk_film_language_original | Non-Identifying | language | film | 1:n |
fk_film_actor_film | Non-Identifying | film | film_actor | 1:n |
fk_film_category_film | Non-Identifying | film | film_category | 1:n |
fk_inventory_film | Non-Identifying | film | inventory | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`film` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
FK | actor_id | SMALLINT | Yes | ||
FK | film_id | SMALLINT | Yes | ||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_fk_film_id | No | No | INDEX | |||
fk_film_actor_actor_idx | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_film_actor_actor | Identifying | actor | film_actor | 1:n |
fk_film_actor_film | Identifying | film | film_actor | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`film_actor` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
FK | film_id | SMALLINT | Yes | ||
FK | category_id | TINYINT | Yes | ||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
fk_film_category_category_idx | No | No | INDEX | |||
fk_film_category_film_idx | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_film_category_film | Identifying | film | film_category | 1:n |
fk_film_category_category | Identifying | category | film_category | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`film_category` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | n/a |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | MyISAM | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
FK | film_id | SMALLINT | Yes | ||
title | VARCHAR(255) | Yes | |||
description | TEXT | No | NULL |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_title_description | No | No | FULLTEXT | |||
fk_film_text_idx | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_film_text | Identifying | inventory | film_text | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`film_text` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | inventory_id | MEDIUMINT | Yes | ||
film_id | SMALLINT | Yes | |||
store_id | TINYINT | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_fk_film_id | No | No | INDEX | |||
idx_store_id_film_id | No | No | INDEX | |||
fk_inventory_store_idx | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_inventory_store | Non-Identifying | store | inventory | 1:n |
fk_inventory_film | Non-Identifying | film | inventory | 1:n |
fk_film_text | Non-Identifying | inventory | film_text | 1:n |
fk_rental_inventory | Non-Identifying | inventory | rental | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`inventory` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | language_id | TINYINT | Yes | ||
name | CHAR(20) | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_film_language | Non-Identifying | language | film | 1:n |
fk_film_language_original | Non-Identifying | language | film | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`language` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | payment_id | SMALLINT | Yes | ||
customer_id | SMALLINT | Yes | |||
staff_id | TINYINT | Yes | |||
rental_id | INT | No | NULL | ||
amount | DECIMAL(5,2) | Yes | |||
payment_date | DATETIME | Yes | |||
last_update | TIMESTAMP | No | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_fk_staff_id | No | No | INDEX | |||
idx_fk_customer_id | No | No | INDEX | |||
fk_payment_rental_idx | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_payment_rental | Non-Identifying | rental | payment | 1:n |
fk_payment_customer | Non-Identifying | customer | payment | 1:n |
fk_payment_staff | Non-Identifying | staff | payment | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`payment` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | rental_id | INT | Yes | ||
rental_date | DATETIME | Yes | |||
inventory_id | MEDIUMINT | Yes | |||
customer_id | SMALLINT | Yes | |||
return_date | DATETIME | No | NULL | ||
staff_id | TINYINT | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
No | Yes | UNIQUE | ||||
idx_fk_inventory_id | No | No | INDEX | |||
idx_fk_customer_id | No | No | INDEX | |||
idx_fk_staff_id | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_rental_staff | Non-Identifying | staff | rental | 1:n |
fk_rental_inventory | Non-Identifying | inventory | rental | 1:n |
fk_rental_customer | Non-Identifying | customer | rental | 1:n |
fk_payment_rental | Non-Identifying | rental | payment | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`rental` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | staff_id | TINYINT | Yes | ||
first_name | VARCHAR(45) | Yes | |||
last_name | VARCHAR(45) | Yes | |||
address_id | SMALLINT | Yes | |||
picture | BLOB | No | NULL | ||
VARCHAR(50) | No | NULL | |||
store_id | TINYINT | Yes | |||
active | BOOLEAN | Yes | TRUE | ||
username | VARCHAR(16) | Yes | |||
password | VARCHAR(40) | No | NULL | ||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_fk_store_id | No | No | INDEX | |||
idx_fk_address_id | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_staff_store | Non-Identifying | store | staff | 1:n |
fk_staff_address | Non-Identifying | address | staff | 1:n |
fk_payment_staff | Non-Identifying | staff | payment | 1:n |
fk_rental_staff | Non-Identifying | staff | rental | 1:n |
fk_store_staff | Non-Identifying | staff | store | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`staff` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | utf8 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | store_id | TINYINT | Yes | ||
manager_staff_id | TINYINT | Yes | |||
address_id | SMALLINT | Yes | |||
last_update | TIMESTAMP | Yes | CURRENT_TIMESTAMP |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
idx_unique_manager | No | Yes | UNIQUE | |||
idx_fk_address_id | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
fk_store_staff | Non-Identifying | staff | store | 1:n |
fk_store_address | Non-Identifying | address | store | 1:n |
fk_customer_store | Non-Identifying | store | customer | 1:n |
fk_inventory_store | Non-Identifying | store | inventory | 1:n |
fk_staff_store | Non-Identifying | store | staff | 1:n |
CREATE TABLE IF NOT EXISTS `sakila`.`store` ( |
CREATE SCHEMA IF NOT EXISTS `test` DEFAULT CHARACTER SET latin1 |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | latin1 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | id | INT(11) | Yes | ||
col1 | CHAR(20) | No | NULL |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY |
CREATE TABLE IF NOT EXISTS `test`.`t` ( |
CREATE SCHEMA IF NOT EXISTS `world` DEFAULT CHARACTER SET utf8mb4 |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | latin1 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | ID | INT(11) | Yes | ||
Name | CHAR(35) | Yes | '' | ||
CountryCode | CHAR(3) | Yes | '' | ||
District | CHAR(20) | Yes | '' | ||
Population | INT(11) | Yes | '0' |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
CountryCode | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
city_ibfk_1 | Non-Identifying | country | city | 1:n |
CREATE TABLE IF NOT EXISTS `world`.`city` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | latin1 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | Code | CHAR(3) | Yes | '' | |
Name | CHAR(52) | Yes | '' | ||
Continent | ENUM('Asia','Europe','North America','Africa','Oceania','Antarctica','South America') | Yes | 'Asia' | ||
Region | CHAR(26) | Yes | '' | ||
SurfaceArea | FLOAT(10,2) | Yes | '0.00' | ||
IndepYear | SMALLINT(6) | No | NULL | ||
Population | INT(11) | Yes | '0' | ||
LifeExpectancy | FLOAT(3,1) | No | NULL | ||
GNP | FLOAT(10,2) | No | NULL | ||
GNPOld | FLOAT(10,2) | No | NULL | ||
LocalName | CHAR(45) | Yes | '' | ||
GovernmentForm | CHAR(45) | Yes | '' | ||
HeadOfState | CHAR(60) | No | NULL | ||
Capital | INT(11) | No | NULL | ||
Code2 | CHAR(2) | Yes | '' |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
city_ibfk_1 | Non-Identifying | country | city | 1:n |
countryLanguage_ibfk_1 | Non-Identifying | country | countrylanguage | 1:n |
CREATE TABLE IF NOT EXISTS `world`.`country` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | latin1 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
FK | CountryCode | CHAR(3) | Yes | '' | |
PK | Language | CHAR(30) | Yes | '' | |
IsOfficial | ENUM('T','F') | Yes | 'F' | ||
Percentage | FLOAT(4,1) | Yes | '0.0' |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
CountryCode | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
countryLanguage_ibfk_1 | Identifying | country | countrylanguage | 1:n |
CREATE TABLE IF NOT EXISTS `world`.`countrylanguage` ( |
CREATE SCHEMA IF NOT EXISTS `world2` DEFAULT CHARACTER SET utf8mb4 |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | latin1 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | ID | INT(11) | Yes | ||
Name | CHAR(35) | Yes | '' | ||
CountryCode | CHAR(3) | Yes | '' | ||
District | CHAR(20) | Yes | '' | ||
Population | INT(11) | Yes | '0' |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
CountryCode | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
city_ibfk_1 | Non-Identifying | country | city | 1:n |
CREATE TABLE IF NOT EXISTS `world2`.`city` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | latin1 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
PK | Code | CHAR(3) | Yes | '' | |
Name | CHAR(52) | Yes | '' | ||
Continent | ENUM('Asia','Europe','North America','Africa','Oceania','Antarctica','South America') | Yes | 'Asia' | ||
Region | CHAR(26) | Yes | '' | ||
SurfaceArea | FLOAT(10,2) | Yes | '0.00' | ||
IndepYear | SMALLINT(6) | No | NULL | ||
Population | INT(11) | Yes | '0' | ||
LifeExpectancy | FLOAT(3,1) | No | NULL | ||
GNP | FLOAT(10,2) | No | NULL | ||
GNPOld | FLOAT(10,2) | No | NULL | ||
LocalName | CHAR(45) | Yes | '' | ||
GovernmentForm | CHAR(45) | Yes | '' | ||
HeadOfState | CHAR(60) | No | NULL | ||
Capital | INT(11) | No | NULL | ||
Code2 | CHAR(2) | Yes | '' |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
city_ibfk_1 | Non-Identifying | country | city | 1:n |
countryLanguage_ibfk_1 | Non-Identifying | country | countrylanguage | 1:n |
CREATE TABLE IF NOT EXISTS `world2`.`country` ( |
Average Row Length | n/a | Use Check Sum | no |
Connection String | n/a | Default Character Set | latin1 |
Default Collation | n/a | Delay Key Updates | no |
Minimal Row Count | n/a | Maximum Row Count | n/a |
Union Tables | n/a | Merge Method | n/a |
Pack Keys | n/a | Has Password | no |
Data Directory | n/a | Index Directory | n/a |
Engine | InnoDB | Row Format | n/a |
Key | Column Name | Datatype | Not Null | Default | Comment |
FK | CountryCode | CHAR(3) | Yes | '' | |
PK | Language | CHAR(30) | Yes | '' | |
IsOfficial | ENUM('T','F') | Yes | 'F' | ||
Percentage | FLOAT(4,1) | Yes | '0.0' |
Index Name | Columns | Primary | Unique | Type | Kind | Comment |
PRIMARY | Yes | No | PRIMARY | |||
CountryCode | No | No | INDEX |
Relationship Name | Relationship Type | Parent Table | Child Table | Card. |
countryLanguage_ibfk_1 | Identifying | country | countrylanguage | 1:n |
CREATE TABLE IF NOT EXISTS `world2`.`countrylanguage` ( |