Tag: database

Questions Related to database

Which of the following elements are the valid components of ACID in a relational database transaction?

  1. Atomicity

  2. Consistency

  3. Isolation

  4. Durability

  5. All of the above


Correct Option: E
  1. a thread

  2. an opened connection

  3. a closed connection

  4. a pipe


Correct Option: B
  1. DROP SCHEMA CASCADE

  2. DROP SCHEMA RESTRICT

  3. DROP SCHEMA ALL

  4. DROP SCHEMA CLEAR

  5. DROP SCHEMA OPTS


Correct Option: A
  1. Process Manager

  2. Cache Manager

  3. Transaction Manager

  4. Lock Manager

  5. C&D


Correct Option: E
  1. CREATE SCHEMA

  2. CREATE TABLE

  3. CREATE DOMAIN

  4. CREATE INDEX

  5. All of the above


Correct Option: E
  1. DROP SCHEMA RESTRICT

  2. DROP SCHEMA OPTS

  3. DROP SCHEMA CASCADE

  4. DROP SCHEMA CLEAR


Correct Option: A
  1. two phase commit

  2. prefetch transaction

  3. one phase commit

  4. backup and restore

  5. All of the above


Correct Option: A

Under JDBC, which of the following types of instances can be created by the Connection object?

  1. PreparedStatement

  2. CallableStatement

  3. Statement

  4. SQLStatement

  5. AB&C


Correct Option: E

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) PreparedStatement - This option is correct. The Connection object in JDBC can create instances of PreparedStatement. PreparedStatement is used to execute parameterized SQL queries and provides better performance and security compared to Statement.

Option B) CallableStatement - This option is correct. The Connection object in JDBC can create instances of CallableStatement. CallableStatement is used to execute stored procedures in the database.

Option C) Statement - This option is correct. The Connection object in JDBC can create instances of Statement. Statement is used to execute simple SQL queries.

Option D) SQLStatement - This option is incorrect. SQLStatement is not a valid class or interface in JDBC.

Based on the explanations above, the correct answer is E) AB&C. The Connection object in JDBC can create instances of PreparedStatement, CallableStatement, and Statement.