FeaturesLearnPersonalOSINTThreat MapConsoleDailyShopAccount
[ DATA ]// databases & sql

Databases.

How structured data really works — tables, keys, JOINs, normalization and ACID — then prove it in a live in-browser SQL sandbox against a fake hacker-alias database. Nothing leaves your machine.

What is a database?

A database stores information in tables. Each table is a grid: columns define what kind of data is stored, rows are individual records, and a primary key uniquely identifies each row. Click any header, row, or the key column below to inspect it.

id PKaliascountrythreat
Tip: the id column is the primary key — no two rows share the same id.

Column

A vertical field with one type of value — e.g. every value in country is a country code. Schemas define a type per column (text, integer, date…).

Row

One complete record — a single operative with all their attributes. Also called a tuple.

Primary key

A column whose value is unique for every row, so any record can be addressed exactly. Often an auto-incrementing id.

Query

A question you ask the database in SQL. SELECT alias FROM operatives means “give me the alias column from the operatives table.” Try it in the sandbox below.

Relationships & JOINs

Real data is split across tables to avoid repetition. A foreign key (here operatives.crew_id) points at another table's primary key (crews.id). A JOIN stitches them back together. Pick a concept to light up the schema:

operatives

id (PK)
alias
country
crew_id (FK)
threat

crews

id (PK)
name
base
founded

tools

id (PK)
operative_id (FK)
name

Transactions & ACID

A transaction groups statements so they all succeed or all roll back. The guarantees are ACID:

AAtomicity — all or nothing.
CConsistency — rules always hold.
IIsolation — concurrent txns don't collide.
DDurability — committed data survives crashes.

Query optimization

The planner rewrites your query and picks how to execute it. An index turns an O(n) full table scan into an O(log n) lookup. Filter early, select only needed columns, and avoid functions on indexed columns in WHERE.

EXPLAIN plans

Run EXPLAIN before a query to see the strategy — Seq Scan (slow, reads everything) vs Index Scan (fast). Try EXPLAIN SELECT * FROM operatives WHERE id = 3 in the sandbox.

[ RUN ]// sql sandbox — live, in-browser
hacker_intel.db — 3 tables · 100% client-side
Examples:

Supports SELECT · WHERE · JOIN · GROUP BY · ORDER BY · LIMIT · subqueries · COUNT/AVG/SUM/MIN/MAX · LIKE · IN · EXPLAIN. Cross-links: base converter · how bits work.