[Original]java Web Learning Note 76:hibernate Learning Path---Hibernate introduction, Hibernate environment construction

Source: Internet
Author: User

The purpose of this blog: ① summary of their own learning process, equivalent to study notes ② to share their own experience to everyone, learn from each other, communication, not commercialcontent inevitably appear problems, welcome to correct, exchange, discussion, you can leave a message, can also be contacted by the following ways. I Internet technology enthusiasts, Internet technology enthusiastsWeibo: Ivan is in 0221qq:951226918

--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- -----------------------------

1. Related Concepts

1) What is hibernate?

① a framework: A semi-finished product, on this basis to develop, can improve the development efficiency, reduce the amount of code, improve the robustness of the program.

② a Persistence framework for the Java domain:

> In a narrow sense, "persistence" simply means persisting objects to the database permanently

> Generalized understanding, "persistence" includes various operations related to databases:

Save: Permanently save the object to the database.

Update: Update the state of Objects (records) in the database

Delete: Delete an object from the database

Query: Loads one or more objects that meet the query criteria from the database into memory based on a specific query condition.

        load : Loads an object from the database into memory, depending on the specific OID . OID: In order to be able to find the desired object in the system, each object needs to be assigned a unique identification number. Called the primary key in the relational database, and in the object term, it is called the object identifier (identifier-oid).

    

   ③ an ORM framework: ORM (object/relation Mapping): Object/Relationship Mapping

> ORM main Solution to object-relationship mapping

        

> Orm's idea: Mapping records from tables in a relational database into objects, as objects, programmers can turn operations on the database into objects .

> ORM uses metadata to describe object-relational mapping details , and metadata is typically in XML format and is stored in a dedicated object-relational mapping file .

2) ORM Architecture

    

  3) What does hibernate learn?

> Object Relational mapping File: How to map a class and a table, the properties of a class and the fields of a table, the relationship between a class and a class, and the relationship between a table and a table

Classes and methods provided by the > ORM api:hibernate

2. The popular ORM Framework

 1) Hibernate: Very good, mature ORM framework;

-Complete the persistence of the object;

-Hibernate allows developers to manipulate relational databases using an object-oriented approach ;

-Eliminate SQL code for specific database vendors

2) MyBatis:

-High flexibility compared to Hibernate, fast running speed

-Slow development, no support for purely object-oriented operations, familiarity with SQL statements, and proficiency in SQL statement optimization

3) TopLink

4) OJB

3.jdbc vs. Hibernate code comparison

    

4. Install Hibernate plugin

  

 can also be installed online: http://jingyan.baidu.com/article/295430f1d7ac830c7f00507d.html need the main is hibernate on the Eclipes version has certain requirements, I am Luna

[Original]java Web Learning Note 76:hibernate Learning Path---Hibernate introduction, Hibernate environment construction

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.