Dem don give you one database wey dey use SQLite wey get info about airports. The schema dey show for down. You go use the SQLite extension for Visual Studio Code to show info about airports for different cities.
To start this assignment, you go need do some steps. You go need install some tools and download the sample database.
You fit use Visual Studio Code and the SQLite extension to work with the database.
- Go code.visualstudio.com and follow the instructions to install Visual Studio Code
- Install the SQLite extension extension as dem talk for the Marketplace page
Next, you go download and open the database.
- Download the database file from GitHub and save am for one folder
- Open Visual Studio Code
- Open the database for the SQLite extension by pressing Ctl-Shift-P (or Cmd-Shift-P if na Mac) and type
SQLite: Open database - Choose Choose database from file and open the airports.db file wey you download before
- After you don open the database (you no go see any update for the screen), create new query window by pressing Ctl-Shift-P (or Cmd-Shift-P if na Mac) and type
SQLite: New query
Once you don open am, the new query window fit dey use to run SQL statements for the database. You fit use the command Ctl-Shift-Q (or Cmd-Shift-Q if na Mac) to run queries for the database.
Note
If you want know more about the SQLite extension, you fit check the documentation
Database schema na how dem design and structure the table. The airports database get two tables, cities, wey get list of cities for United Kingdom and Ireland, and airports, wey get list of all airports. Because some cities fit get plenty airports, dem create two tables to store the info. For this exercise, you go use joins to show info for different cities.
| Cities |
|---|
| id (PK, integer) |
| city (text) |
| country (text) |
| Airports |
|---|
| id (PK, integer) |
| name (text) |
| code (text) |
| city_id (FK to id in Cities) |
Create queries wey go show this info:
- all city names for the
Citiestable - all cities for Ireland for the
Citiestable - all airport names with their city and country
- all airports for London, United Kingdom
| Exemplary | Adequate | Needs Improvement |
|---|
Disclaimer:
Dis dokyument don use AI translation service Co-op Translator do di translation. Even as we dey try make am accurate, abeg sabi say automated translations fit get mistake or no dey correct well. Di original dokyument for im native language na di main source wey you go trust. For important mata, na beta make you use professional human translation. We no go fit take blame for any misunderstanding or wrong interpretation wey fit happen because you use dis translation.