If you are a Spring Boot beginner, you have probably already come across these terms: JDBC, which means Java Database Connectivity, JPA, which stands for Java Persistence API, JPQL, which refers to Java Persistence Query Language, and JAR, which means Java ARchive.
These terms show up often in Spring Boot projects, and each one plays a specific role. JDBC and JPA help you connect with the database and manage data. JPQL lets you write queries using Java objects instead of raw SQL. Once your project is ready, you package it into a JAR file so it can run or be shared easily. I have added some helpful resources at the end.
Now let’s get into the details of each one of them.

JDBC
JDBC stands for Java Database Connectivity. It’s exactly what the name suggests, a way for your Java program to talk to a database. Whenever you want to send or receive data from a database like MySQL or PostgreSQL using plain Java, JDBC is what makes it possible.
The process of setting up JDBC involves several steps. First, you need to load and register the database driver. Then you create a connection to the database. After that, you create a statement, execute the query, handle the results, and finally close the connection just like cutting the phone call when you are done talking.
From this, we can understand that JDBC gives you full control over the process, but it’s time-consuming and repetitive. That’s where Spring comes in. It still uses JDBC internally, but it takes care of all the boilerplate code so you can focus on writing your logic.
JPA
Writing SQL queries becomes complex when you are working on a large project. Managing tables, joins, and updates through raw queries can quickly become hard to maintain. To solve this, the concept of ORM came in, which stands for Object Relational Mapping. With ORM, you simply map your Java classes to database tables. These classes are also called entities in JPA. Once mapped, the framework handles the query generation and database interaction for you.
There are several ORM frameworks available like Hibernate, EclipseLink, and others. But each of them originally followed their own approach. To bring consistency and make switching between frameworks easier, Java introduced JPA, which stands for Java Persistence API.
JPA defines a standard set of rules that all ORM frameworks should follow. So if you’re using JPA in your project, you can switch from one ORM provider to another, like from Hibernate to EclipseLink, without rewriting your entire persistence logic.
In Spring Boot, Hibernate is the default JPA provider. This means you get all the benefits of ORM and also follow the JPA standard, which keeps your code clean, flexible, and easier to maintain.
What is OOPS? Key Concepts, Car Example, and Resources
JPQL
JPQL stands for Java Persistence Query Language. It is used to write queries when you are working with JPA. The main difference between JPQL and normal SQL is that JPQL works with Java classes and objects instead of directly dealing with database tables and columns.
For example, in SQL you might write ==> SELECT * FROM users WHERE age > 25
But in JPQL, if you have a User
entity class, you would write ==> @Query(“SELECT u FROM User u WHERE u.age > :age”)
In Spring Boot, you use the @Query
annotation to write JPQL inside your repository interfaces.
Here u.age
refers to the field in the User
entity, not directly to a column in the database. The @Query
annotation tells Spring to use this custom JPQL instead of generating the query automatically.
JPQL supports most of the things you need like filtering with WHERE, sorting with ORDER BY, joining entities, and even using parameters like in the example above. And since it is part of JPA, it works the same way across different frameworks that follow the JPA standard.
JAR
JAR stands for Java ARchive. It is a file format used to package your Java project along with all its classes, libraries, and resources into a single file. When you create a Spring Boot project using Spring Initializr, you usually select Maven as the build tool and JAR as the packaging type right at the beginning.
This tells Spring Boot that your project should be packaged as a JAR when built. The JAR file will include everything your application needs to run such as your code configuration files and all the required dependencies.
One of the best things about Spring Boot is that it comes with an embedded web server. So when you build a JAR you do not need to install any other server separately. It already includes Tomcat inside it. You can simply run the JAR using the Java command and your application starts instantly just like a regular web server.
Finally…
Now you know what each of these J’s means in a Spring Boot project. JDBC is the core way to connect with the database. JPA makes data handling easier by letting you work with Java objects. JPQL helps you write queries using entity fields instead of raw SQL. And JAR is how you package and run your application without needing any external setup.
And before we wrap up, do not forget the one J that runs the whole show behind the scenes. The JVM. Without the Java Virtual Machine, none of this would even run in the first place.
If you are looking for a Spring Boot playlist, I recommend you check out the Telusko playlist or the 10-hour video by Daily Code Buffer