Hibernate configuration file
It contains database specific configurations and used to initialize SessionFactory. We provide database credentials or JNDI resource information in the hibernate configuration xml file. Some other important parts of hibernate configuration file is Dialect information, so that hibernate knows the database type and mapping file or class details.
Hibernate.dialect property tells Hibernate to generate the appropriate SQL statements for the chosen database. hibernate.dialect property makes Hibernate to generate the appropriate SQL statements for the chosen database.
Hibernate mapping file
It is used to define the entity bean fields and database table column mappings. We know that JPA annotations can be used for mapping but sometimes XML mapping file comes handy when we are using third party classes and we can’t use annotations.