Java Persistence API: JPA.
sounds like ORM: object relational Mapping. but ORM is like an idea, a thought, but JPA is the standard(don’t implement because it’s interface) based on ORM idea, using Java.
Hibernate is one of the framework that implements the idea of ORM.
ORM思想的优点:
encapsulate all the details of data access, don’t need to worry about deal with DB record directly, there will be Java objects for us to manipulate.
ORM思想的缺点:
- low performance (because of tons of mapping)
- bad at if we need join tables.
简而言之就是三角关系。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)