Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a database using MySQL. DB name: called AIR_ROUTES with one table called ROUTE. That table contains the following columns: Airline Char(3) From_Airport Char(3) To_Airport

Develop a database using MySQL.

DB name: called AIR_ROUTES with one table called ROUTE. That table contains the following columns:

Airline Char(3)

From_Airport Char(3)

To_Airport Char(3)

1. Using DDL construct the database and table.

2. Load the table with the information contained in the .csv file Routes.csv. (Hint: there are

load utilities that are part of the MySQL software.)

3. Add a new table to the database called ROUTE2. It contains the same three fields as ROUTE

and the exact names but also has the additional column of Miles INT NOT NULL with a default

of 0.

4. Construct a SQL DML query to move all the data from ROUTE to ROUTE2.

5. Display a few rows of ROUTE2 to ensure the data are there and the Miles column has a value

of 0. (Hint: use a select * statement with a limit clause to limit the number of displayed rows.)

6. Construct SQL to alter the table ROUTE2 to add a new column called Last_Update DATE with

a default of the current date.

7. Display a few rows of ROUTE2 to ensure the new column is there and it has been set to the

current date.

---------routes.csv (a portion)----------

2B,SVX,NJC 2B,SVX,NUX 2B,SVX,OVB 2B,TGK,DME 2B,UUA,DME 2B,UUA,LED 2B,UUA,NJC 2G,BTK,IKT 2G,BTK,OVB 2G,CEK,OVB 2G,HTA,IKT 2G,IKT,BTK 2G,IKT,HTA 2G,IKT,KCK

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions