Hibernate Flashcards
\_\_\_\_\_\_ fetching loads child records ahead of time, whereas \_\_\_\_\_\_ fetching only loads child records on-demand. Select one: a. Lazy, Eager b. Cascade, Eager c. Eager, Lazy d. Lazy, Cascade
c. Eager, Lazy
________ ensures the SQL only contains columns whose state have changed, and _________ ensures SQL only contains columns whose values are not null.
Select one:
a. Automatic dirty checking, transactional write-behind
b. Dynamic-insert, dynamic-update
c. Dynamic-update, dynamic-insert
d. Transactional write-behind, automatic dirty checking
c. Dynamic-update, dynamic-insert
An object in transient state in hibernate is linked to the database.
Select one:
A. TRUE
B. FALSE
B. FALSE
by default, lazy loading is enabled in Hibernate for collections
Select one:
A. TRUE
B. FALSE
A. TRUE
Criteria API can be used to store data in the database.
Select one:
A. TRUE
B. FALSE
B. FALSE
ehCache is a L2 Cache provider for Hibernate.
Select one:
A. TRUE
B. FALSE
A. TRUE
For the whole application, there will be generally one \_\_\_\_\_\_\_\_\_ and can be shared by all the application threads. Select one: a. Session b. SessionFactory c. Transaction d. Query
b. SessionFactory
Hibernate bootstrapping is performed by which core interface? Select one: a. Session b. Configuration c. SessionFactory d. Transaction
b. Configuration
Hibernate is a DAO framework, not an ORM framework
Select one:
A. TRUE
B. FALSE
B. FALSE
Hibernate is classified under the Presentation layer in the J2EE architecture
Select one:
A. TRUE
B. FALSE
B. FALSE
How can we have Hibernate write the generated SQL to the console?
Select one:
a. property name=show_sql in hibernate.cfg.xml
b. ShowSQL annotation in POJO mappings
c. Pass the System.out OutputStream to the CRUD method as a parameter
d. property name=show_sql in mapping.hbm.xml
a. property name=show_sql in hibernate.cfg.xml
How can you define a sequence generated primary key in Hibernate?
Select one:
a. Using the generator tag in HBM or the GeneratedValue annotation
b. Using the generated tag in HBM or the GeneratedValue annotation
c. Using the sequence tag in HBM or the Sequence annotation
d. Using the sequence tag in HBM or the GeneratedValue annotation
a. Using the generator tag in HBM or the GeneratedValue annotation
HQL is the object oriented version of SQL and it works with Entity class names rather than table names.
Select one:
A. TRUE
B. FALSE
A. TRUE
L2 Cacheing is specific to a SessionFactory rather than a Session object.
Select one:
A. TRUE
B. FALSE
A. TRUE
mapping class tag is used to map an hbm.xml file in Hibernate.cfg.xml.
Select one:
A. TRUE
B. FALSE
B. FALSE
session-factory is a tag in hibernate.cfg.xml.
Select one:
A. TRUE
B. FALSE
A. TRUE
The \_\_\_\_\_\_ instance state refers to an object not associated with any data. A \_\_\_\_\_\_\_\_ state means an object is associated with data within the session. After the session is closed, the object changes to the \_\_\_\_\_\_\_\_ state. Select one: a. Detached, Persisted, Salient b. Transient, Persistent, Detached c. Persisted, Salient, Detached d. Detached, Persistent, Transient
b. Transient, Persistent, Detached
The \_\_\_\_\_\_ interface allows developers to write and execute HQL. Select one: a. Query b. Criteria c. Session d. HQL
a. Query
The \_\_\_\_\_\_\_\_\_\_\_\_ transaction isolation level addresses none of the concurrency issues. Select one: a. Read uncommitted b. Read committed c. Repeatable read d. Serializable
a. Read uncommitted
The \_\_\_\_\_\_\_\_\_\_\_\_ transaction isolation level addresses the dirty read concurrency issue. Select one: a. Read uncommitted b. Serializable c. Repeatable read d. Read committed
d. Read committed