Question: For this assignment, download the provided flight-2. csv and aircrafts. csv files from Canvas and import them to your Google Colab notebook. Follow the setup


For this assignment, download the provided flight-2. csv and aircrafts. csv files from Canvas and import them to your Google Colab notebook. Follow the setup steps, including creating a database engine, establishing a connection, and creating a cursor. Use Google Colab for your workspace: htips thoolab research google coml Suggestion: Go through the resources posted in the Announcement section on Canvas for the database assignment. 1) Create a new file ipynb file "TIM50_firstName_Assignment?". 2) Set up a SOL database named 'myDB' in your Google Colab notebook. 1) Create a table named flights using the data in the flights-2 csv file. Similarly, create a table named airerafts using the data in the aircrafts csv file. a. Print 5 rows each from tables fights and airorafs. [ 1 point ] b. Print columns and their type for the tables fights and aircrafts. [ 1 point ] 2) The SQL tutorial mentions that the data in Flight column is not unique. In real-time scenarios. you may have to decipher the data. How can you check for columns that have distinct values? The following exercise will help you find columns that might have distind values. a. Print the total number rows in each table. [1 point ] b. Print the number of distinct values in each column for table fights. [3 points ] (Hint: Use Count and Distinct commands) 3) Now that we understand our data betler drop the existing tables. Create new tables fights. and airerafts with a primary key, as mentioned in the SQL tutarial. Write a query to compute the number of passengers flying non-stop from DEN to SFO. [ 2 points] 4) Write a query to find the maximum number of passengers artiving in SFO (SMNGLE FLIGHT) on Airplane Models starting with '7' from DEN or SAN. [2 points] Submission: Submit the ipynb python file on Gradescope. We would like to review the work you have done. Submit an additional pdt that contains the answers to Questions 1-4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
