Advanced Java Programming (3160707) MCQs

MCQs of Hibernate 4.0

Showing 21 to 30 out of 40 Questions
21.
In hibernate architecture,______ cache is known as session cache.
(a) First-level Cache
(b) Second-level Cache
(c) Both A & B
(d) None of these
Answer:

Option (a)

22.
In hibernate architecture,______ cache is mainly responsible for caching objects across sessions.
(a) First-level Cache
(b) Second-level Cache
(c) Both A & B
(d) None of these
Answer:

Option (b)

23.
The ______ object keeps an object under its own control before committing it to the database.
(a) Session factory
(b) Query
(c) Session
(d) Criteria
Answer:

Option (c)

24.
Can we configure third-party cache in hibernate?
(a) Yes
(b) No
Answer:

Option (a)

25.
______ mapping can be unidirectional as well as bidirectional.
(a) Collections
(b) Association
(c) Component
(d) None of these
Answer:

Option (b)

26.
The types declared and used in the mapping files are?
(a) Hibernate mapping types
(b) HQL types
(c) SQL database types
(d) Java database types
Answer:

Option (a)

27.
It refers to _____ mapping, If the referred class does not have it's own life cycle and completely depends on the life cycle of the owning entity class.
(a) Collections
(b) Association
(c) Component
(d) None of these
Answer:

Option (c)

28.
The performance of hibernate framework is fast because of?
(a) Cache
(b) Hibernate Objects
(c) Lightweight architecture
(d) ORM
Answer:

Option (a)

29.
HQL doesn’t use real names of table and columns.
(a) True
(b) False
Answer:

Option (a)

30.
Select the correct form of HQL compared with SQL.
ResultSet rs=st.executeQuery("select * from diet");
(a)
Query query= sessionFactory.createQuery("from diet");
(b)
Query query= session.createQuery("from diet");
(c)
Query query= configuration.createQuery("select * from diet");
(d)
Query query= sessionFactory.createQuery("select * from diet");
Answer:

Option (b)

Showing 21 to 30 out of 40 Questions