SQL Glossary

Updated · 7 min read
easyPostgreSQL 18sqlglossaryreferenceassessment

Every term this course defines, in one alphabetical list, with a one-line meaning and the lesson that explains it. Use your browser's find (Ctrl+F or Cmd+F) to jump to a term, or browse by letter.

A

TermMeaningLesson
ACIDAtomicity, consistency, isolation, durability: the guarantees of a transactionACID
Aggregate functionA function that summarizes many rows into one value, such as sum or countAggregate Functions
AliasA temporary name for a column or table in a queryAliases
Anti-joinA query that keeps rows with no match in another tableEXISTS
AutocommitEach statement committed on its own unless a transaction is openTransactions

B

TermMeaningLesson
B-treeThe default index structure: a sorted tree that finds values quicklyIndexes
BackupA copy of a database you can restore fromBackup and Restore

C

TermMeaningLesson
CardinalityHow many rows on each side of a relationship (one-to-many); also the number of distinct valuesRelationships
Cartesian productEvery row paired with every row; what a CROSS JOIN returnsCROSS JOIN
Check constraintA rule every row must satisfyConstraints
CollationThe rules for sorting and comparing textORDER BY
ColumnOne attribute of a table, with a name and typeTables, Rows and Columns
Column storeStorage that keeps each column together; fast for analyticsSQL for Analytics
Common table expression (CTE)A named subquery written with WITHCommon Table Expressions
Composite keyA key made of more than one columnUNIQUE and PRIMARY KEY
Connection poolA set of open connections reused by many requestsReplication and Scaling
ConstraintA rule the database enforces on dataConstraints
Correlated subqueryA subquery that refers to the outer queryCorrelated Subqueries
CursorA pointer for reading a result set a few rows at a timeVariables, Control Flow and Errors

D

TermMeaningLesson
Data typeThe kind of value a column holdsSQL Data Types
DatabaseAn organized collection of data managed by a DBMSWhat Is a Database
DBMSDatabase management system: the software that runs a databaseWhat Is a Database
DDLData definition language: CREATE, ALTER, DROPWhat Is SQL
DeadlockTwo transactions each waiting for a lock the other holdsLocks and Deadlocks
DenormalizationStoring a fact more than once on purpose, to speed up readsDenormalization
DialectA database's version of SQL, with its extensionsThe SQL Standard and Dialects
Dimension tableIn a star schema, a table describing who, what or whenSQL for Analytics
DMLData manipulation language: SELECT, INSERT, UPDATE, DELETEWhat Is SQL

E

TermMeaningLesson
EntityA thing the database stores facts about, usually a tableData Modeling
ETLExtract, transform, load: moving data into an analytics storeSQL for Analytics
Execution planThe steps the database chooses to run a queryReading EXPLAIN

F

TermMeaningLesson
Fact tableIn a star schema, the table of events with measuresSQL for Analytics
FailoverPromoting a replica when the primary failsReplication and Scaling
Foreign keyA column that must match a key in another tableFOREIGN KEY

G

TermMeaningLesson
Generated columnA column computed from other columnsGenerated Columns and Domains

I

TermMeaningLesson
Identity columnA column the database numbers automaticallyAuto-Increment and Identity
IndexA structure that finds rows by column values quicklyIndexes
Isolation levelHow much concurrent transactions can see of each otherIsolation Levels

J

TermMeaningLesson
JoinCombining rows from tables by a conditionHow Joins Work
JSONBPostgreSQL's binary JSON typeJSON in SQL

K

TermMeaningLesson
Keyset paginationPaging by continuing after the last key seenPagination

L

TermMeaningLesson
LockA claim on a row or table that makes others waitLocks and Deadlocks

M

TermMeaningLesson
Materialized viewA view whose result is stored until refreshedViews
MigrationA versioned script that changes the schemaSchema Migrations
MVCCMulti-version concurrency control: readers see snapshots while writers create new versionsMVCC

N

TermMeaningLesson
N+1 problemOne query for a list, then one per itemORMs and Query Builders
NormalizationOrganizing tables so each fact is stored onceNormalization
NULLA missing or unknown valueNULL Values

O

TermMeaningLesson
OLAPAnalytical processing: big queries that summarize dataSQL for Analytics
OLTPTransaction processing: many small reads and writesSQL for Analytics
ORMObject-relational mapper: maps rows to objects in codeORMs and Query Builders

P

TermMeaningLesson
ParameterA placeholder for a value sent separately from the SQLParameters and Prepared Statements
PartitionA piece of a partitioned tablePartitioning
Primary keyThe column(s) that uniquely identify each rowUNIQUE and PRIMARY KEY
PrivilegePermission to do something, such as SELECT on a tableUsers, Roles and Privileges

Q

TermMeaningLesson
QueryA request to the database, usually a SELECTYour First Query

R

TermMeaningLesson
Recursive CTEA CTE that refers to itself, for trees and sequencesRecursive CTEs
Referential integrityEvery foreign key points to a row that existsFOREIGN KEY
RelationThe formal name for a tableTables, Rows and Columns
ReplicaA read-only copy that follows the primaryReplication and Scaling
RoleA user or group that owns privilegesUsers, Roles and Privileges
RowOne record in a tableTables, Rows and Columns
Row-level securityPolicies that limit which rows each user seesRow-Level Security

S

TermMeaningLesson
SavepointA point inside a transaction you can roll back toTransactions
SchemaThe structure of a database; also a namespace for tablesCreating a Database
Self joinJoining a table to itselfSelf Join
SequenceAn object that hands out increasing numbersAuto-Increment and Identity
ShardingSplitting data across several serversReplication and Scaling
SQL injectionAn attack that changes a query through unsafe inputSQL Injection
Star schemaA fact table surrounded by dimension tablesSQL for Analytics
Stored procedureA routine stored in the database and run with CALLStored Procedures
SubqueryA query inside another querySubqueries
Surrogate keyA generated id with no business meaningChoosing Keys

T

TermMeaningLesson
TableRows and columns holding one kind of thingTables, Rows and Columns
TransactionA group of statements that succeed or fail togetherTransactions
TriggerCode that runs automatically when rows changeTriggers
TupleThe formal name for a rowTables, Rows and Columns

U

TermMeaningLesson
UpsertInsert a row, or update it if the key existsUpsert and MERGE

V

TermMeaningLesson
VACUUMPostgreSQL maintenance that cleans up dead row versionsMVCC
ViewA saved query you select from like a tableViews

W

TermMeaningLesson
WALWrite-ahead log: changes recorded before data files, for crash safety and replicationTransactions
Window functionA function computed over related rows that keeps every rowWindow Functions

Was this tutorial helpful?