Skip to main content

SQLab

SQL adventure builder logo

An SQLab adventure is a text-based game where the player evolves through a series of isolated or interconnected puzzles by crafting SQL queries.

It consists in a standalone database encompassing the core dataset, a handful of stored procedures, and a table of encrypted messages (such as narrative elements, puzzle statements, answers, explanations, etc.).

There is no requirement to wrap a dedicated application around this database to “run” the game. It can be played on any generic GUI such as DBeaver, phpMyAdmin, pgAdmin, or directly in a command-line interface.

Each question comes with a unique formula, for example, salt_042(sum(hash) OVER ()). Appended to the SELECT clause, this formula calculates a decryption token, which may unlock the next episode or, if the query is incorrect, a tailored hint (assuming the game's creator has provided one).

In an educational context, this setup enables the students to learn and practice SQL without constant oversight. The instructor might stave off boredom by logging their queries and injecting new hints as needed, improving the game for all involved.

Examples on GitHub

Game Pitch Versions DBMS Included
SQLab Island An adaptation of SQL Island by Johannes Schildgen English MySQL, PostgreSQL, SQLite Sources + SQLab database
SQLab Sessform A set of independent exercises + Mortelles Sessions, a police investigation on a training company French MySQL, PostgresQL SQLab database
SQLab Corbeau An original adaptation of the movie Le Corbeau by Henri-Georges Clouzot (1943) French MySQL Sources + SQLab database
SQLab Club An adaptation of PostgreSQL Exercises by Alisdair Owens English PostgreSQL Sources + SQLab database (coming later)

How can I create my own SQLab adventure?

The sqlab command-line tool is not required to play, but is necessary to create a new adventure.

pip install sqlab

The documentation is not yet available. In the meantime, you may explore the repository of SQLab Island. The provided dataset and Jupyter notebooks serve as source material for the generation of the SQLab database.

Metadata

Release files for sqlab 0.6.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlab 0.6.6
File Size Uploaded
sqlab-0.6.6.tar.gz 39.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlab 0.6.6
File Interpreter ABI Platform
sqlab-0.6.6-py3-none-any.whl Python 3 none any Details

Total release size: 89.1 kB

Release files / sqlab-0.6.6.tar.gz

Download URL sqlab-0.6.6.tar.gz
Size 39.1 kB
Tags Source
SHA-256 checksum
How to use checksums
35ec3ef1877497c2ae75bd5ee010b339c610acf1e143273635135b284f2253e9
BLAKE2b-256 checksum
How to use checksums
1a28398cba96218ef7112f612c31a1bb800a8791a43d729c35bb3870ac81d2ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.13 Darwin/24.3.0

Release files / sqlab-0.6.6-py3-none-any.whl

Download URL sqlab-0.6.6-py3-none-any.whl
Size 50.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cfbfa7048c7edcdddb409c35df2f5c3d1374580aae14eff9dc6045bff0c3ae1
BLAKE2b-256 checksum
How to use checksums
9447d17998a68dbc41df3cd5b7daa1489aa63dce291d265fe19eeb04bd2b07ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.13 Darwin/24.3.0

Release history Release notifications | RSS feed

This release

0.6.6 This release

2 release files

0.6.5

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page