#
Spring Data
There are many way we can make a connection for updating/querying a database:
we can use a
JDBC driver
directly. In this case, we need to write more code and to manage the connections.we can use
JdbcTemplate class
. This class uses a DataSource which can be configured in application.properties or in a Bean. This is a layer of abstraction over the JDBC. More information you have here.We can use
Java Persistence API
(JPA). This is a layer of abstraction over the JDBC. JPA is a specification. We have many implementations like Hibernate, EclipseLink, Spring DAO, TopLink. All are Object Relational Mapping (ORM) implementations. More information we have here.We can use
Spring Data
. Spring Data is an umbrella project consisting of independent projects which help us to access a database. Spring Data uses JDBC driver under the hood. More information we have here.
Under this Spring Data topic we have some examples in order to understand better what Spring Data is.