About Hibernate

Following are some of the multiple choice questions on the Hibernate with answers that will help the students in developing their knowledge.

Hibernate MCQ

1. Which of the following is not an advantage of Hibernate Criteria API?

  • Allows to use aggregate functions
  • Cannot order the result set
  • Allows to fetch only selected columns of result
  • Can add conditions while fetching results

2. Why do animals hibernate?

  • They are tired
  • They want to move to a warmer place
  • To help them survive the winter
  • None of these

3. Which of the following object is used to create SessionFactory object in hibernate?

  • SessionFactory
  • Transaction
  • Configuration
  • Session

4. Which of the following is true about hibernate annotations?

  • All the metadata is clubbed into the POJO java file along with the code this helps the user to understand the table structure and POJO simultaneously during the development
  • Hibernate Annotations is the powerful way to provide the metadata for the Object and Relational Table mapping
  • Both of the above
  • None of the above

5. Which of the following is FALSE about Session in hibernate

  • Session represents a single unit-of-work with the database
  • Session is the primary interface for the persistence service
  • Session is a light weight non-threadsafe object
  • You can share the session between threads

6. Persistent objects and collections in hibernate are

  • Short-lived, single threaded objects
  • Long-lived, multi threaded objects

7. Why do animals sleep?

  • They need to recharge energy.
  • They had a busy day.
  • Their mom makes them.
  • They don't like the dark.

8. Why do animals eat a lot to prepare for hibernation?

  • To find a good place.
  • To use this fat to feed their bodies while they hibernate.
  • It burrows into the mud.
  • Both A & B

9. Why must an animal find a good place to hibernate?

  • To protect it from the cold.
  • To protect it from predators.
  • All of the above.
  • none of the above

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

  • True
  • False

11. Why do hibernating animals wake up in the spring?

  • it rains too much, and their homes get wet. 
  • The birds wake them up.
  • They can find food, and its warmer
  • All of the above

12. Why do hibernating animals wake up in the spring?

  • It rains too much, and their homes get wet.
  • The birds wake them up.
  • They can find food, and its warmer
  • All of the above

13. The lesson suggests we think of hibernation as the animal putting their body on...

  • vacation.
  • pause.
  • display.
  • None of these

14. Which ways are used by the Log4j and Logback frameworks in hibernate framework to support logging?

  • By log4j.xml file
  • By log4j.properties
  • Both A & B
  • None of these

15. Which of the following is not a core interface of Hibernate?

  • Configuration
  • Criteria
  • SessionManagement
  • Session

16. Abbreviate the term HQL?

  • Hibernate Queue Language
  • Hibernate Query Language
  • Hipher Query Language
  • None of the above

17. Which of the following is NOT a mapping association used in Hibernate?

  • Many-to-Many Association
  • One-to-Many Associationcorrect
  • One-to-One Association
  • None

18. Which of these simplifies an Object Relational Mapping tool?

  • Data creation
  • Data manipulation
  • Data access
  • All mentioned above

19. A hibernating bear needs less of ....

  • food
  • oxygen
  • water
  • All of above

20. Which of the following warm-blooded animal Does NOT hibernate?

  • Groundhog
  • Artic Fox
  • Prairie dog
  • Chipmunk

21. A bear does not really hibernate, becuase it can wake up.

  • True 
  • False 

22. When an animal wakes from hibernation it will have less ___________ than it did before hibernation.

  • body fat
  • fur
  • burrow 
  • relatives 

23. An animal chooses a place to hibernate based on its _________.

  • habits
  • habitat
  • mood
  • fat level

24. Instead of hibernating, some animals _______ to warmer places.

  • survive
  • sleep
  • burrow
  • migrate

25. What is one way snakes and many insects are alike?

  • Snakes and many insects eat mice. 
  • Snakes and many insects hibernate in mud. 
  • Snakes and many insects have six legs.
  • Snakes and many insects hibernate during winter. 

26. What is the main idea of the book, Hibernation?

  • Some animals hibernate to survive the winter.
  • Hibernation is like a sound sleep.
  • Bats hibernate in caves.
  • Bears often wake up and move in winter. 

