SQL Glossary
Short definitions of terms from SQL Arena lessons and tasks. In lessons, these terms have dotted underlines. Hover over or click one to see the same definition.
A
- ACID
- The four guarantees of a transaction are Atomicity (all or nothing), Consistency (the database’s rules are preserved), Isolation (concurrent transactions do not interfere with one another), and Durability (data survives a failure after COMMIT).
- Aggregate function
- An aggregate function reduces many rows to one value, as COUNT, SUM, AVG, MIN, and MAX do.
- Alias
- An alias is a temporary short name for a column or table in a query, assigned with AS, as in users AS u.
- Anti-join
- An anti-join keeps only rows from one table that have no match in another, usually with NOT EXISTS or LEFT JOIN ... IS NULL.
- Anti-pattern
- An anti-pattern is a common solution that seems convenient but leads to performance or maintenance problems in practice.
- Atomicity
- Atomicity is the all-or-nothing property of a transaction: either all of its operations are applied or none of them are.
- Autocommit
- Autocommit is a mode where each individual statement is immediately committed as its own transaction without an explicit COMMIT.
- Autovacuum
- Autovacuum is a PostgreSQL background process that automatically removes dead row versions and updates statistics so tables do not bloat.
B
- B-tree
- A B-tree is a balanced tree used as the main index structure, reaching the needed rows from the root in just a few steps.
- B2B
- Business-to-business is a model where a company sells products or services to other companies rather than to individual consumers.
- BI tool
- A BI tool is a business intelligence program such as Metabase, Tableau, or Power BI that builds reports and dashboards from database data.
- Bloat
- Bloat is wasted space in a table or index caused by dead row versions that accumulate after UPDATE and DELETE.
C
- C locale
- The C locale is the simplest database locale, sorting strings by raw bytes rather than language rules, which makes comparisons fast and lets text indexes work for LIKE 'prefix%' queries.
- Cardinality
- Cardinality describes a relationship by the number of matching rows: one-to-one (1:1), one-to-many (1:N), or many-to-many (N:M).
- Cartesian product
- A Cartesian product pairs every row from one table with every row from another, often by accident when a JOIN has no condition, producing a very large result.
- Cohort
- A cohort is a group of users who share an event during the same period, such as everyone who signed up in March, so their behavior can be compared over time.
- Constraint
- A constraint is a rule the database enforces on a column or table, such as NOT NULL, UNIQUE, CHECK, or a foreign key, rejecting data that breaks it.
- Conversion rate
- Conversion rate is the share of users who move from one step to the next, such as from a visit to a purchase, usually expressed as a percentage.
- Cost
- Cost is an abstract number in an execution plan that the planner uses to estimate how expensive a query is and choose the cheapest way to run it.
- Cost Price
- What a product or service costs to buy, produce, or deliver, before markup. Margin is the selling price minus the cost.
- CTE
- A Common Table Expression is a named temporary subquery created with WITH that breaks a complex query into readable steps.
D
- Dashboard
- A dashboard is a screen of charts and metrics that gives an at-a-glance view of a business or system using data from the database.
- Data mart
- A data mart is a prepared table built for a specific report or team so analysts do not have to recompute everything from raw data each time.
- Data warehouse (DWH)
- A data warehouse is a separate database that combines data from different sources for analytics and reporting without putting load on the production database.
- Database dump
- A database dump is a copy of a database exported to a file, including its schema and data, that can be used to restore it.
- Database schema
- A database schema is the structure of a database, including its tables, columns, types, and relationships.
- Dataset
- A dataset is a collection of data treated as one unit, such as a query result or a table loaded for analysis.
- DBMS
- A database management system is a program such as PostgreSQL, MySQL, or ClickHouse that stores data and answers SQL queries.
- DDL
- Data Definition Language is the set of commands that describe database structure, such as CREATE, ALTER, and DROP TABLE.
- Deduplication
- Deduplication removes duplicate rows so each record remains only once, using tools such as DISTINCT, GROUP BY, or ROW_NUMBER.
- Dimension
- A dimension is an attribute used to break down metrics in analytics, such as date, country, or channel, showing the categories by which totals and counts are calculated.
- DML
- Data Manipulation Language is the set of commands that work with the data itself, such as INSERT, UPDATE, DELETE, and SELECT.
E
- ER diagram
- An Entity-Relationship Diagram is a diagram of database tables and the relationships between them.
- Execution plan
- An execution plan is the step-by-step strategy the database chooses for a query, including which indexes and joins to use and in what order.
- EXPLAIN
- EXPLAIN shows a query’s execution plan, while EXPLAIN ANALYZE also runs the query and adds actual timing and row counts.
F
- Fan-out
- Fan-out is the growth in result rows when a one-to-many JOIN returns each source row once for every matching row.
- Foreign key
- A foreign key is a column that references another table’s primary key, linking rows such as orders.user_id → users.id.
- Full-text search
- Full-text search finds words inside text while accounting for word forms and ranking relevance instead of requiring an exact string match.
- Functional dependency
- A functional dependency means that the value of one column uniquely determines the value of another, such as an order id always determining its date.
- Funnel
- A funnel is a sequence of user steps, such as view → cart → purchase, where some users drop off at each stage.
G
- Granularity
- Granularity is the level of detail represented by one row of data, such as a single purchase, one day, or an entire month.
H
- Hash join / merge join
- Hash join and merge join are ways to combine two tables in a query plan: a hash join builds a hash table on one input and looks up matches, while a merge join combines two inputs that are already sorted.
- Hash table
- A hash table is a structure that finds a value by key through a hash function, and databases use it for fast joins and grouping with hash aggregation.
I
- IDENTITY column
- An IDENTITY column automatically numbers rows by generating the next value each time a row is inserted with GENERATED ... AS IDENTITY.
- Idle in transaction
- Idle in transaction is a connection state where a transaction has been opened with BEGIN but is doing nothing and has not been closed with COMMIT or ROLLBACK, so it keeps locks and can block other work.
- Index
- An index is a sorted structure, usually a B-tree, that helps find rows by a column value without reading the entire table.
- Inlining
- Inlining is when the planner places a subquery or CTE directly into the main query instead of treating it as a separate step, which often produces a faster plan.
- Invariant
- An invariant is a rule that must always remain true in the data, such as an account balance never being negative, and the database protects it with constraints and transactions.
J
- JOIN
- A JOIN combines rows from two tables when their values, usually keys, match so their data appears in one result.
- JSON
- JSON is a text data format shaped like {"key": value} that can represent flexible, nested structures.
- jsonb
- jsonb is a PostgreSQL column type that stores JSON in binary form and supports indexes and fast field lookups.
L
- Literal
- A literal is a value written directly in a query rather than calculated, such as the number 42, the string 'Moscow', or the date DATE '2026-01-01'.
- LTV
- Lifetime Value is the total profit one customer brings in over the entire time they use the product.
M
- Margin
- Margin is the difference between the selling price and the cost of goods, showing how much you actually earn from a sale and often expressed as a percentage of the price.
- Materialization
- Materialization is when the database computes a subquery, such as a CTE, once and stores the result in a temporary table instead of recalculating it each time it is used.
- Metadata
- Metadata is data about the database itself, including descriptions of its tables, columns, and types that can be read through information_schema.
- Migration
- A migration is a numbered script, usually using ALTER or CREATE, that changes the database structure step by step in a repeatable way.
- MVCC
- Multiversion Concurrency Control is PostgreSQL’s mechanism that lets readers and writers avoid blocking one another while each sees a consistent snapshot of the data.
N
- N+1
- N+1 is an anti-pattern where code sends one extra database query for every row in a result instead of using a single query.
- Normalization
- Normalization means bringing things into a consistent form: in a database schema, splitting data across tables so each fact is stored in one place, and in the data itself, storing values in one format for case, spaces, dates, and similar details.
- NoSQL
- NoSQL refers to families of non-relational databases, including key-value, document, columnar, and graph databases, that do not use a strict tabular schema.
- NULL
- NULL is a special marker for no data, not zero or an empty string, showing that a value is missing or unknown.
O
- OLAP
- Online Analytical Processing means running heavy analytical reads and aggregations over large amounts of historical data, and is typical of columnar databases such as ClickHouse.
- OLTP
- Online Transaction Processing means handling many short read and write operations, such as placing orders, and is typical of row-oriented databases such as PostgreSQL.
- Optimization fence
- An optimization fence is a boundary in a query that the planner cannot look through or push conditions across, such as a separately computed part that cannot be merged with the rest.
- ORM
- Object-Relational Mapping is a library that represents table rows as objects in a programming language and generates SQL automatically.
P
- Padding
- Padding adds characters to the left with LPAD or the right with RPAD until a string reaches a target length, such as adding zeros to align numbers.
- Pagination
- Pagination returns a result in page-sized chunks using LIMIT/OFFSET to skip N rows and take M, or more quickly with keyset pagination starting after the last shown key.
- Parser
- The parser is the part of a DBMS that first receives SQL text, checks its syntax, and turns it into a tree for further processing.
- Planner
- The planner is the part of a DBMS that builds possible execution plans for a query and chooses the cheapest one, including which indexes to use and in what order.
- Planner statistics
- Planner statistics are estimates of how values are distributed across columns, collected by ANALYZE and used by the planner to choose the cheapest way to run a query.
- PostgreSQL extension
- A PostgreSQL extension is an add-on module that adds new types, functions, or indexes, such as pg_trgm or postgis, through CREATE EXTENSION.
- Predicate pushdown
- Predicate pushdown is an optimization that applies a filter as early and as close to the data as possible so fewer rows need to be processed later.
- Primary key
- A primary key is a column, usually id, that uniquely identifies each row in a table.
- Production
- Production is the live environment where the real application runs with real users and data, unlike a test environment.
Q
- Quantile
- A quantile is a value below which a given fraction of the data falls, such as the median at 0.5, and PostgreSQL calculates it with PERCENTILE_CONT.
R
- Referential integrity
- Referential integrity is a database rule that every foreign key must point to a row that actually exists, preventing dangling references.
- Replica
- A replica is a synchronized copy of a database that often handles reads and analytics to reduce load on the primary database.
- Retention
- Retention is the share of users who return to a product after some time has passed since their first visit.
- RFM
- RFM segments customers by Recency, how recently they bought; Frequency, how often they bought; and Monetary, how much they spent.
S
- Sargability
- Sargability means writing a condition with the indexed column left bare, without a function around it, so the database can use the index.
- Selectivity
- Selectivity describes the share of table rows that pass a filter: the smaller the share, the higher the selectivity and the more useful an index tends to be.
- Semi-join
- A semi-join only checks whether a matching row exists in another table, usually with EXISTS or IN, without adding that table’s columns to the result.
- Sequential scan
- A sequential scan reads the entire table without using an index, which is fine for small tables but expensive for large ones.
- Serialization failure
- A serialization failure is a transaction rollback with SQLSTATE 40001 that occurs at the Serializable level when concurrent transactions conflict in an incompatible way, and the transaction must be retried.
- SLA
- A Service Level Agreement is an agreement that records promised service metrics, such as response time or uptime percentage.
- Snapshot
- A snapshot is a copy of a database’s state at a particular point in time, like a photograph of the data.
- SQL dialect
- A SQL dialect is a DBMS-specific version of SQL: the core language is shared, but some functions and syntax differ, as in PostgreSQL versus MySQL.
- SQL standard
- The SQL standard is the official ANSI/ISO specification of SQL, which each DBMS supports only partly and extends in its own way.
- SQLSTATE
- SQLSTATE is a standard five-character SQL error code, such as 23505 for a unique violation, that is the same across different DBMSs.
- Staging table
- A staging table is a temporary intermediate table where raw data is first loaded, checked, and cleaned before being moved into the main tables.
- Subquery
- A subquery is a SELECT nested inside another query whose result is used as a value, a list, or a temporary table by the outer query.
T
- Three-valued logic
- Three-valued logic is SQL’s system of TRUE, FALSE, and UNKNOWN, where comparisons with NULL return UNKNOWN and only rows with TRUE pass a filter.
- Tie-breaker
- A tie-breaker is an extra column in ORDER BY that sets the order of rows with the same first sort key so the result is predictable.
- Time series
- A time series is data where every record has a timestamp and rows are ordered by increasing time, such as prices or metrics recorded by the minute.
- Top-N
- Top-N means the first N rows by sort order or rank, such as the 10 most expensive orders returned with ORDER BY ... LIMIT 10.
- Transaction
- A transaction is a group of operations the database treats as one unit: either all of them are applied or none of them are.
- Trigger
- A trigger is a function the database runs automatically when INSERT, UPDATE, or DELETE occurs on a table.
- Trigram index
- A trigram index from the pg_trgm extension splits text into three-character chunks to speed up pattern searches such as LIKE '%...%'.
U
- UPSERT
- UPSERT means INSERT ... ON CONFLICT DO UPDATE: insert a row, or update it if that row already exists.
- UTC
- Coordinated Universal Time is a single time standard without time zones that is convenient for storing timestamps.
- UUID
- A Universally Unique Identifier is a 128-bit identifier, such as 550e8400-e29b-…, that can be unique without a central counter.
- UX
- User Experience describes how convenient and clear a product is for the person using it.
V
- VACUUM
- VACUUM is a PostgreSQL command that removes dead, obsolete row versions and frees space, while VACUUM FULL also physically compacts the table.
- View
- A view is a saved SELECT that you query like a table; it stores no rows of its own and is recomputed each time it is used.
- Volatile default
- A volatile default is a default value produced by a changing function such as now() or random(), recalculated for every inserted row.
W
- WAL
- Write-Ahead Log is a log where the database records a change before applying it, so after a crash the log can be replayed without losing the data.
- Window function
- A window function uses OVER, often with PARTITION BY, to calculate across a group of rows without collapsing them, so every row remains in the result.