HashMap How to realize the principle of/hibernate

Source: Internet
Author: User

HashMap How to achieve


Hahsmap is a non-synchronous implementation of a hash table-based map interface. This implementation provides all of the optional mapping operations, and allows null values and NULL to be used to build. This class does not guarantee the order of the mappings, especially because it does not guarantee that the order is constant.

HashMap is actually a linked-list hash of the data structure, which is the combination of arrays and linked lists.

how JAVA Hibernate works and why it should be used

        hibernate is an object-relational mapping framework that has a very lightweight object encapsulation of JDBC, Make it possible to manipulate the database using object programming thinking.  hibernate can be applied to any JDBC application, either in Java client programs or in servlet/jsp Web applications, and most revolutionary of all, hibernate can replace CMP in the application EJB, The task of achieving data persistence.      principle:     1. By configuration (). Configure (); Read and parse Hibernate.cfg.xml profile     2. Read and parse mapping information by <mapping resource= "Com/xx/user.hbm.xml"/> in Hibernate.cfg.xml     3. through Config.buildsessionfactory ();//Create sessionfactory    4. Sessionfactory.opensession ();//Open sesssion    5.session.begintransaction ();//Create Transaction Transation     6.persistent operate Persistent Operation     7.session.gettransaction (). Commit ();//COMMIT TRANSACTION     8. Close session    9. sesstionfactory Why use:     1.  encapsulates the code for JDBC access to the database, greatly simplifying the tedious repetitive code.     2. hibernate is a JDBC-based, mainstream persistence framework that is an excellent ORM implementation. HeMuch of the simplification of the DAO layer coding work     3. hibernate using the Java reflection mechanism rather than the bytecode enhancer to achieve transparency. The performance of     4. hibernate is very good, because it is a. The flexibility of the mapping is excellent. It supports a variety of relational databases, from one-to-one to many-to-many complex relationships.



HashMap How to realize the principle of/hibernate

Related Article

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.