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.