Introduction
In this project, you will learn how to access a MySQL database, import data, and query the Gross National Product (GNP) for all countries.
ð Preview
MariaDB [world]> SOURCE /home/labex/project/getGNP.sql;
+----------------------------------------------+------------+
| Name | GNP |
+----------------------------------------------+------------+
| Aruba | 828.00 |
| Afghanistan | 5976.00 |
| Angola | 6648.00 |
...
| Zambia | 3377.00 |
| Zimbabwe | 5951.00 |
+----------------------------------------------+------------+
239 rows in set (0.000 sec)
ðŊ Tasks
In this project, you will learn:
- How to start the MySQL service and access the database using the
sudo
command without a password - How to import data from a SQL file into the
world
database - How to query the
GNP
attribute from thecountry
table and display theName
andGNP
for all countries
ð Achievements
After completing this project, you will be able to:
- Manage a MySQL database, including starting the service, accessing the database, and importing data
- Write SQL queries to retrieve specific data from a database table
- Understand how to work with the
world
database and thecountry
table