Part 5: Setting Up a Database Environment: PostgreSQL, MySQL & SQLite

Part 5 Technology Updated September 12, 2026

Part 5: Setting Up a Database Environment: PostgreSQL, MySQL & SQLite

To practice SQL effectively, having a working relational database environment is essential.


1. Option A: Instant SQLite (Zero Configuration)

SQLite requires no server daemon; it is a self-contained, serverless file:

# Verify SQLite on your machine:
sqlite3 devify_practice.db

2. Option B: Running PostgreSQL via Docker (Recommended)

Docker provides an isolated, production-grade database with a single command:

docker run --name devify-postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=devify_db \
  -p 5432:5432 \
  -d postgres:16

Connect via CLI:

docker exec -it devify-postgres psql -U postgres -d devify_db

3. Option C: Running MySQL via Docker

docker run --name devify-mysql \
  -e MYSQL_ROOT_PASSWORD=secret \
  -e MYSQL_DATABASE=devify_db \
  -p 3306:3306 \
  -d mysql:8.0

Key Takeaways

  • SQLite is ideal for lightweight embedded testing.
  • PostgreSQL and MySQL in Docker provide clean, reproducible production environments.

In Part 6, we explore Database Clients & GUI Tools: DBeaver, pgAdmin, MySQL Workbench & DataGrip!