Hibernate_test

Q 1 - Which of the following database is not supported by Hibernate?
A - DB2/NT
B - MySQL
C - FoundationDB
D - PostgreSQL
Q 2 - Which of the following is true about configuration component of Hibernate?
A - The Configuration object is the first Hibernate object you create in any Hibernate application.
B - The Configuration object is usually created only once during application initialization.
C - The Configuration object represents a configuration or properties file required by the Hibernate.
D - All of the above.
Q 3 - Which method is used to remove a persistent instance from the datastore?
A - Session.saveOrUpdate()
B - Session.keep()
C - Session.update()
D - Session.load() Show Answer
Q 4 - Which method is used to save or update the state of the given instance from the underlying database?
A - Session.saveOrUpdate()
B - Session.keep()
C - Session.update()
D - Session.load()
Q 5 - Which of the following is true about element?
A - The element is used to map a Java class property to a column in the database table.
B - The name attribute of the element refers to the property in the class.
C - The column attribute of the element refers to the column in the database table.
D - All of the above.
Q 6 - What is the difference between save() and persist() methods of session object?
A - There is no difference.
B - save saves the object and returns status whereas persist stores status in different variable.
C - save saves the object and returns the id of the instance whereas persist do not return anything after saving the instance.
D - None of the above.
Q 7 - What is second level cache in hibernate?
A - The second-level cache is the SessionFactory based cache and is mainly responsible for caching objects across sessions.
B - The second-level cache is the Session based cache.
C - Both of the above.
D - None of the above.
Q 8 - Which of the following database is not supported by Hibernate?
A - Oracle
B - Microsoft SQL Server Database
C - FoundationDB
D - Informix Dynamic Server
Q 9 - Which of the following is true about @Id annotation?
A - Hibernate detects that the @Id annotation is on a field.
B - Hibernate assumes that it should access properties on an object directly through fields at runtime.
C - Both of the above.
D - None of the above.
Q 10 - Which of the following is true about @Table annotation?
A - The @Table annotation allows to specify the details of the table that will be used to persist the entity in the database.
B - The @Table annotation allows to override the name of the table, its catalogue, and its schema, and enforce unique constraints on columns in the table.
C - Both of the above.
D - None of the above.
{"name":"Hibernate_test", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Q 1 - Which of the following database is not supported by Hibernate?, Q 2 - Which of the following is true about configuration component of Hibernate?, Q 3 - Which method is used to remove a persistent instance from the datastore?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker