Professional Documents
Culture Documents
JDBC Questions - 2
JDBC Questions - 2
Q1. In order to transfer data between a database and an application written in the Java
programming language, the JDBC API provides which of these methods?
a. Methods on the ResultSet class for retrieving SQL SELECT results as Java types.
b. Methods on the PreparedStatement class for sending Java types as SQL statement
parameters.
c. Methods on the CallableStatement class for retrieving SQL OUT parameters as Java types.
d. All mentioned above
Q2) The JDBC API has always supported persistent storage of objects defined in the
Java programming language through the methods getObject and setObject.
a. True
b. False
Q3) Which JDBC type represents a "single precision" floating point number that
supports seven digits of mantissa?
a. REAL
b. DOUBLE
c. FLOAT
d. INTEGER
Q4) Which method is used for retrieving streams of both ASCII and Unicode
characters is new in the JDBC 2.0 core API?
a. getCharacterStream
b. getBinaryStream
c. getAsciiStream
d. getUnicodeStream
Q5) How many Result sets available with the JDBC 2.0 core API?
a. 2 b. 3
c. 4 d. 5
Q8) Which method Drops all changes made since the previous commit/rollback?
a. public void rollback()
b. public void commit()
c. public void close()
d. public Statement createStatement()
Q9) The intent is for JDBC drivers to implement nonscrollable result sets using the
support provided by the underlying database systems.
a. True
b. False
Q10) Which methods returns a stream that simply provides the raw bytes from the
database without any conversion?
a. getCharacterStream
b. getBinaryStream
c. getAsciiStream
d. getUnicodeStream
Q11) The ACID properties does not describes the transaction management well.
a. True b. False
Q12) Which method is used to establish the connection with the specified url in a
Driver Manager class?
a. public static void registerDriver(Driver driver)
b. public static void deregisterDriver(Driver driver)
c. public static Connection getConnection(String url)
d. public static Connection getConnection(String url,StringuserName,String password)
Q14) Which driver Network connection is indirect that a JDBC client makes to a
middleware process that acts as a bridge to the DBMS server?
a. JDBC-Net b. JDBC-ODBC bridge
c. Native API as basis d. Native protocol as basis
Q16) Which kind of driver converts JDBC calls into calls on the client API for Oracle,
Sybase, Informix, IBM DB2, or other DBMS?
a. JDBC-ODBC bridge plus ODBC driver
b. Native-API partly-Java driver
c. JDBC-Net pure Java driver
d. Native-protocol pure Java driver
Q19) Drivers that are JDBC Compliant should normally support scrollable result
sets, but they are not required to do so.
a. True
b. False
Q20) TheResultSet.next method is used to move to the next row of the ResultSet,
making it the current row
a. True
b. False
Q21) The performance of the application will be faster if you use PreparedStatement
interface because query is compiled only once.
a. True
b. False
Q22) Which JDBC type represents a 64-bit signed integer value between -
9223372036854775808 and 9223372036854775807?
a. SMALLINT
b. BIGINT
c. TINYINT
d. INTEGER
Above Yash Jewellers, In front of Pramod Super
MOB- +917276535329
Market, Ausa Road, Latur
Q23) JDBC technology-based drivers generally fit into how many categories?
a. 4 b. 3
c. 2 d. 5
Q25) Which method is used for an SQL statement that is executed frequently?
a. prepareStatement
b. prepareCall
c. createStatement
d. None of the above
Q27) Which JDBC product components does the Java software provide?
a. The JDBC driver manager
b. The JDBC driver test suite
c. The JDBC-ODBC bridge
d. All mentioned above
Q29) Which class has traditionally been the backbone of the JDBC architecture?
a. the JDBC driver manager
b. the JDBC driver test suite
c. the JDBC-ODBC bridge
d. All mentioned above
Q30) Which was the first most widely used programming interface for accessing
relational databases and it offers the ability to connect all the databases on all the
platforms.?
a. JDBC API
b. ODBC API
c. Both A & B
d. None of the above
Above Yash Jewellers, In front of Pramod Super
MOB- +917276535329
Market, Ausa Road, Latur
Q31) How many steps are used to connect any java application using JDBC?
a. 5
b. 4
c. 3
d. 6
Q32) Which model does a Java applet or application talks directly to the data source?
a. Two-tier models
b. Three-tier models
c. Both A & B
d. None of the above
Q33) In the following JDBC drivers which is known as fully java driver?
a. Native-API driver
b. Network Protocol driver
c. Thin driver
d. Both B & C
Q35) What is the reason that a java program cannot directly communicate with an
ODBC driver?
a. ODBC written in C# language
b. ODBC written in C language
c. ODBC written in C++ language
d. None of the above
Q36) A leading database connectivity vendor, worked together to produce the ____.
a. JDBC-ODBC Bridge
b. JDBC Driver Test Suite
c. Both A & B
d. None of the above
Q37) Which driver converts JDBC calls directly into the vendor-specific database
protocol?
a. Native - API driver
b. Network Protocol driver
c. Thin driver
d. Both B & C
Q39) Which of the following JDBC drivers is known as a partially java driver?
a. JDBC-ODBC bridge driver
b. Native-API driver
c. Network Protocol driver
d. Thin driver
Q40) The JDBC API is what allows access to a data source from a Java middle tier
a. True
b. False
Q42) How many JDBC product components does the Java software provides?
a. 3
b. 2
c. 4
d. 5
Q44) Which result set generally does not show changes to the underlying database that
are made while it is open. The membership, order, and column values of rows are
typically fixed when the result set is created?
a. TYPE_FORWARD_ONLY
b. TYPE_SCROLL_INSENSITIVE
c. TYPE_SCROLL_SENSITIVE
d. ALL MENTIONED ABOVE
Q45) JDBC is a Java API that is used to connect and execute query to the database
a. True
b. False
Above Yash Jewellers, In front of Pramod Super
MOB- +917276535329
Market, Ausa Road, Latur