DEV Community

Arunesh Choudhary
Arunesh Choudhary

Posted on

1

01 - Understanding the Database Structure

Relational database management system PostgreSQL, sometimes referred to as Postgres, is free and open-source and places a strong emphasis on extensibility and SQL compliance. The Apache AGE team uses openCypher's flexibility to construct a graph database.

This blog post contains excerpts from Hironobu SUZUKI's book "Internals of Postgres," which he wrote.

The distinct database structure of PostgreSQL will be outlined in the sections that follow.

Logical structure

A group of databases run by a PostgreSQL server constitute a database cluster in this database management system. In a previous article, I used the commands bin/pg_ctl -D test -l logfile start and bin/createdb testdb to launch a database cluster called test and create a database within the same post. Different databases may be included in a database cluster. The illustration that follows, taken from "Internals of Postgres," explains things better.

image

Physical Structure

A database cluster is represented physically by a base directory that includes subdirectories that stand in for the different databases. A variety of database items linked to each of these databases can be found in each of these subdirectories. Individual Object Identifiers (OIDs) are used to manage smaller tables and indexes, whereas the variable "relfilenode" is used to manage data files. However, a new relfilenode is made to manage it when the size surpasses 1GB.

Closing remarks

It is essential to appreciate the logical structure of a database cluster in order to understand the links between the databases and database objects that make up the cluster.

People can learn more about the precise locations of files thanks to the physical organization of the database, which makes database manipulation and management simpler.

References

https://www.interdb.jp/pg/pgsql01.html

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DreamFactory generates live REST APIs from database schemas with standardized endpoints for tables, views, and procedures in OpenAPI format. We support on-prem deployment with firewall security and include RBAC for secure, granular security controls.

See more!

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay