Book Image

Learning PostgreSQL 11 - Third Edition

By : Salahaldin Juba, Andrey Volkov
Book Image

Learning PostgreSQL 11 - Third Edition

By: Salahaldin Juba, Andrey Volkov

Overview of this book

PostgreSQL is one of the most popular open source database management systems in the world, and it supports advanced features included in SQL standards. This book will familiarize you with the latest features in PostgreSQL 11, and get you up and running with building efficient PostgreSQL database solutions from scratch. Learning PostgreSQL, 11 begins by covering the concepts of relational databases and their core principles. You’ll explore the Data Definition Language (DDL) and commonly used DDL commands supported by ANSI SQL. You’ll also learn how to create tables, define integrity constraints, build indexes, and set up views and other schema objects. As you advance, you’ll come to understand Data Manipulation Language (DML) and server-side programming capabilities using PL/pgSQL, giving you a robust background to develop, tune, test, and troubleshoot your database application. The book will guide you in exploring NoSQL capabilities and connecting to your database to manipulate data objects. You’ll get to grips with using data warehousing in analytical solutions and reports, and scaling the database for high availability and performance. By the end of this book, you’ll have gained a thorough understanding of PostgreSQL 11 and developed the necessary skills to build efficient database solutions.
Table of Contents (18 chapters)

Questions

  1. What is a CTE?
  2. Can one CTE use other CTEs?
  3. Can a CTE reference itself?
  4. How do we insert rows into several tables at once?
  5. Is there a way to specify the order of execution of CTEs?
  6. What is the difference between grouping and aggregation, and using window functions?
  7. How do we calculate a moving average of a field for each row, taking three rows before and three rows after?
  8. How do we calculate the difference between the value of a field in the current row and the average of the previous and the next rows for each row?
  9. Can window functions be combined with aggregating functions?
  10. What is the purpose of the DISTINCT ON clause?
  11. How do we get a sample of data from a database table?
  12. How do we get a sequence of numbers using a SELECT query?
  13. Can a subquery (not a CTE) refer to another subquery?
  14. How do we use several sets of expressions in a single GROUP BY clause?
...