热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

Hibernate 面试题与答案

Test your skills through the online practice test: Hibernate Quiz Online Practice Test

相关差异对比

问题 1. What is Hibernate?

Synonym of Hibernate is Winter.  It means Spend the winter in a dormant state.
As a technology Hibernate is a open source, free Java package that makes it easy to work with relational databases. It is a pure Java object-relational mapping (ORM) and persistence framework that allows you to map plain old Java objects to relational database tables using (XML) configuration files or using annotations. Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks.

这有帮助吗? 添加评论 查看评论
 

问题 2. What is ORM?

ORM stands for Object/Relational mapping. It is the programmed and mapping of objects in a Java application in to the tables of a relational database using the metadata that describes the mapping between the objects and the database. It works by transforming the data from one representation to another.

We are familiar with Model/Pojo class and Relational Database. Here Object means Model/Pojo class and Relational means the databases. By hbm.xml file or through annotations we represent the mapping between Object and Relational databases.

这有帮助吗? 添加评论 查看评论
 

问题 3. What does an ORM solution comprises of?

Hibernate should have an language or API for performing basic CRUD (Create, Read, Update, Delete) operations on objects of persistent classes where persistent means POJO classes that you create that represent the table in database to keep the state of object alive. 

It should have a language or an API for specifying queries that refer to the classes and the properties of classes an ability for specifying mapping metadata. 
It should have a technique for ORM implementation to interact with transactional objects to perform lazy association fetching, dirty checking, and other optimization functions.

这有帮助吗? 添加评论 查看评论
 

问题 4. What are the different levels of ORM quality?

Four levels defined for ORM quality:

  • Pure relational 
  • Light object mapping 
  • Medium object mapping 
  • Full object mapping
Pure relational:
The entire application, including the user interface, designed around the relational model and SQL based relational operations.
Light object mapping :
The entities are represented as classes that are mapped manually to the relational tables. The code is hidden from the business logic using specific design patterns. This approach is successful for applications with a less number of entities, or applications with common, metadata-driven data models.
Medium object mapping:
The application is designed around an object model. The SQL code is generated at build time. And the associations between objects are supported by the persistence mechanism, and queries are specified using an object-oriented expression language. This is best suited for medium-sized applications with some complex transactions. 
Full object mapping:
Full object mapping supports sophisticated object modeling: inheritance, polymorphism, composition and persistence. The persistence layer implements transparent persistence. Persistent classes do not inherit any special base class or have to implement a special interface. Efficient fetching strategies and caching strategies are implemented transparently to the application.

这有帮助吗? 添加评论 查看评论
 

问题 5. What is a pure relational ORM?

The entire application including the user interface is designed around the relational model and SQL based relational operations where Model and Database will be mapped through hbm.xml configuration files or annotations and can execute SQL operations using Model Objects.

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。
JDBC vs HibernateJPA vs HibernateHibernate 3 vs Hibernate 4