Tutorials¶
Introduction¶
These tutorials show you how to create a relational database, convert information from spreadsheet to database form, load your database with language information, and then use the database to view, maintain, and manage that information.
We will use DB Browser for SQLite, so that you will end these tutorials with an SQLite database of your own.
SQLite is one of many Database Management Systems (DBMS's) we could have chosen to start with. Others include PostGres, MySQL, and Oracle. These are all relational databases, and they're all great. We chose SQLite because it's both powerful and pretty easy to start with.
DB Browser for SQLite lets us build and manage that database using a graphical user interface (or GUI) instead of having to do all this work by just typing commands in your computer's terminal application.
But we'll also show you how to use Structured Query Language (or SQL) to build and manage your database. Once you've learned SQL you won't necessarily need DB Browser for SQLite in order to use and improve your database.
How to Use these Tutorials¶
We've prepared these tutorials so that each section gradually builds on the previous ones, but they're also structured as separate topics. You can go through the tutorials in order, or jump around to the different topics as needed.
They are also built to work as a future reference. So you can come back and see exactly what you need.
Write the SQL and Execute the Commands on Your Computer¶
All the SQL commands in these tutorials can be copied and pasted - but it is HIGHLY encouraged that you write or copy the code, edit it, and run it locally.
Running the examples is what will really help you understand what is going on.
You can learn a lot more by running some examples and playing around with them than by reading all the docs here.
Let's Start! Create a Project¶
Please go ahead and create a directory for the project we will work on on this tutorial.
What I normally do is that I create a directory named sql_tutorial
inside my home/user directory. But you can put this directory anywhere on your computer that you want to, as long as you have rights to add and modify files in that directory.
Info
create a directory just means that you'll make a new folder somewhere on your computer. You could put it on your Desktop, or in Documents, or wherever you feel comfortable that you can find it easily. You can use your finder tool to do this, or you can get fancy and use your terminal application (aka the command line), as illustrated below.
And inside of that you can create different directories to hold different databases, if you want to. This is not necessary for us in this tutorial, but you are free like a little bird 🐤 to do what you want.
So, for example:
// Go to the home directory
$ cd
// Create a directory for all your code projects
$ mkdir sql_tutorial
// Enter into that code directory
$ cd sql_tutorial
Install DB Browser for SQLite¶
Through the tutorial we will show you SQL fragments, and DB Browser examples. And we hope (and expect 🧐) you to actually run them, and verify that the database is working as expected and showing you the same data.
To be able to explore the SQLite file yourself we will use DB Browser for SQLite.
It's a great and simple program to interact with SQLite databases (SQLite files) in a nice user interface.
Go ahead and Install DB Browser for SQLite, it's free.
Next Steps¶
Once you have DB Browser for SQLite installed, it's time to learn how to move from a spreadsheet to a database. 🚀