PostgreSQL Fundamentals
PostgreSQL is an open source object-relational database server. Applications use SQL to store related data in tables, enforce rules around that data, and retrieve or change it safely.
itDatabases and data storage | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — PostgreSQL Fundamentals
PostgreSQL is the bit of your system that remembers things with enough ceremony to prevent tomorrow's application from quietly disagreeing with today's. It is a running database server, not a convenient file hiding inside an application. Clients connect to it, speak SQL, and ask it to keep related data in a form that remains usable after several people and several programs have had ideas at once.
The first useful map is a nesting doll with paperwork. A server instance manages a cluster. The cluster contains databases. A database contains schemas. Schemas contain tables and other objects. A connection enters one database, which is why a table can be present, perfectly healthy, and still nowhere near the session asking for it. Computers enjoy boundaries. PostgreSQL has made several of them official.
A table is more than a spreadsheet that learned to live in a server room. Its columns have types, and its constraints decide which values and relationships count. Constraints are the rules that stay awake even when a second client, a bulk import, or an overconfident script turns up. A primary key identifies a row. A foreign key refuses a relationship to a row that does not exist. This is considerably less glamorous than fixing bad data afterward, which is why it works.
The next anchor is the transaction, a group of statements that commits together or rolls back together. That matters when one change without another would be nonsense, such as moving money between accounts. PostgreSQL also uses MVCC, its multiple-version concurrency model, so readers and writers can often work at the same time. The word “often” has been assigned a great deal of labor here: conflicting work can still wait, deadlock, or need a retry.
Queries have their own small parliament. FROM and JOIN create source rows. WHERE filters them. Grouping and aggregates calculate. ORDER BY requests a result order. Without that last request, an observed order is a coincidence wearing a tie. PostgreSQL’s planner then chooses an execution plan. An index can help it find rows, but it also costs storage and write work, and it does not issue orders to the planner. EXPLAIN is how you ask what was chosen.
Start with the Intro for the full client-to-server map. The Slides compress the relationships. The Cheatsheet keeps the commands and clause order close at hand. Then use the Practice Reference and exercise on a disposable database. After the model feels familiar, the Reference tab leads into transactions, concurrency, indexes, and the operational work that turns a database server into a dependable service.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.postgresql.org/about/
Supports
- PostgreSQL identity, open source status, object-relational model, SQL use, extensibility, and general fit
- 00-novice.md, 01-intro.md, 02-slides.md, and 07-video-script.md
- https://www.postgresql.org/docs/current/tutorial.html
Supports
- Official beginner study path and tutorial scope
- Intro competence route and PostgreSQL Tutorial link rationale
- https://www.postgresql.org/docs/current/tutorial-arch.html
Supports
- Client-server model, postgres server role, client types, connections, and concurrency
- Intro, slides, cheatsheet mental model, quiz hierarchy, and video script
- https://www.postgresql.org/docs/current/managing-databases.html
Supports
- Cluster and database boundaries
- Intro, slides, cheatsheet, quiz, and video script hierarchy
- https://www.postgresql.org/docs/current/ddl-schemas.html
Supports
- Schemas as namespaces inside a database
- Intro, slides, cheatsheet, quiz, and video script
- https://www.postgresql.org/docs/current/ddl-basics.html
Supports
- Rows, columns, data types, CREATE TABLE, and unspecified row order
- Intro, slides, cheatsheet, quiz, and video script
- https://www.postgresql.org/docs/current/datatype.html
Supports
- Built-in type categories and type behavior
- Intro, slides, cheatsheet, video script, and Data Types link rationale
- https://www.postgresql.org/docs/current/ddl-constraints.html
Supports
- Check, not-null, unique, primary-key, and foreign-key behavior
- Intro, slides, cheatsheet, foreign-key quiz, and video script
- https://www.postgresql.org/docs/current/dml.html
Supports
- INSERT, UPDATE, DELETE, and RETURNING study scope
- Intro, slides, cheatsheet, video script, and Data Manipulation link rationale
- https://www.postgresql.org/docs/current/queries.html
Supports
- Query clauses, table expressions, grouping, sorting, and common table expressions
- Intro, slides, cheatsheet, video script, and Queries link rationale
- https://www.postgresql.org/docs/current/tutorial-join.html
Supports
- Inner and outer join relationships and explicit JOIN syntax
- Intro, slides, cheatsheet, and video script
- https://www.postgresql.org/docs/current/tutorial-agg.html
Supports
- Aggregate results, GROUP BY, HAVING, and query processing order
- Intro, slides, cheatsheet, and video script
- https://www.postgresql.org/docs/current/functions-comparison.html
Supports
- NULL comparison behavior and IS NULL tests
- Intro, slides, cheatsheet, and video script
- https://www.postgresql.org/docs/current/tutorial-transactions.html
Supports
- Atomic transaction blocks, BEGIN, COMMIT, ROLLBACK, and savepoints
- Intro, slides, cheatsheet, transaction quiz, video script, and link rationale
- https://www.postgresql.org/docs/current/mvcc.html
Supports
- Isolation levels, locking, deadlocks, and retry-relevant concurrency behavior
- Intro, slides, cheatsheet, MVCC quiz, video script, and link rationale
- https://www.postgresql.org/docs/current/mvcc-intro.html
Supports
- Snapshots, multiple row versions, and reduced read-write contention
- Intro, slides, MVCC quiz, and video script
- https://www.postgresql.org/docs/current/indexes.html
Supports
- Index types, access paths, write overhead, and index applicability
- Intro, slides, cheatsheet, planner quiz, video script, and link rationale
- https://www.postgresql.org/docs/current/indexes-types.html
Supports
- B-tree default and supported equality and range strategies
- Intro, cheatsheet, planner quiz, and video script
- https://www.postgresql.org/docs/current/using-explain.html
Supports
- Planner costs, sequential scans, EXPLAIN, and EXPLAIN ANALYZE execution
- Intro, slides, cheatsheet, EXPLAIN quizzes, video script, and link rationale
- https://www.postgresql.org/docs/current/external-extensions.html
Supports
- Extension packaging and object types
- Intro, slides, cheatsheet, extension quiz, and video script
- https://www.postgresql.org/docs/current/sql-createextension.html
Supports
- Per-database extension loading and server availability requirement
- Intro, slides, cheatsheet, extension quiz, and video script
- https://www.postgresql.org/docs/current/app-psql.html
Supports
- psql connection form, backslash commands, and client role
- Cheatsheet commands and introductory practice path
- https://github.com/sindresorhus/awesome
Supports
- Discovery path to the PostgreSQL awesome list
- https://github.com/dhamaniasad/awesome-postgres
Supports
- Discovery and category relevance of all Awesome Links entries
- https://www.pgadmin.org/docs/
Supports
- pgAdmin administration, object inspection, query tool, and graphical EXPLAIN rationale
- https://pgcli.readthedocs.io/en/latest/
Supports
- pgcli interactive client, autocompletion, and syntax-highlighting rationale
- https://www.postgis.net/docs/index.html
Supports
- PostGIS spatial objects, indexes, analysis, and processing rationale
- https://pgbackrest.org/user-guide.html
Supports
- pgBackRest backup, restore, WAL, retention, encryption, and monitoring rationale
- https://www.postgresql.org/docs/current/history.html
Supports
- 10-timeline.yaml, PostgreSQL origins, Postgres95, naming, and early milestones
- https://www.postgresql.org/support/versioning/
Supports
- 10-timeline.yaml, release dates, current major-version scheme, and release cadence
- https://www.postgresql.org/docs/current/release-7-0.html
Supports
- 10-timeline.yaml, foreign keys and optimizer changes in PostgreSQL 7.0
- https://www.postgresql.org/docs/current/release-8-0.html
Supports
- 10-timeline.yaml, PostgreSQL 8.0 release and native Windows support
- https://www.postgresql.org/docs/current/release-9-0.html
Supports
- 10-timeline.yaml, streaming replication and Hot Standby
- https://www.postgresql.org/docs/17/routine-vacuuming.html
Supports
- 12-field-notes.yaml, vacuuming, transaction age, wraparound, and maintenance behavior
- https://www.figma.com/blog/post-mortem-service-disruption-on-january-21-22-2020/
Supports
- 12-field-notes.yaml, temporary relief from canceling autovacuum during a production incident
- https://aws.amazon.com/rds/postgresql/
Supports
- 11-products.yaml, Amazon RDS for PostgreSQL managed-service placement
- https://cloud.google.com/sql/postgresql
Supports
- 11-products.yaml, Cloud SQL for PostgreSQL managed-service placement
- https://azure.microsoft.com/en-us/products/postgresql/
Supports
- 11-products.yaml, Azure Database for PostgreSQL managed-service placement
- https://neon.com/
Supports
- 11-products.yaml, Neon hosted PostgreSQL placement
- https://supabase.com/
Supports
- 11-products.yaml, Supabase PostgreSQL application-platform placement
- https://www.crunchydata.com/products/crunchy-bridge
Supports
- 11-products.yaml, Crunchy Bridge managed-service placement
- https://docs.timescale.com/use-timescale/latest/extensions/
Supports
- 11-products.yaml, Tiger Data and PostgreSQL extension placement
