JPA = Java Persistance API – Framework to interact with DB. Forms a bridge between object models (Java) and relational models (DB). Performs DB operations by storing and retrieving vast amounts of data.

Hibernate
Object-relational mapping tool for Java. It provides a framework for mapping an object-oriented domain model to a relational database.

JDBC- object -> fields, connect to java application, but when you want to connect them in efficient way, object- class -> fields, how to achieve polimorfison, relatiosn to DB
ORM –object relational mapping
ORM tool (concept) – want to connect object and relations to DB
To store data without using SQL, just Java. Also a solution to store custom objects and you don’t need to enter value by value. How can you convert an object to table – ORM.

ORM is just a concept and we need to implement it, hibranate does that

Establish session -> sesionFactory -> save(object)/get,…
We have to configure session – java configuration or XML,…
In config file we have to have URL DB, driver, user and pass,…

Maven vs Java project: will load library not necessary

Framework vs. Library – Inversion of control
When calling a method from library, you are in control, but with framework, the control is inverted, framework calls you.
Library (function of an application): collection of class and method definitions (e.g. math libs)
Framework (skeleton of the application): control flow is already there, and there’s a bunch of predefined white spots that you should fill out with your code