TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

MySQL

MySQL world Database Tables

Overview

In this tutorial, we will know about the MySQL world Database Tables. The world sample database has three tables:

  • Country
  • City
  • Countrylanguage

We can use the following

mysql> SHOW TABLES;
+—————–+
| Tables_in_world |
+—————–+
| city |
| country |
| countrylanguage |
+—————–+
3 rows in set (0.00 sec)

 

Tables in world Database

Country

Country: Database table has information about countries of the world. To know the table structure and the columns we can use the following command.

mysql> DESC Country;
+—————-+—————————————————————————————+——+—–+———+——-+
| Field | Type | Null | Key | Default | Extra |
+—————-+—————————————————————————————+——+—–+———+——-+
| Code | char(3) | NO | PRI | | |
| Name | char(52) | NO | | | |
| Continent | enum(‘Asia’,’Europe’,’North America’,’Africa’,’Oceania’,’Antarctica’,’South America’) | NO | | Asia | |
| Region | char(26) | NO | | | |
| SurfaceArea | decimal(10,2) | NO | | 0.00 | |
| IndepYear | smallint | YES | | NULL | |
| Population | int | NO | | 0 | |
| LifeExpectancy | decimal(3,1) | YES | | NULL | |
| GNP | decimal(10,2) | YES | | NULL | |
| GNPOld | decimal(10,2) | YES | | NULL | |
| LocalName | char(45) | NO | | | |
| GovernmentForm | char(45) | NO | | | |
| HeadOfState | char(60) | YES | | NULL | |
| Capital | int | YES | | NULL | |
| Code2 | char(2) | NO | | | |
+—————-+—————————————————————————————+——+—–+———+——-+
15 rows in set (0.00 sec)

City

City: Table has information about some cities in those countries.

mysql> DESC City;
+————-+———-+——+—–+———+—————-+
| Field | Type | Null | Key | Default | Extra |
+————-+———-+——+—–+———+—————-+
| ID | int | NO | PRI | NULL | auto_increment |
| Name | char(35) | NO | | | |
| CountryCode | char(3) | NO | MUL | | |
| District | char(20) | NO | | | |
| Population | int | NO | | 0 | |
+————-+———-+——+—–+———+—————-+
5 rows in set (0.02 sec)

 

City table in world MySQL database

Countrylanguage

Countrylanguage: Database table with languages spoken in each country.

mysql> DESC CountryLanguage;
+————-+—————+——+—–+———+——-+
| Field | Type | Null | Key | Default | Extra |
+————-+—————+——+—–+———+——-+
| CountryCode | char(3) | NO | PRI | | |
| Language | char(30) | NO | PRI | | |
| IsOfficial | enum(‘T’,’F’) | NO | | F | |
| Percentage | decimal(4,1) | NO | | 0.0 | |
+————-+—————+——+—–+———+——-+
4 rows in set (0.00 sec)

 

CountryLanguage table in world MySQL

 

—

MySQL Tutorials

MySQL Tutorials on this website:

https://www.testingdocs.com/mysql-tutorials-for-beginners/

For more information on MySQL Database:

https://www.mysql.com/

Related Posts

DataGrip Desktop Shortcut

MySQL /

Launch DataGrip on Windows

DataGrip Download

MySQL /

Install DataGrip IDE on Windows 11

MySQL Workbench Windows 11

MySQL /

New MySQL Connection in Workbench

MySQL Command-line Client

MySQL /

Command-Line MySQL Client

Start MySQL Client

MySQL /

Start MySQL Client on Windows 11

‹ Setup MySQL world Database› MySQL ENUM Datatype

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version