Database connection pooling: Overview and benchmark with Go

A wise man said: “If you want to go to the backend, the database is a part that cannot be ignored.” Well, Let’s talk about optimizing database performance on my blog, connection pooling should be the suitable first candidate. So what is connection pooling? How to use the connection pool? Just take a cup of…

The era of serial number IDs is over!

ID is important! ID is so important! I have to mention it twice, as the word, IDs play a crucial role in uniquely identifying records in a database. An ID must be unique in the system, and there are many strategies to generate a unique ID, but not all of them are good for the…

Calculate the Depth of a Hierarchy using Postgres recursive query

In this tutorial, you will learn about PostgreSQL recursive queries that use recursive common table expressions (CTEs) to generate the depth of a hierarchy. Introduction to the PostgreSQL Recursive Query PostgreSQL includes the WITH statement, which allows you to create auxiliary statements for use in queries. These statements are frequently referred to as common table…

The ACID properties in SQL database

When creating a SQL database, one of the most important elements to consider is its acid properties. Acid stands for Atomicity, Consistency, Isolation, and Durability. These four properties help ensure that any data stored in the database is safe and will remain consistent no matter what changes occur.