Which of the following are tags of hibernate.cfg.xml? Select all that apply

  1. DTD

  2. JDBC Connection

  3. SQL Variant to generate

  4. Mapping files

  5. Size of the database


Correct Option: A,B,C,D

AI Explanation

To answer this question, we need to understand what the tags in the hibernate.cfg.xml file represent.

Option A) DTD - This option is correct. The `tag in thehibernate.cfg.xml` file specifies the DTD (Document Type Definition) for the Hibernate configuration file.

Option B) JDBC Connection - This option is correct. In the hibernate.cfg.xml file, the `` tag can be used to configure the JDBC connection properties, such as the database URL, username, password, etc.

Option C) SQL Variant to generate - This option is correct. The `` tag can also be used to specify the SQL dialect or variant to be used by Hibernate for generating the SQL queries.

Option D) Mapping files - This option is correct. The `tag is used in thehibernate.cfg.xml` file to specify the mapping files that define the object-relational mapping between Java classes and database tables.

Option E) Size of the database - This option is incorrect. The size of the database is not a tag in the hibernate.cfg.xml file.

The correct answers are A) DTD, B) JDBC Connection, C) SQL Variant to generate, and D) Mapping files.

Find more quizzes: