Getting Set Up
SQLite in two minutes.
There are many database programs, like MySQL, Postgres, and SQL Server. In this course we'll use SQLite. It's free, it's tiny, and the whole database lives in a single file. And the good news is that everything you learn works almost the same in the others.

- Many database programs
- We use SQLite: free and tiny
- Your skills carry over
Get ready in three steps
Getting ready takes three steps. First, install SQLite. On a Mac it's already there, and on Windows or Linux you download it from the SQLite website. Second, download the Riverside Books file, called shop dot DB, from the link in the description. Third, write your question in a text file, and run it.
- Install SQLitealready on a Mac
- Get shop.dblink in description
- Write and runa .sql file

Your very first run
Let's prove it works. This little file asks for the first five books. Don't worry about the words yet. We'll learn each one in a moment. In the terminal, we give SQLite the database, and feed it our file. Run it. And there's our first answer, as a neat table. You've just run SQL.
SELECT *
FROM books
LIMIT 5;โโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโโโ โ book_id โ title โ author โ genre โ price โ stock โ published โ โโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโค โ 1 โ The Silent Orchard โ Mira Hale โ Mystery โ 14.99 โ 58 โ 2016 โ โ 2 โ Code of the River โ Tom Avery โ Thriller โ 12.99 โ 26 โ 2021 โ โ 3 โ Stars Over Lagos โ Ada Obi โ Romance โ 9.99 โ 47 โ 2024 โ โ 4 โ A Short History of Bread โ Lena Fox โ History โ 19.99 โ 53 โ 2018 โ โ 5 โ Python for Curious Minds โ Raj Mehta โ Technology โ 34.99 โ 17 โ 2023 โ โโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโดโโโโโโโโดโโโโโโโโโโโโ
How every example works
Every example in this course works the same way. The question goes in a file that ends in dot SQL. Then you run SQLite with the database, and the file. The answer appears in the terminal. Pause the video whenever you like, and type the examples yourself. Typing them is how they stick.
Summary
You're all set up, and you've run your first query. Now let's understand it, word by word, starting with the most important word in SQL.
Key takeaways- SQLite: free and simple
- shop.db holds the data
- Write a file, run it, read it