This book is about POSTGRESQL, the most advanced open source database. From its origins in academia, POSTGRESQL has moved to the Internet with explosive growth. It is hard to believe the advances during the past four years under the guidance of a team of worldwide Internet developers. This book is a testament to their vision, and to the success that POSTGRESQL has become.The book is designed to lead the reader from their first database query through the complex queries needed to solve real-world problems. No knowledge of database theory or practice is required. However, basic knowledge of operating system capabilities is expected, such as the ability to type at an operating system prompt.Beginning with a short history of POSTGRESQL, the book moves from simple queries to the most important database commands. Common problems are covered early, which should prevent users from getting stuck with queries that fail. The author has seen many bug reports in the past few years and consequently has attempted to warn readers about the common pitfalls.With a firm foundation established, additional commands are introduced. The later chapters outline complex topics like transactions and performance.At each step, the purpose of each command is clearly illustrated. The goal is to have readers understand more than query syntax. They should know why each command is valuable, so they can use the proper commands in their real-world database applications.