Install DB Browser and open the practice database

Set up a free SQL tool in five minutes and look around the PsalmEdu Mart database.

Module 1: Getting started · Lesson 2 of 26 · 14 min read · Free

Install DB Browser for SQLite

  1. Go to sqlitebrowser.org → Download.
  2. Windows: choose the Standard installer for 64-bit Windows. Mac: the .dmg. Linux: your package manager (sqlitebrowser).
  3. Install with the default options and open DB Browser for SQLite.

Open the practice database

  1. Download psalmedu-shop.db (below this lesson). Keep it somewhere you'll find it, e.g. Documents\SQL course.
  2. In DB Browser: File → Open Database (or Ctrl+O) → choose the file.
DB Browser for SQLite

Three tabs you'll use

  1. Database Structure — every table and its columns, with their data types. Click ▸ next to a table to expand it.
  2. Browse Data — look at a table like a spreadsheet. Pick the table from the drop-down; click a column heading to sort; type in the filter row under the headings to filter.
  3. Execute SQL — where you write queries. Type, then run with Ctrl+Return, F5 or the ▶ button. Results appear underneath, with a message such as 400 rows returned, or an error explaining what went wrong.

Look around

The database has seven tables:

TableOne row per…
branchesshop branch (6)
customersregistered customer (400)
productsproduct on sale (30)
staffemployee (25)
ordersorder (3,000)
order_itemsproduct line within an order (about 6,400)
paymentspayment for a delivered order

Check yourself

Answer in your head first, then open each question to see the answer and why.

  1. Which tab in DB Browser do you use to write and run queries?

    • A Database Structure
    • B Browse Data
    • C Execute SQL
    • D Edit Pragmas
    Show the answer

    C) Execute SQL — Execute SQL holds the editor and results.

  2. Which shortcut runs the query in DB Browser?

    • A Ctrl+S
    • B Ctrl+Return (or F5)
    • C Ctrl+O
    • D Alt+F4
    Show the answer

    B) Ctrl+Return (or F5) — Ctrl+Return or F5 executes the SQL.

  3. Why is SQLite convenient for learning?

    • A It is the fastest database
    • B The whole database is one file, with no server to install
    • C It only works on Windows
    • D It doesn't use SQL
    Show the answer

    B) The whole database is one file, with no server to install — SQLite needs no server — you just open the file.

More free lessons: What SQL is, and why employers want it · WHERE: only the rows you need · COUNT, SUM, AVG, MIN and MAX · INNER JOIN: combine two tables · CASE: if-then logic inside a query · INSERT, UPDATE and DELETE — safely · From a business question to an answer