We will try to understand one of the Java certification exam objectives. JDBC stands for java database connectivity. Let’s find out how we can access databases using Java.
JDBC vs JPA
JDBC is bit old fashioned and helps you accessing data as rows and columns. Java provides some standard classes in JDBC which you can use to open connection to database, execute some sql queries, or execute some stored procedures stored in database and so on.
JPA is more advanced and helps in accessing data through java objects. JPA uses ORM as underlying concept. JPA stands for java persistence API. Java only provides with an API and underlying vendors of database should provide appropriate implementation to access database of the specific type. So, for example, to perform CRUD operations on Oracle database, you need ojdbc jar which provides implementation of JPA in your project.