Login
Sign up
Categories
IT & Programming
Design & Multimedia
Writing & Translation
Sales & Marketing
Admin Support
Engineering & Manufacturing
Finance & Management
Website Designing & Development
Database Management
Networking & Troubleshooting
Aviation & Aerospace
Softwares & Applications
Stocks & Investments
Electronics & Appliances
Online Tools
General Knowledge & Aptitude
Mathematics
Educational Subjects & Courses
Business & Organization
Health & Wellbeing
Culture & Ethics
IT Field Knowledge & Experience
Languages & Communication
Entrepreneurship & Leadership
Economics & Development
Mass Communication & Media
Research Methods & Evaluation
Public Relations & Dealings
Educational Methods and Research
Educational Subjects & Techniques
Crime & Justice
Governments & Policies
Cyber Security & Ethical Hacking
Hospitality & Tourism
Soft Skills & Personal Management
Transportation & Driving Rules
Forest and Nature
Religion
Skill Assessment
MCQs
Login
Sign up
Categories
IT & Programming
Design & Multimedia
Writing & Translation
Sales & Marketing
Admin Support
Engineering & Manufacturing
Finance & Management
Website Designing & Development
Database Management
Networking & Troubleshooting
Aviation & Aerospace
Softwares & Applications
Stocks & Investments
Electronics & Appliances
Online Tools
General Knowledge & Aptitude
Mathematics
Educational Subjects & Courses
Business & Organization
Health & Wellbeing
Culture & Ethics
IT Field Knowledge & Experience
Languages & Communication
Entrepreneurship & Leadership
Economics & Development
Mass Communication & Media
Research Methods & Evaluation
Public Relations & Dealings
Educational Methods and Research
Educational Subjects & Techniques
Crime & Justice
Governments & Policies
Cyber Security & Ethical Hacking
Hospitality & Tourism
Soft Skills & Personal Management
Transportation & Driving Rules
Forest and Nature
Religion
Skill Assessment
MCQs
Login
Sign up
Skill Assessments
>
IT & Programming
>
Hibernate Skill Assessment
>
Quiz # 3
Hibernate Quiz # 3
Instructions
Quiz:
Hibernate Quiz # 3
Subject:
Basic Hibernate
Total Questions:
30 MCQs
Time:
30 Minutes
Note
Do not refresh the page while taking the test.
Results along with correct answers will be shown at the end of the test.
Start Quiz
Hibernate Quiz # 3
End Quiz
Question
1
of 30
00:00
Which of the following is NOT true about First Level Cache?
Hibernate uses this cache by default
It loads objects and make them available to the entire application
it reduces the number of generated SQL queries within a given transaction
It always "associates" with the Session object
Which of the following is NOT a valid caching strategy?
Read-only
Write-only
Nonstrict read/write
Read/write
Which one of the following statements is true about how Hibernate retrieves an object?
You cannot retrieve objects using native SQL queries in Hibernate
HQL Hibernate Query Language is a full object oriented query language
When you're using get() method to retrieve an object that doesn't exist in the database, Hibernate will throw an exception
When you using load() method to retrieve an object that doesn't exist in the database, Hibernate will return null
Object-oriented languages represent data as a ____ of objects
delimited
tabular
array
graph
Which one of the following statements is NOT true about entity lifecycle events?
If the timestamp of the most recent update made to the queried table is early than the timestamp of the cached query results, then the cached results are discarded
UpdateTimestampsCache is a special cache region that holds timestamps of the most recent updates to each table
The query cache must be enabled using a Hibernate property setting:hibernate.cache.use_query_cache true
Hibernate allows you to specify a different named cache region for each query
Which one of the following statements is NOT true about many to many relationship mapping?
The many to may relationship can be both unidirectional or bidirectional
mappedBy element must be included for the bidirectional many to many relationship
The @JoinColumn and @InverseJoinColumns are used to defined the column names of the foreign keys in the join table
The @JoinTable annotation must be defined on the reverse side of the many to many relation ship
Which one of the following statements is NOT true about using components in Hibernate?
Hibernate component is the lowest level of unit and cannot own other component
We can declare a component of an entity by using <component> element
Component is the user defined class that is persisted to the table of owning entity
Hibernate support both unidirectional and bidirectional composition
Which of the following is NOT true about Hibernate OGM (still being developed)?
It is a persistence engine providing Java Persistence (JPA) support for NoSQL storage solutions
It is expected to be used to interact with all NoSQL solution in all use cases
It reuses Hibernate Core's object life cycle management and (de)hydration engine but persists entities into a key/value store instead of a relational database
It reuses the Java Persistence Query Language (JP-QL) as an interface to querying stored data
Which one of the following statements is NOT true about Hibernate's cascading persistence?
cascade ="delete" tells Hibernate to navigate the association when performing delete
cascade="all-delete-orphan" is the same as cascade="all" in addition it deletes any persistent instant when it get dereferenced
cascade="save-update" is the default setup in hibernate
cascade ="none" tells hibernate to ignore association
Which one of the following statements is true about using annotation to setup Inheritance Models?
The default value of discriminatorType element in @DiscriminatorColumn is DiscriminatorType.INTEGER
the @Inheritance annotation is used on the subclass to setup the inheritance mapping strategy
the @DiscriminatorValue annotation is used to specify the value in the in the discriminator column in database
the name element of @DiscriminatorColumn annotation specify the name of table
Which of the following statements is true about using cache in Hibernate?
Caching query will have more impact on applications that perform many inserts, deletes or updates.
The iterate()method of the Session and Query interfaces is provided to take advantage of second-level cache.
The query cache cache all the entities properties returned in the query result set
To enable query cache all it needs is to invoke setCacheable(true) on the query instance.
Which one of the following statements is NOT true about HQL joins?
Path navigation from one entity is a form of outer join.
Join conditions can be specified explicitly by using the 'join' keyword
An inner join between two entities returns the objects from both entity types that satisfy all the join conditions
Join conditions can be specified implicitly as a result of path navigation.
Which of the following is NOT true about Second Level Cache?
It is called 'second-level' because there is already a cache operating in Hibernate for the duration of an open session
It always "associates" with the Session Factory object
It exists as long as the session factory is alive
By default it effectively holds on to the identifiers for an individual query
Which of the following statements is NOT true about mapping one class to multiple tables using annotation?
entities may be mapped across multiple tables by making use of the @SecondaryTables annotation
The "table" attribute needs to be defined in the @Column annotation to specify which table the column belongs
The @PrimaryKeyJoinColumn annotation specifies the primary key of the primary table
entities may be mapped across multiple tables by making use of the @SecondaryTable annotation
Which of the following does NOT correctly describe LockMode.NONE?
It represents the absence of a lock
All objects switch to this lock mode at the end of a Transaction
Objects associated with the session via a call to update() or saveOrUpdate() also start out in this lock mode
If an object is requested with this lock mode, a WRITE lock will be obtained if it is necessary to actually read the state from the database
Which one of the following statements is NOT true about using annotation mapping Entity hierarchies?
The @Inheritance annotation has a "strategy" attribute which can be used to define the inheritance mapping strategy
The @DiscriminatorColumn is used to defined the named of the column that is used to differentiate subclasses
The root class of the hierarchy needs to be marked by the @Inheritance annotation
The @DiscriminatorValue doesn't have default value and must be defined.
Which of the following statement is NOT true?
The load() method returns null, when the unique id could not found in the database
The load() method returns proxy by default and the data base will not be effected until the invocation of the proxy
The load() method throws an exception,when the unique id could not found in the database
The get() method returns null when the unique id is unavailable in the database.
Which of the following correctly describes org.hibernate.SQL log category?
Log all SQL DDL statements as they are executed
Log all SQL DML statements as they are executed
Log all JDBC parameters
Log the state of all entities
Which one of the following statements is NOT true about join strategy (table per subclass)?
It is more is expensive to query subclass when using join strategy
Join strategy is the most efficient way to insert data
Join strategy is the most efficient way to store data
In join strategy every class will have its state mapped to a different table
Which one of the following statements is NOT true about entity lifecycle events
Firing of a PostPersist event does not indicate that the entity has committed successfully to the database
If the PERSIST cascade option is set on a relationship of an object that is being persisted and the target object is also a new object, the PrePersist event is triggered on the target object.
The PostLoad callback occurs after the data for an entity is read from the database and the entity instance is constructed.
When the SQL for deletion of an entity gets sent to the database, the PostRemove event will get fired and it indicates success of deletion
Which of the following is NOT a valid id generator class?
hilo
primary
identity
sequence
Which one of the following statements is NOT true about the following HQL query: from Item item join item.bids bid where item.description like '%gc%' and bid.amount > 100
The query returns a List of Object[] arrays
The query assigns the alias "item" to the class ITEM and alias "bid" to the Bid class
The query returns all combinations of associated Bids and Items
The bids collection of each Item will be eagerly loaded.
Which one of the following statements is true about entity type and value type in Hibernate?
An object of value type always has a primary key value in the database
Value type objects belongs to an entity and is embedded in the table row of owning entity
An object of Entity type does NOT have its own database identity
An Entity type object cannot exist independently and has to bond to another object
Which one of the following statements is True about the following query: from Item as I where i.description = :description
the Item indicates the name of the entity class and it's case sensitive
The query is using native SQL syntax
the letter I is alias and the "as" keyword must be place in front of the alias
this query is using positional parameter binding
Which one of the following statement is NOT true about many to one relationship mapping?
The @JoinColumn must be defined with @OneToMany annotation
The @JoinColumn defines the name of the foreign column
If the relationship is bidirectional mappedBy attribute must be defined for the @OneToMany annotation
The @ManyToOne defines a single-valued association to another entity class that has many-to-one multiplicity.
Which one of the following statements is NOT true about transient state?
objects referred by other transient instances are transient
Transient instance is always associated with a row in a database
After a persisted instance gets deleted, it'll become a transient instance
Objects instantiated using new operator aren't persisted immediately and their state is transient.
Which of the following is not TRUE about StatelessSession interface/implementation in Hibernate Batch?
It does not provide many of the higher-level life cycle semantics
A stateless session does not implement a first-level cache
A stateless session has no persistence context associated with it
Operations performed using a stateless session cascade to associated instances
Which of the following is NOT a valid org.hibernate.ConnectionReleaseMode?
ON_OPEN
AFTER_TRANSACTION
AFTER_STATEMENT
ON_CLOSE
Which one of the following statements is true about the following HQL query: select department from Department department join department.employees employee where employee.address.state = 'CA' and department.name='marketing'
The query is using outer join
The department objects returned are lazy loaded.
The query will return all departments not matter the department has an employee or not
The query returns a List of Object[] arrays, at index 0 is Department and Index 1 is Employee
Which of the following correctly describes org.hibernate.cache log category?
Log all first-level cache activity but NOT second-level cache activity
Log NEITHER first-level NOR second-level cache activity
Log both first-level and second-level cache activity
Log all second-level cache activity
Submit Test
Prev Question
ABCd
Next Question
Liked this quiz? Share it with friends:
Share Quiz
Share
WhatsApp
Facebook
Twitter
LinkedIn
Or copy link:
Copy
Link copied to clipboard!
Copy
Hibernate Skill Assessment
Login to see Skill Score (It's Free)
Your Skill Level:
Poor
Retake Quizzes to improve it
Start Assessment
Hibernate Skill Assessment
Login to see Skill Score (It's Free)
Your Skill Level:
Poor
Retake Quizzes to improve it
Start Assessment