liveBook · Manning

Database connection

As explained in Spring Start Here, Second Edition

A database connection is an active communication link between an application and a database server.

A database connection is an active communication link between an application and a database server. A data source manages these links, providing connections when needed and reusing them to avoid unnecessary network setup. section 12.1

Requesting a connection with JDBC

Connection con = DriverManager.getConnection(url, username, password); section 12.1

Figure 12.2 The data source is a component that manages connections to the database management systems (DBMS). The data source uses the JDBC driver to get the connections it manages. The data source aims to improve the app’s performance by allowing its logic to reuse connections to the DBMS and request new connections only when it needs them. The data source also makes sure to close the connections when it releases them.

See how the data source obtains, reuses, and releases connections between application logic and the DBMS. section 12.1

How Spring Start Here, Second Edition covers it

How deep it goes
Defines connections and explains data-source reuse, but does not detail connection internals.
Examples
Shows a JDBC DriverManager call that requests a connection using a URL and credentials.
What you can do after
Understand how applications request and reuse database connections through a data source.
How it connects
Connects database connections to data sources, JDBC, JDBC drivers, and database management systems.

Also explained in

Compare how 7 books explain database connection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.