PostgreSQL in Depth: From Basics to Practice cover

PostgreSQL in Depth: From Basics to Practice

No rating yet
Word count
685 words
Chapters
19
ISBN
9787121369018

Tags

Summary

This book is an introductory-to-intermediate hands-on tutorial on PostgreSQL, written for PostgreSQL 10 and organized around a "theory plus practice" approach. Through numerous runnable examples, it explains PostgreSQL's SQL features, parameter configuration, backup and recovery, performance tuning, server-side programming, and high-availability solutions. The book follows a five-part learning path. Part 1, "Preparation," introduces PostgreSQL's origins, basic concepts, architecture, major new features in version 10, and installation, startup, and shutdown on Windows and Linux. Part 2, "Getting Started," begins with creating databases and tables and then covers data types and operators, common functions, and querying, inserting, updating, and deleting data, including table joins, subqueries, fuzzy matching, and window functions. Part 3, "Advanced," explains indexes (including distinctive types such as GiST, SP-GiST, GIN, and BRIN), views and materialized views, triggers, table inheritance and declarative table partitioning, user privileges and schema management, server configuration management, and backup and recovery. Part 4, "Expert," discusses transactions, SQL statement optimization, server-side performance optimization, and PL/pgSQL programming. Part 5, "In Practice," presents high-availability solutions and examples of logical database design, closing with the complete design of a product management database. The book is clearly structured and rich in examples, with accompanying sample materials and source code. It suits database developers, operations and maintenance staff, and university students and teachers in related fields as a self-study tutorial or teaching reference.

Editor's review

PostgreSQL近年热度持续上升,但市面上系统、成体系的原创中文教程并不算多。这本书的两个作者屠要峰与陈河堆都有深厚的企业级数据库研发背景:前者长期主持分布式数据库、大数据系统的研发,后者是中兴通讯数据库平台首席专家、PostgreSQL中文社区核心组成员,因此书中对参数配置、服务端性能、高可用这些“真刀真枪”的话题讲得格外扎实。全书按“准备—入门—进阶—高阶—实战”五段递进,读者可以按顺序通读,也可以把某一篇当作手册查阅。值得一提的是它对PostgreSQL特色能力的覆盖:GiST、SP-GiST、GIN、BRIN等索引类型,表继承,10版本引入的声明式分区、物化视图与事件触发器,这些在MySQL类书籍中很少见到。全书实例数量可观并附源码,边敲边学效率更高。需要提醒的是,本书基于PostgreSQL 10编写,部分版本细节与最新版本已有差异,读者在实操时应对照官方文档核对,把它作为理解原理与方法的“骨架”更为合适。

Who it's for

A good fit for

  • 有一定SQL基础、希望系统学习PostgreSQL的开发人员
  • 需要负责数据库部署、备份恢复与性能调优的运维工程师
  • 正在从MySQL等数据库迁移到PostgreSQL的技术团队
  • 高校数据库课程的学生,以及讲授相关课程的教师

Not a good fit for

  • 完全没有编程和SQL基础的零起点读者
  • 只想查阅最新版本PostgreSQL官方语法速查手册的人
  • 专注数据库内核源码级实现研究的高级研发者

Reading tips

  1. 先按第1—6章顺序搭建环境、跑通示例,把基础语法与数据类型打牢,再进入进阶篇。
  2. 阅读索引、分区、优化三章时,建议开启执行计划分析,对照书中示例自行改参数观察效果。
  3. 把第18、19章当作项目模板,动手设计一个小型业务库,检验前面所学是否形成闭环。

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. Chapter 1 Getting Acquainted with PostgreSQL
  2. Chapter 2 Installing and Starting PostgreSQL
  3. Chapter 3 Creating Databases and Tables
  4. Chapter 4 Data Types and Their Operators
  5. Chapter 5 Functions
  6. Chapter 6 Querying and Modifying Data
  7. Chapter 7 Indexes
  8. Chapter 8 Views
  9. Chapter 9 Triggers
  10. Chapter 10 Table Inheritance and Table Partitioning
  11. Chapter 11 Managing User Privileges and Schemas
  12. Chapter 12 Configuring and Managing the Database Server
  13. Chapter 13 Backing Up and Restoring Data
  14. Chapter 14 Transactions
  15. Chapter 15 Optimizing SQL Statements
  16. Chapter 16 Optimizing Database Server Performance
  17. Chapter 17 PL/pgSQL Server-Side Programming
  18. Chapter 18 High-Availability Solutions
  19. Chapter 19 Designing a Product Management Database

FAQ

这本书基于哪个PostgreSQL版本?
据出版社与作者前言介绍,本书基于PostgreSQL 10版本编写。PostgreSQL版本迭代很快,涉及具体参数名、默认值和系统视图的部分可能与新版本存在差异,实践中请对照所使用的版本官方文档。
零基础可以直接读这本书吗?
不太建议。书中默认读者已经了解关系型数据库和基本SQL,第3—6章推进较快。完全零基础的读者最好先通过一门SQL入门课程建立概念,再回到本书系统学习PostgreSQL特性。
书中的实例有配套源码吗?
作者在前言中说明本书提供了全部实例的素材和源代码,共约139个实例。可以通过电子工业出版社的图书配套渠道或作者公开的技术分享渠道获取。
这本书适合作为高校教材吗?
可以。全书按五篇递进组织,章节边界清晰,并配有实例,出版社也将“高校学生和教师”列为适读人群。教学时可视课时情况选讲进阶与高阶部分。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category