Home / CSE MCQs / Hibernate-CSE ::

CSE MCQs :: Hibernate-CSE

  1. Which of the following is FALSE about Session in hibernate
  2. A.
    Session is a lightweight non-threadsafe object
    B.
    You can share the session between threads
    C.
    Session represents a single unit-of-work with the database
    D.
    Session is the primary interface for the persistence service

  3. Which of the following is true about query level cache in hibernate?
  4. A.
    Query level cache is an optional feature
    B.
    Query level cache requires two additional physical cache regions that hold the cached query results and the timestamps when a table was last updated
    C.
    Query level cache is only useful for queries that are run frequently with the same parameters
    D.
    All of the above

  5. The QBC stands for
  6. A.
    Query By Call
    B.
    Query By Column
    C.
    Query By Criteria
    D.
    Query By Code

  7. What does the Session object hold?
  8. A.
    First Level Cache
    B.
    Second Level Cache
    C.
    Both A & B
    D.
    None of the above

  9. If a single table hosts all the instances of a class hierarchy, then it is known as
  10. A.
    Joined subclass strategy
    B.
    Single table per class hierarchy strategy
    C.
    Both
    D.
    None

  11. Select the design pattern that should be followed while creating SessionFactory in hibernate?
  12. A.
    Singleton
    B.
    Prototype
    C.
    Both
    D.
    None

  13. The Hibernate XML configuration file name is?
  14. A.
    hibernate.cfg.xml
    B.
    hibernate.config.xml
    C.
    hibernate.cg.xml
    D.
    None

  15. Which ways are used by the Log4j and Logback frameworks in hibernate framework to support logging?
  16. A.
    By log4j.xml file
    B.
    By log4j.properties
    C.
    Both A & B
    D.
    None of the above

  17. What does hibernate.hbm2ddl.auto create this means?
  18. A.
    create tables automatically
    B.
    create session object automatically
    C.
    create Session Factory object automatically
    D.
    None

  19. How many layers are available in Hibernate architecture?
  20. A.
    3
    B.
    4
    C.
    5
    D.
    2