Javarevisited

A humble place to learn Java and Programming better.

Member-only story

Why do we need a Database Connection Pool? -every programmer must know

--

Hello everyone. In this article, we are going to look at Database connections and their life cycle. Then we will look at the Connection Pool, its internals, and why we need to use it. Then we will look at the design patterns on where to place the connection pool. We will then look at the performance issues that can arise from the Database connection pool and conclude the article by looking at the common connection pool frameworks used in Java. Let's get started.

What is a Database Connection?

Any software application needs to store the data in a database and for the application to interact with a database server, we need a Database Connection. The Database connection is nothing but a way for the application software to interact with the database server software and we use the connection to send commands (SQL) to the database and obtain the response from the database in the form of a Result Set.

Image Source: https://softcover.s3.amazonaws.com/14738/python_book/images/connect_database3.jpg

The database application usually runs in a dedicated server called a database server which is different from the application servers. The database application runs in a specific port in the…

--

--

Javarevisited
Javarevisited

Published in Javarevisited

A humble place to learn Java and Programming better.

Dineshchandgr - A Top writer in Technology
Dineshchandgr - A Top writer in Technology

Written by Dineshchandgr - A Top writer in Technology

Principal Software Engineer and Technical Lead focussed on Backend Engineering who likes to upgrade the tech skills and share knowledge to the community

Responses (7)