For this week, we will be extracting actual data out of databases so you will be required to have SQLite in order to complete the lab. Additionally, you may find the SQLite Browser helpful to use. If you are struggling to install either program, this tutorial may be of assistance to you
It is recommended that you become familiar with the command-line program and not the GUI (graphical user interface – i.e. SQLite Browser). It will help you in the long-run to not become overly reliant on using the GUI (as you will be required to write queries for assignments / midterm / final)
For the following problems, we will be using the following database schema. The SQLite database file can be found here. For more information, consult the A1 handout
Classes(class, type, country, numGuns, bore, displacement)
Ships(name, class, launched)
Battles(name, date)
Outcomes(ship, battle, result)
Write the following queries based on the database schema. Additionally, write out the results that the queries return
shipName
Ship
relation)Practice writing SQL queries (as opposed to relational algebra) on the problems from last week’s lab