Hibernate - Advanced Java Test

Hibernate - Advanced Java Test


1) Hibernate framework simplifies the development of java application to interact with the database?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




2) Hibernate is an?

A) Open Source
B) Lightweight
C) ORM
D) All mentioned above
View Answer / Hide Answer

ANSWER: D) All mentioned above




3) Abbreviate the term ORM?

A) Object Relational Mode
B) Oriented Relational Mapping
C) Object Relational Mapping
D) None of the above
View Answer / Hide Answer

ANSWER: C) Object Relational Mapping




4) An Object Relational Mapping tool simplifies which of these?

A) Data creation
B) Data manipulation
C) Data access
D) All mentioned above
View Answer / Hide Answer

ANSWER: D) All mentioned above




5) This hibernate tutorial provides in-depth concepts of Hibernate Framework it was started in which year by Gavin King as an alternative to EJB2 style entity bean?

A) 2004
B) 2002
C) 2001
D) 2000
View Answer / Hide Answer

ANSWER: C) 2001




6) How many layers are available in Hibernate architecture?

A) 3
B) 4
C) 5
D) 2
View Answer / Hide Answer

ANSWER: A) 3




7) In the elements of Hibernate architecture is a factory of session and client of ConnectionProvider,It holds second level cache (optional) of data?

A) Session
B) SessionFactory
C) Transaction
D) ConnectionProvider
View Answer / Hide Answer

ANSWER: B) SessionFactory




8) Hibernate framework provides many built-in generated classes,which class is used in Sybase, My SQL, MS SQL Server, DB2 and HypersonicSQL to support the id column. The returned id is of type short, int or long?

A) identity
B) uuid
C) seqhilo
D) hilo
View Answer / Hide Answer

ANSWER: A) identity




9) Log4j and Logback frameworks can be used in hibernate framework to support logging which ways are used?

A) By log4j.xml file
B) By log4j.properties
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: C) Both A & B




10) Hibernate Logging by Log4j using which file,

1)Load the log4j jar files with hibernate
2)Create the log4j.xml file inside the src folder (parallel with hibernate.cfg.xml file)

A) Hibernate Logging by Log4j using xml file
B) Hibernate Logging by Log4j using properties file
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: A) Hibernate Logging by Log4j using xml file




11) In Hibernate inheritance mapping which is used when tables are created as per class but related by foreign key, So there are no duplicate columns?

A) Table per Hierarchy
B) Table Per Concrete Class
C) Table Per Subclass
D) None of the above
View Answer / Hide Answer

ANSWER: C) Table Per Subclass




12) In case of Table per Concrete class, there will be three tables in the database having no relations to each other which ways to map the table?

A) By union-subclass element
B) By self-creating the table for each class
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: C) Both A & B




13) We need to specify @Inheritance(strategy=InheritanceType.JOINED) in the parent class and @PrimaryKeyJoinColumn annotation in the subclasses?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




14) We can do One to One mapping in hibernate by these ways?

A) By many-to-one element
B) By one-to-one element
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: C) Both A & B




15) A transaction simply represents a unit of work, In such case, if one step fails the whole transaction fails which is termed as atomicity?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




16) Abbreviate the term HQL?

A) Hibernate Queue Language
B) Hibernate Query Language
C) Hipher Query Language
D) None of the above
View Answer / Hide Answer

ANSWER: B) Hibernate Query Language




17) Hibernate Query Language (HQL) is not same as Structured Query Language (SQL)?

A) True
B) False
View Answer / Hide Answer

ANSWER: B) False




18) Abbreviate the term HCQL?

A) Hibernate Criteria Query Language
B) Hibernate Concept Queue Language
C) Hibernate Criteria Queue Language
D) None of the above
View Answer / Hide Answer

ANSWER: A) Hibernate Criteria Query Language




19) Which provides methods to add criteria, so it is easy for the java programmer to add criteria?

A) HCQL
B) HQL
C) SQL
D) None of the above
View Answer / Hide Answer

ANSWER: A) HCQL




20) Hibernate caching improves the performance of the application by pooling the object in the cache?

A) True
B) False
View Answer / Hide Answer

ANSWER: A) True




21) Second Level Cache implementations are provided by different vendors such as?

A) EH Cache
B) Swarm Cache
C) OS Cache
D) JBoss Cache
E) All mentioned above
View Answer / Hide Answer

ANSWER: E) All mentioned above




22) Session object holds the?

A) First Level Cache
B) Second Level Cache
C) Both A & B
D) None of the above
View Answer / Hide Answer

ANSWER: A) First Level Cache




23) The Spring framework provides HibernateTemplate class, so you don't need to follow steps like?

A) create Configuration
B) BuildSessionFactory
C) Session
D) beginning and committing transaction
E) All mentioned above
View Answer / Hide Answer

ANSWER: E) All mentioned above


Post your comment