Search Header Logo

U4. ORM Hibernate

Authored by Héctor L

Computers

University

Used 29+ times

U4. ORM Hibernate
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

34 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main advantage of using Hibernate over JDBC?

Direct manipulation of SQL queries

Abstracting database operations using Java objects

Faster execution speed compared to raw SQL

No need for database configuration

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Hibernate, which method is used to begin a transaction?

session.startTransaction()

session.begin()

session.beginTransaction()

session.newTransaction()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about HQL (Hibernate Query Language) is true?

HQL works directly with database tables

HQL is case-sensitive for class names and properties

HQL allows using * as a wildcard for selecting all columns

HQL does not support aggregate functions

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if a getReference() method is called with a non-existent entity ID?

It returns null

It throws an EntityNotFoundException

It retrieves an empty proxy object

It automatically creates a new entity in the database

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the SessionFactory class in Hibernate?

To perform CRUD operations

To manage database transactions

To create and manage Session objects

To execute HQL queries

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Hibernate, what is the default fetching strategy for @OneToMany relationships?

Eager loading

Lazy loading

Immediate loading

Explicit loading

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to persist an object in Hibernate?

session.insert()

session.persist()

session.saveObject()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?