27. What do frogs and turtles have in common?

  • They both sleep in mud at the bottom of a pond.
  • They both hibernate.
  • They are both cold-blooded.
  • All of the above

28. Hibernating animals try and stay safe from predators.What are predators?

  • cold habitats
  • plants that many animals eat
  • bats that live in dens and caves 
  • animals that hunt and eat other animals

29. Why did the author write the book, Hibernation?

  • To give information about hibernation
  • To explain why geese migrate
  • To tell people about bats and bears
  • To make people laugh about hibernation

30. What is one difference between hibernation and torpor?

  • Hibernation is a deeper sleep
  • Torpor involves deeper breathing
  • Torpor lasts forever
  • Hibernation happens in winter

31. What causes animals to hibernate?

  • very cold air temperatures 
  • lack of food
  • a need to survive
  • all of the above 

32. Which of the following methods hits database always?

  • load()
  • loadDatabase()
  • getDatabase()
  • get()

33. During hibernation, an animal’s heart rate slows down. What will happen when the animal wakes up?

  • Its heart rate gets faster.
  • Its heart stops beating.
  • Its body temperature goes down.
  • All of above

34. A bat would be most happy hibernating in

  • an igloo.
  • a beach.
  • a cave.
  • None of these

35. How does an animal prepare for migration?

  • The animal plays until it gets tired
  • It finds shelter
  • The animal eats lots of food and stores it as fat
  • All of above

36. What would a ground squirrel do FIRST to prepare for winter?

  • Eat a lot of food to store up fat.
  • Lower its body temperature.
  • Sleep through winter.
  • All of above

37. Squirrels store nuts, acorns, and seeds for the winter.

  • Yes 
  • No 

38. Hibernation is an important way for animals to CONSERVE energy in the winter. CONSERVE probably means

  • to save.
  • to make.
  • to waste
  • None of these

39. Why do polar bears have white fur?

  • to help them grow strong and big
  • to help them swim in the ocean
  • to help them hide in the snow
  • Both A & B

40. What is an example of how an animal adapts?

  • to go to sleep
  • to help it migrate south
  • to grow thicker fur
  • All of above

41. What might a bird do before migrating?

  • make a new nest
  • store food as body fat to use later
  • look at a map
  • None of these

42. Where would a goose fly for the winter?

  • a warmer place
  • a zoo
  • a school
  • All of above

43. What do animals do when they migrate?

  • They sleep all winter.
  • They live in a pond.
  • They move from one place to another.
  • All of above

44. Which 2 animals hibernate?

  • Bears and bats
  • Squirrels and badgers

45. What is hibernation?

  • When an animal goes to a warmer place in the winter.
  • When an animal goes into a deep sleep in the winter.
  • When an animal plays in the winter.
  • Both A & B

46. What animals migrate?

  • bears, bats, snakes
  • some birds, whales, butterflies
  • all of the above
  • All of above

47. What happens during hibernation?

  • The animal plays all winter
  • The animal travels to a warmer place
  • The heart rate of the animal slows down
  • Both A & B

48. Lightweight light-recorders don't broadcast so we need to recapture the birds to get the data, but we can then use ancient navigation methods to reconstruct the bird's daily location. What were the navigation methods they used?

  • To use the light-recorders to help indicate the latitude and longitude.
  • To use the birds shadow as an indicator.
  • To measure the birds power levels.
  • To see how much noise the birds make.

49. How did scientist find a solution to track smaller birds?

  • They used a tiny light-level recorder, clock, and memory chip, which together weigh as much as a raisin. (about 0.5 gram)
  • They made the birds stronger.
  • They hypnotised the birds.
  • They made the birds go to the gym.

50. What were some of the initial problems of attaching satellite tracking devices to smaller birds?

  • The devices did not suit the birds fashion.
  • The devices were too heavy for the smaller birds to fly with.
  • The birds would eat the devices.
  • It messed with the internet reception.

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.