The concept of Hibernate--orm

Source: Internet
Author: User

1. JDBC Defects:

Hard-coding the code that interacts with the database (curd) into the JDBC program;

The object model and relational model conversions are cumbersome.

2. ORM (O/R Mapping Object Relationship mapping):

A technique for saving objects in memory to a relational database;

Responsible for the persistence of entity domain objects, encapsulating data access details;

ORM provides another pattern for persistence, using mapping Metadata (XML) to describe object-relational mapping details, enabling ORM Middleware (Hibernate) to act as a bridge between the business logic layer and the database of any Java application.

3, Business Logic Layer-----"Data access Layer (DAO, can have JDBC or hibernate to implement DAO, can be abstracted out of hibernate called the Persistence layer)------" database

4. ORM Mapping Model:

Object Model Relationship Model

Entity class/Persistence class (POJO) Table

Attribute column/Field

Uid/oid (object identifier) primary key

Object (persisted object) record

Foreign keys for association relationships between entity classes

5, the common implementation of ORM:

Hibernate is an open-source O/R mapping framework that is lightweight for JDBC and can be applied to object-oriented thinking operations database.

IBATIS (MyBatis) is also the open-source O/R mapping framework, which is a semi-automatic ORM implementation;

Toplink;castor JDO;JPA, functionally speaking, JPA is a subset of hibernate

The concept of Hibernate--orm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.