databases Online Quiz - 207
|Description: databases Online Quiz - 207|
|Number of Questions: 20|
|Created by: Aliensbrain Bot|
What is the use of reuse storage clause when used with truncate table statement?
Which of the following are valid pseudocolumns in oracle?
For which of these constraints, an unique index is automatically created while creating constraints?
- Which packages contain the JDBC classes?
To answer this question, you need to understand the Java Database Connectivity (JDBC) API and the packages that contain the JDBC classes.
The correct answer is C) java.sql and javax.sql.
Explanation for each option:
Option A) java.jdbc and javax.jdbc - This option is incorrect because there is no package named java.jdbc or javax.jdbc that contains the JDBC classes.
Option B) java.jdbc and java.jdbc.sql - This option is incorrect because there is no package named java.jdbc.sql that contains the JDBC classes.
Option C) java.sql and javax.sql - This option is correct. The JDBC classes are contained in the java.sql and javax.sql packages. These packages provide the necessary classes and interfaces for connecting to and interacting with databases using Java.
Option D) java.rdb and javax.rdb - This option is incorrect because there is no package named java.rdb or javax.rdb that contains the JDBC classes.
In conclusion, the correct answer is C) java.sql and javax.sql because these packages contain the JDBC classes.
5.Which type of Statements can execute parameterized queries?
To answer this question, you need to understand the concept of parameterized queries and the different types of statements in Java.
A parameterized query is a SQL statement that allows you to pass parameters dynamically at runtime. This is useful when you want to execute the same query multiple times with different parameter values.
In Java, there are different types of statements that can be used to execute SQL queries. The options provided are:
A. PreparedStatement - This option is correct because a PreparedStatement is specifically designed to execute parameterized queries. It allows you to define placeholders (parameters) in the SQL statement and then set their values at runtime using methods like
B. ParameterizedStatement - This option is incorrect because there is no built-in interface or class in Java named ParameterizedStatement.
C. ParameterizedStatement and CallableStatement - This option is incorrect because while a CallableStatement can execute stored procedures with parameters, it is not specifically designed for executing parameterized queries. Therefore, only the PreparedStatement is the correct option.
D. All kinds of Statements (i.e. which implement a sub interface of Statement) - This option is incorrect because not all types of statements in Java can execute parameterized queries. Only the PreparedStatement is designed for this purpose.
Therefore, the correct answer is A) PreparedStatement.
6.What is, in terms of JDBC, a DataSource?
To ensure proper data conversion between databases with different character sets, you must ensure that
Which of the following correctly describe the LONG columns (choose all that apply):
Which of the following are the valid datetime datatypes in Oracle (choose all that apply):
Which of the following are the restrictions of creating bitmap indexes (choose all that apply):
Text literals have properties of which of the following datatypes (choose all that apply):
A sequence generates values that are often used for (choose all that apply):
What's command to start DBCONSOLE service on database installed on Linux?
In Oracle, the result of comparison conditions can be (choose all that apply):
What is default location for portlist.ini file?
What command is used to reclaim unused space for table TABLE1?
Single-row functions can appear in which of the following (choose all that apply):