Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Pavel Luzanov, Egor Rogov, Igor Levshin

Rating No ratings yet

This short pamphlet provides an overview of PostgreSQL DBMS, covering the history of its development, the main features, and a product roadmap. I you are just getting started, you can use this book as a step-by-step installation and configuration guide. We hope it will make your first experience with PostgreSQL more pleasant and help you blend into the PostgreSQL community. Contents at a glance: • PostgreSQL — what is it all about? • What’s new in PostgreSQL 15 • Installation on Linux and Windows • Connecting to a server, writing SQL queries, and using transactions • Learning the SQL language on a demo database • Using PostgreSQL with your application • Minimal server setup • About a useful pgAdmin application • Advanced features: full-text search, JSON format, and foreign data wrappers • Education and certification opportunities • Keeping up with all updates • About the Postgres Professional company

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
# Postgres: The First Experience — Reading Guide ## 【One-Line Pitch】 A practical, beginner-friendly introduction to PostgreSQL that takes you from installation through writing real SQL queries, with a focus on hands-on learning using a demo airline database. Ideal for developers, students, and IT professionals who want to get productive with the world's most advanced open-source database quickly. ## 【Book Arc】 - **Opening (~0%–10%)**: Introduces PostgreSQL's history from the POSTGRES project at UC Berkeley, explains its open-source development model, release cycles, and core features like ACID compliance, MVCC, and cross-platform support. Sets the stage for why PostgreSQL matters. - **Early (~10%–19%)**: Covers what's new in PostgreSQL 15 (MERGE command, NULLS DISTINCT, logical replication improvements, backup enhancements) and walks through installation on Linux and Windows, including locale setup and initial server configuration. - **Early (~19%–32%)**: Hands-on SQL fundamentals using a test database—creating tables, inserting data, writing SELECT queries with WHERE clauses, using aggregate functions with GROUP BY and HAVING, and understanding transactions through a practical example involving groups and monitors. - **Middle (~39%–48%)**: Introduces the demo airline database (bookings), explains its schema (airports, flights, boarding passes), and presents real-world query problems—finding delayed flights, computing flight durations, and using recursive CTEs for route planning. - **Late (~48%–end)**: Covers connecting PostgreSQL to applications, minimal server configuration, using pgAdmin, advanced features (full-text search, JSON, foreign data wrappers), education/certification paths, and staying current with PostgreSQL releases. ## 【Key Takeaways】 - **PostgreSQL is the most feature-rich open-source database** (Early): Born from Michael Stonebraker's POSTGRES project at UC Berkeley in 1985, it has evolved through community-driven development where patches are discussed on the pgsql-hackers mailing list and must pass code review before inclusion. - **The release cycle is predictable and community-governed** (Early): Major versions ship roughly annually (now single-numbered, e.g., PostgreSQL 15 in October 2022), with quarterly minor updates for bug fixes. Code stabilization happens about six months before release, and beta versions precede release candidates. - **PostgreSQL 15 brings meaningful SQL improvements** (Early): The MERGE command finally arrived after a failed attempt in version 11, NULLS [NOT] DISTINCT gives control over NULL handling in constraints, and logical replication now supports row/column filtering and schema-wide replication. - **Transactions are the backbone of data integrity** (Early): The book demonstrates atomicity, consistency, isolation, and durability (ACID) through a practical example—creating a group and assigning a monitor must happen atomically, and PostgreSQL's MVCC allows parallel reads/writes without blocking. - **The demo airline database is a powerful learning tool** (Middle): Available in small, medium, and large sizes (from 280 MB to 2.6 GB), it provides realistic flight data for practicing everything from basic SELECT queries to complex recursive CTEs for route finding. - **Recursive queries solve real routing problems** (Middle): The book shows how WITH RECURSIVE with CYCLE detection (new in PostgreSQL 14) finds shortest routes between airports, using hop arrays and window functions to prevent infinite loops. - **PostgreSQL extends beyond basic SQL** (Late): Full-text search, JSON/JSONB support, and foreign data wrappers make it suitable for modern applications requiring semi-structured data and integration with external systems. ## 【Reading Tips】 - **Skim the history and "What's New" chapters** (first ~15%): These are useful for context but not essential for hands-on work. Focus on the release cycle explanation and PostgreSQL 15 highlights if you're upgrading from an older version. - **Deep-read the installation and SQL fundamentals sections** (~19%–32%): Follow along with your own PostgreSQL instance. The psql commands (starting with backslash) are terminal-specific—if using pgAdmin, skip those and find GUI equivalents. - **Work through the demo database problems** (~39%–48%): Download the small demo database (21 MB) and attempt each query problem before reading the solution. The recursive CTE examples are challenging but rewarding—take time to understand the CYCLE clause and window functions. - **Pay attention to transaction examples**: The group/monitor example perfectly illustrates why transactions matter. Recreate it yourself and experiment with ROLLBACK to see atomicity in action. - **Skip or skim application integration and pgAdmin sections** if you're already comfortable with database connections and GUI tools—they're straightforward and better learned by doing. ## 【Coverage Limits】 The excerpts cover the book's first half thoroughly (history, installation, SQL basics, demo database problems) but provide limited detail on later sections like application integration, advanced features (full-text search, JSON, foreign data wrappers), and certification paths. The guide's coverage reflects this distribution. ##
Page 4
entific articles had been published that described the data model, POSTQUEL query language (SQL was not an accepted standard at the time), and data storage s...
View in text
Excerpt 2
queries, but you have to keep an eye on memory consumption. You can manage the size of the working table of a recursive query using the recursive_worktable_f...
View in text
Excerpt 3
le | postgres public | students | table | postgres (4 rows) Now let’s create a new group called “A-101,” move all the students into this group, and make Anna...
View in text
Excerpt 4
into account only those flights that have already arrived. As you can see, the time cushion between flights can reach 77 up to several days: round-trip ticke...
View in text
Excerpt 5
t never change the seq_page_cost value, which is set to 1). For example, the following setting is appropriate for SSD drives: random_page_cost = 1.2 It’s ver...
View in text
Excerpt 6
ie": "f", "Mark": "m", "Alex": "unknown" } } (4, 1451, '{ "status": "expelled" Let’s check that all the data is in place. For convenience, we will join the s...
View in text
Excerpt 7
Pages and row versions 3. Data snapshots 4. HOT upgrades 5. Vacuum 6. Autovacuum 7. Freezing Logging 8. Buffer cache 9. Write-ahead log 10. Checkpoints 11. W...
View in text
Excerpt 8
on is to browse through the email XII Postgres Professional The Postgres Professional company was founded in 2015; it unites key Russian developers whose con...
View in text
Tags
AI categories
DatabaseSQLBackend
ISBN: 5604597031
Publish Year: 2023
Language: English
Pages: 175
File Format: PDF
File Size: 10.4 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…