1. Relational database:
Oracle/mysql
Techniques for Data persistence:
IO JDBC XML ...
The mainstream persistence layer framework:
Hibernate
MyBatis---->apache Products
JPA (developed by the EJB 3.0 software Expert Group, Luxury, luxury solutions)--->oracle
TopLink---->oracle (DBA Professional Administrator)
JSF (JavaServer Faces (JSF) is a standard framework for building Java WEB applications)
JDO (JDO Java Data object) is a new specification for Java object Persistence and a standardized API for accessing objects in a data warehouse. )
2.Hibernate: ORM (Object relational mapping)
A classic implementation of the framework of the persistence layer. The phenomenon of object-oriented language and relational database mismatch is solved.
In the 3.hibernate.cfg.xml file:
To format the SQL statement:
<property name= "Format_sql" > True </property>
Create + Update:
<property name= "Hbm2dd1.auto" >update</property>
4.Hibernate three-state:
A. Transient state/temporary state:
The object created by the user using the New keyword, when the object is stored in memory, there is no related record in the data, and there is no buffer information in the session;
B. Persistent State:
When the persistence method in the session (save or Save or Update) is called, the data is persisted, there is a corresponding record in the database, and the cache information of the object is also seesion;
C. Free State/Offline Status:
Due to the closing or emptying of the session, the object is out of the jurisdiction of the session, there are corresponding records in the database, but there is no cached information for the object in the session.
Java:leakfilling (Hibernate)