Skip to content
AgileLogics
4 min read

Setting Up: Your First Database

Prerequisites: Relational databases: tables, rows, and keys

You need a database and a way to type queries into it. The quickest start is SQLite: a complete database stored in a single file, with nothing to configure.

Option 1: DB Browser for SQLite (easiest)

Download the free DB Browser for SQLite (sqlitebrowser.org). Create a new database file, open the Execute SQL tab, type a query, and press Ctrl + Enter (⌘ + Return on macOS). Results appear as a table below.

Option 2: The sqlite3 command-line tool

Download the sqlite-tools bundle from sqlite.org (it's already included with macOS and most Linux systems), then:

sqlite3 shop.db
SQLite version 3.53.4 2026-07-24 19:02:57
Enter ".help" for usage hints.
sqlite> .mode table
sqlite> SELECT 1 + 1 AS answer;
+--------+
| answer |
+--------+
| 2      |
+--------+

Commands starting with a dot (.mode table, .tables, .schema, .quit) are SQLite tool commands, not SQL. This course's example output uses .mode table and .nullvalue NULL.

Option 3: A full database server

To practice with PostgreSQL (recommended for real projects) or MySQL, install them from their websites or run them in Docker, and use a client such as DBeaver (free, works with every database), pgAdmin, or MySQL Workbench.

No installation at all

Online playgrounds such as DB Fiddle (db-fiddle.com) and SQLime run SQL in the browser — useful for trying the examples in these lessons.

Every statement ends with a semicolon

A semicolon marks the end of a statement. Some tools run a single statement without one, but always ending with ; avoids confusion when you run several statements together.