![Mcqmate logo](https://mcqmate.com/images/logos/logo-black.png)
![Mcqmate logo](https://mcqmate.com/images/logos/logo-white.png)
McqMate
Chapters
1. |
Which of the following is not a core interface of Hibernate? |
A. | Configuration |
B. | Criteria |
C. | SessionManagement |
D. | Session |
Answer» C. SessionManagement |
2. |
Which of the following is not a core component of Hibernate? |
A. | JDBC |
B. | SessionFactory |
C. | Session |
D. | Configuration |
Answer» A. JDBC |
3. |
Is Session a thread-safe object? |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» B. False |
4. |
SessionFactory is a thread-safe object. |
A. | True |
B. | False |
C. | none |
D. | all |
Answer» A. True |
5. |
Which of the following methods returns proxy object? |
A. | loadDatabase() |
B. | getDatabase() |
C. | load() |
D. | get() |
Answer» C. load() |
6. |
Which of the following methods hits database always? |
A. | load() |
B. | loadDatabase() |
C. | getDatabase() |
D. | get() |
Answer» D. get() |
7. |
Which of the following method is used inside session only? |
A. | merge() |
B. | update() |
C. | end() |
D. | kill() |
Answer» B. update() |
8. |
The SessionFactory is heavyweight object. |
A. | False |
B. | True |
C. | none |
D. | all |
Answer» B. True |
9. |
Which of the following is not a state of object in Hibernate? |
A. | Attached() |
B. | Detached() |
C. | Persistent() |
D. | Transient() |
Answer» A. Attached() |
10. |
Which of the following is true about HQL? |
A. | HQL takes java objects in the same way as SQL takes tables. |
B. | HQL is a Object Oriented Query language |
C. | HQL is database independent. |
D. | All of the above. |
Answer» D. All of the above. |
11. |
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 |
Answer» D. Table per class |
12. |
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 |
Answer» D. Difficult to implement |
13. |
In which file database table configuration is stored? |
A. | .dbm |
B. | .hbm |
C. | .ora |
D. | .sql |
Answer» B. .hbm |
14. |
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 |
Answer» B. Cannot order the result set |
Done Reading?