.. Copyright (C) Google, Runestone Interactive LLC
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0
International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/.
How to Run SQL Outside of This Textbook
=======================================
In this section, you learned some basic SQL commands to analyze large datasets.
In the interactive version of this textbook, there was a SQL interpreter.
However, when using SQL outside of the textbook, including in your project, you
will need to run SQL somewhere else. In order to do this, there are many
options. If you are using SQL for just this course, you can use an online
interpreter, such as this one. When importing a .db file directly, select the
File drop drown from the top left of the webpage and select Open DB to use your
.db file.
- `SQL Online Interpreter`_
Ultimately, if you plan on using SQL for more robust purposes, you will want to
run SQL queries on your own machine. To do this, you will need to download a
Database Engine and set up a Database Client. There are many options for
database engines you can use. Some of the most popular ones are listed below.
Each link takes you to the setup documentation for the database engine. Pick
one that feels right to you and follow the instructions. If you would like more
explanation as to which database engine you should use, read about a `comparison
of relational database management systems.`_
- `SQLite`_
- `MySQL`_
- `PostgreSQL`_
- `BigQuery`_
.. _SQL Online Interpreter: https://sqliteonline.com/
.. _comparison of relational database management systems.: https://www.digitalocean.com/community/tutorials/sqlite-vs-mysql-vs-postgresql-a-comparison-of-relational-database-management-systems
.. _SQLite: https://www.sqlite.org/quickstart.html
.. _MySQL: https://dev.mysql.com/doc/mysql-getting-started/en/
.. _PostgreSQL: https://www.postgresql.org/docs/10/tutorial-start.html
.. _BigQuery: https://cloud.google.com/bigquery/docs