Hibernate configuration file and ing File

Source: Internet
Author: User

Hibernate:
Advantages and disadvantages
Advantages:
* Data Cache
* Object-Oriented Programming
* Simple code operations
Disadvantages:
* Hibernate is not suitable for a large amount of data.
* Programmers cannot control the SQL statements generated by hibernate.
Programmers cannot intervene in hibernate to generate SQL statements,
Therefore, in projects with high SQL statement optimization,
Hibernate is not suitable either.


Advantages and disadvantages of jdbc:
* Advantages of jdbc
* High Efficiency
* Connection pool
* Disadvantages
* Tedious code
Try {
} Catch (){
}
Finally {
// Perform various close operations
}
* Data pool



Hibernate main configuration file

 
 
  
  
   
   
    
Com. mysql. jdbc. Driver
   
   
   
    
Jdbc: mysql: // localhost: 3306/Database Name
   
   
   
    
Root
   
   
   
    
Root
   
   
   
    
Update
                   
   
   
  
 



Persistence class ing File

 
     
      
          
           
               
                
                
            
           
           
               
                
            
           
       
  
 

Persistence class corresponding to java this persistence class must have a constructor without parameters, because when the persistence class object is reflected through the hibernate framework, the constructor without parameters is called.


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.