Which of the following is NOT a step in the Hibernate communication with RDBMS?

  1. Create HQL Query

  2. Execute query to get list containing Java objects

  3. Load the Hibernate configuration file and create configuration object

  4. Create session from configuration object

  5. Get one session from the session factory


Correct Option: A,B,C,E

AI Explanation

To answer this question, you need to understand the steps involved in Hibernate communication with RDBMS.

Let's go through each option to understand why it is correct or incorrect:

Option A) Create HQL Query - This option is incorrect because creating an HQL (Hibernate Query Language) query is indeed a step in Hibernate communication with RDBMS. HQL is a language similar to SQL but specifically designed for querying Hibernate-managed entities.

Option B) Execute query to get list containing Java objects - This option is incorrect because executing a query to retrieve a list of Java objects is another step in Hibernate communication with RDBMS. Hibernate translates the HQL query into SQL and executes it against the database to retrieve the desired data.

Option C) Load the Hibernate configuration file and create configuration object - This option is incorrect because loading the Hibernate configuration file and creating a configuration object is an essential step in Hibernate communication with RDBMS. The configuration file contains information about the database connection, mapping information, and other Hibernate-specific settings.

Option D) Create session from configuration object - This option is correct because creating a session from the configuration object is indeed a step in Hibernate communication with RDBMS. The session represents a single-threaded context for executing database operations.

Option E) Get one session from the session factory - This option is incorrect because getting a session from the session factory is also a step in Hibernate communication with RDBMS. The session factory is responsible for creating and managing sessions.

Based on the above analysis, the correct answer is option A,B,C,E.

Find more quizzes: