Question - 1
Object Relation Map
Object Relational Mapping
Object Record Mapping
None of these
Show Answer
Solutions
Answer- B
Question - 2
Which of the following is true about Transaction object in hibernate?
A Transaction represents a unit of work with the database.
Transactions in Hibernate are handled by an underlying transaction manager.
This is an optional object and Hibernate applications may choose not to use this interface, instead managing transactions in their own application code.
All of the above
Show Answer
Solutions
Answer- D
Question - 3
Which method is used to update the state of the given instance from the underlying database?
Session.store()
Session.keep()
Session.update()
Session.load()
Show Answer
Solutions
Answer- C
Question - 4
What is second-level cache in hibernate?
The second-level cache is the Session based cache.
The second-level cache is the Session-factory based cache and is mainly responsible for caching objects across sessions.
Both A and B
None of these
Show Answer
Solutions
Answer- B
Question - 5
Which of the following database is not supported by Hibernate?
Oracle
Microsoft SQL Server Database
FoundationDB
Informix Dynamic Server
Show Answer
Solutions
Answer- C
Question - 6
Which of the following is true about @Column annotation?
The @Column annotation is applied on a class.
The @Column annotation is used to specify the details of the column to which a field or property will be mapped.
Both A and B
None of these
Show Answer
Solutions
Answer- B
Question - 7
Select the inheritance model which is NOT available in Hibernate.
Tables Per Concrete Class
Table Per sub-class
Table Per class hierarchy
Table Per Object
Show Answer
Solutions
Answer- D
Question - 8
Which of the following are the most common configuration methods of Hibernate configuration?
XML Configuration hibernate.cfg.xml
Mapping files and XML Configuration hibernate.cfg.xml
web.config
http.conf
Show Answer
Solutions
Answer- B
Question - 9
Which of the following is true about the transient state of a persistent entity?
A new instance of a persistent class which is not associated with a Session
A new instance of a persistent class which has no representation in the database
A new instance of a persistent class which has no identifier value
All of the above
Show Answer
Solutions
Answer- D
Question - 10
Which of the following are tags of hibernate.cfg.xml?
SQL variant to generate
DTD
JDBC connection
All of these
Show Answer
Solutions
Answer- D
Question - 11
To persist collections of embeddable type hibernates uses:
OneToMany
ElementCollection
Both A and B
None of these
Show Answer
Solutions
Answer- B
Question - 12
Select the design pattern that should be followed while creating SessionFactory in hibernate?
Singleton
Prototype
Both A and B
None of these
Show Answer
Solutions
Answer- B
Question - 13
How many layers are available in Hibernate architecture?
Answer- A
Question - 14
Which of the following is not a Session method?
Session.save()
Session.saveorupdate()
Session.remove()
Session.persist()
Show Answer
Solutions
Answer- C
Question - 15
In the elements of Hibernate architecture is a factory of session and client of ConnectionProvider, It holds second-level cache (optional) of data?
Connection Provider
Session Factory
Session
Transaction
Show Answer
Solutions
Answer- B
Question - 16
Hibernate Queue Language
Hibernate Query Language
Hypertext Query Language
HighSpeed Query Language.
Show Answer
Solutions
Answer- B
Question - 17
Which of the following methods returns a proxy object in Hibernate?
getDatabase()
loadDatabase()
loadAsyc()
load()
Show Answer
Solutions
Answer- D
Question - 18
_______________is not a core interface of Hibernate.
SessionManagement
Configuration
Session
Criteria
Show Answer
Solutions
Answer- A
Question - 19
The database table configuration is stored in ______________ file.
Answer- D
Question - 20
Which property is used to enable auto-commit for JDBC pooled connections?
hibernate.hbm2ddl.auto
hibernate.connection.autocommit
hibernate.connect.hbm
None of these
Show Answer
Solutions
Answer- B
Practice more set questions