Aptitude Reasoning English GK Computer Knowledge Programming Skill Banking Software Testing



Question - 1

What ORM stands for?

  • Object Relation Map
  • Object Relational Mapping
  • Object Record Mapping
  • None of these
Solutions
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
Solutions
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()
Solutions
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
Solutions
Question - 5

Which of the following database is not supported by Hibernate?

  • Oracle
  • Microsoft SQL Server Database
  • FoundationDB
  • Informix Dynamic Server
Solutions
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
Solutions
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
Solutions
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
Solutions
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
Solutions
Question - 10

Which of the following are tags of hibernate.cfg.xml?

  • SQL variant to generate
  • DTD
  • JDBC connection
  • All of these
Solutions
Question - 11

To persist collections of embeddable type hibernates uses:

  • OneToMany
  • ElementCollection
  • Both A and B
  • None of these
Solutions
Question - 12

Select the design pattern that should be followed while creating SessionFactory in hibernate?

  • Singleton
  • Prototype
  • Both A and B
  • None of these
Solutions
Question - 13

How many layers are available in Hibernate architecture?

  • 3
  • 5
  • 4
  • 2
Solutions
Question - 14

Which of the following is not a Session method?

  • Session.save()
  • Session.saveorupdate()
  • Session.remove()
  • Session.persist()
Solutions
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
Solutions
Question - 16

HQL stands for -

  • Hibernate Queue Language
  • Hibernate Query Language
  • Hypertext Query Language
  • HighSpeed Query Language.
Solutions
Question - 17

Which of the following methods returns a proxy object in Hibernate?

  • getDatabase()
  • loadDatabase()
  • loadAsyc()
  • load()
Solutions
Question - 18

_______________is not a core interface of Hibernate.

  • SessionManagement
  • Configuration
  • Session
  • Criteria
Solutions
Question - 19

The database table configuration is stored in ______________ file.

  • .sql
  • .ora
  • .dbm
  • .hbm
Solutions
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
Solutions
Tags:
60+ Best Hibernate Interview Questions, Hibernate MCQ questions for placement,Hibernate interview questions, Previously asked Hibernate Questions, Frequently asked Hibernate Questions,Hibernate Questions for TCS, Hibernate Interview Questions for Freshers, Hibernate Interview Questions for Experience, Accenture Hibernate Interview Questions, Hibernate Objective Questions for Interview


Practice More sets Questions