Book Image

Developing Modern Database Applications with PostgreSQL

By : Dr. Quan Ha Le, Marcelo Diaz
Book Image

Developing Modern Database Applications with PostgreSQL

By: Dr. Quan Ha Le, Marcelo Diaz

Overview of this book

PostgreSQL is an open-source object-relational database management system (DBMS) that provides enterprise-level services, including high performance and scalability. This book is a collection of unique projects providing you with a wealth of information relating to administering, monitoring, and testing PostgreSQL. The focus of each project is on both the development and the administrative aspects of PostgreSQL. Starting by exploring development aspects such as database design and its implementation, you’ll then cover PostgreSQL administration by understanding PostgreSQL architecture, PostgreSQL performance, and high-availability clusters. Various PostgreSQL projects are explained through current technologies such as DevOps and cloud platforms using programming languages like Python and Node.js. Later, you’ll get to grips with the well-known database API tool, PostgREST, before learning how to use popular PostgreSQL database testing frameworks. The book is also packed with essential tips and tricks and common patterns for working seamlessly in a production environment. All the chapters will be explained with the help of a real-world case study on a small banking application for managing ATM locations in a city. By the end of this DBMS book, you’ll be proficient in building reliable database solutions as per your organization's needs.
Table of Contents (17 chapters)
1
Section 1 - Introducing PostgreSQL Development and Administration
3
Section 2 - Development in PostgreSQL
9
Section 3 - Administration in PostgreSQL

Exploring the free admin functionality

The Django administration provides support for us to perform viewing, updating, adding new, and deleting ATM location records. To carry out these tasks, perform the following steps:

  1. Click onto the ATM locations link; it will open 654 data objects, as shown in the following screenshot:

Figure 4.19 – Using the admin interface
  1. Next, click on any of the data objects. Then, the details of its ATM will appear, as shown in the following screenshot:

Figure 4.20 – Viewing an ATM location
  1. Now we will modify BankName to Citibank NA and then click on the SAVE button. We will get a confirmation message after we have saved the new bank name, as shown in the following screenshot:

Figure 4.21 – Changing an ATM location
  1. In the preceding screen of ATMapp (Figure 4.20), if you click on the HISTORY button, you can view the history of all the actions that have happened to that ATM, as shown in the following...