Reputation: 8903
I am trying to understand ORM and JPA, have some confusion on these two terms.
I started with Hibernate initially and came to know that Hibernate is an ORM tool
and it implements JPA as well
.
Now it is where my doubts start.
ORM stands for Object relation mapping and JPA for Java Persistence API.
1) Is ORM a sub-specification within JPA? That is, does JPA have the specification about how to map java objects and DB rows?
2) If #1 isn't correct then what exactly is ORM and JPA taken as individual entities>
3) Many places I read Hibernate is an ORM tool and JPA implementer; but are they really different? I am getting confused on these two.
Upvotes: 2
Views: 316
Reputation: 40036
Wrong
ORM is simply a general term for frameworks/tools that helps you to map Relational DBMS records to Objects (and vice-versa), so that in your code you just work against entity objects, and the actions you performed on them are translated back to changes in RDBMS. There are a lot of different tools doing such works, Hibernate being one of the most well-known within them. Later Java drafted a standard called JPA to make a "standard" for such kind of ORM tools. So JPA is a spec for (some kind of) ORM frameworks, just like JMS being spec for messaging systems.
I wish you understand it after reading point 2.
Upvotes: 1