The correspondence between the Customer class is as follows:
Customer class properties Customer table structure
ID Customer_ID
Name Customer.hbm.xml Name
Age Age
Email email
....
Hibernate uses an XML mapping file to configure object-relational mapping, with some of the following advantages:
Hibernate will neither refer to the upper domain model, nor will it be included in the underlying relational data model;
Software developers can independently design the domain model, do not have to force obey any specification;
Database designers can independently design the relationship model, do not have to force obey any specification;
Object-Relational Mapping does not depend on any program code, if you need to modify the relationship map, just modify the XML mapping file, do not need to modify any program code, improve software flexibility, and make maintenance more convenient!