Hibernate Interview Questions | Snaprecruit.com
Hibernate Interview Questions | Snaprecruit.com
JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing
Enterprises
Hibernate interview questions
Hibernate interview questions
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 15
1. What ORM stands for?
A. Object Relation Map
B. Object Relational Mapping
C. Object Record Mapping
D. None of the above.
Show Correct Answer
Correct Answer is :
Object Relational Mapping
2. SessionFactory is a thread-safe object.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
3. Which of the following is true about Transaction object in hibernate?
A. A Transaction represents a unit of work with the database.
B. Transactions in Hibernate are handled by an underlying transaction manager.
C. This is an optional object and Hibernate applications may choose not to use this interface, instead managing transactions in their own application code.
D. All of the above.
Show Correct Answer
Correct Answer is :
A Transaction represents a unit of work with the database.
4. Which method is used to remove a persistent instance from the datastore?
A. Session.delete()
B. Session.remove()
C. Session.del()
D. Session.rm()
Show Correct Answer
Correct Answer is :
Session.delete()
5. Which of the following elements is used to define specific mappings from a Java classes to the database tables?
A. property
B. hibernate-config
C. class
D. class-config
Show Correct Answer
Correct Answer is :
class
6. Which element of hbm.xml automatically generate the primary key values?
A. id
B. generator
C. primaryKey
D. None of the above.
Show Correct Answer
Correct Answer is :
generator
7. Which of the following is not a core interface of Hibernate?
A. Configuration
B. Criteria
C. SessionManagement
D. Session
Show Correct Answer
Correct Answer is :
SessionManagement
8. Which of the following methods returns proxy object?
A. loadDatabase()
B. getDatabase()
C. load()
D. get()
Show Correct Answer
Correct Answer is :
load()
9. Which of the following methods hits database always?
A. load()
B. loadDatabase()
C. getDatabase()
D. get()
Show Correct Answer
Correct Answer is :
get()
10. Which of the following method is used inside session only?
A. merge()
B. update()
C. end()
D. kill()
Show Correct Answer
Correct Answer is :
update()
11. Which of the following is not a state of object in Hibernate?
A. Attached()
B. Detached()
C. Persistent()
D. Transient()
Show Correct Answer
Correct Answer is :
Attached()
12. Which of the following is not an inheritance mapping strategies?
A. Table per hierarchy
B. Table per concrete class
C. Table per subclass
D. Table per class
Show Correct Answer
Correct Answer is :
Table per class
13. Which of the following is not an advantage of using Hibernate Query Language?
A. Database independent
B. Easy to write query
C. No need to learn SQL
D. Difficult to implement
Show Correct Answer
Correct Answer is :
Difficult to implement
14. In which file database table configuration is stored?
A. .dbm
B. .hbm
C. .ora
D. .sql
Show Correct Answer
Correct Answer is :
.hbm
15. Which of the following is not an advantage of Hibernate Criteria API?
A. Allows to use aggregate functions
B. Cannot order the result set
C. Allows to fetch only selected columns of result
D. Can add conditions while fetching results
Show Correct Answer
Correct Answer is :
Cannot order the result set
Similar Interview Questions
Search for latest jobs
Find Jobs