MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Computer Science
Jdbc
Quiz 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Q.1
What are the major components of the JDBC?
DriverManager, Driver, Connection, Statement, and ResultSet
DriverManager, Driver, Connection, and Statement
DriverManager, Statement, and ResultSet
DriverManager, Connection, Statement, and ResultSet
Q.2
Which of these obtains a Connection?
Connection.getConnection(url)
Driver.getConnection(url)
DriverManager.getConnection(url)
new Connection(url)
Q.3
What is the correct sequence to create a database connection?
i, ii, iii, v, iv, vii, viii, vi
i, iii, ii, v, iv, vii, vi, viii
ii, i, iii, iv, viii, vii, v, vi
i, iii, ii, iv, v, vi, vii, viii
Q.4
Parameterized queries can be executed by?
ParameterizedStatement
PreparedStatement
CallableStatement and Parameterized Statement
All kinds of Statements
Q.5
JDBC API supports____________ and __________ architecture model for accessing the database.
Two-tier
Three-tier
Both a and b
Only b
Q.6
In type-1 driver database is _______ and platform is _______.
dependent, dependent
independent, dependent
dependent, independent
independent, independent
Q.7
Which of the following describes the correct sequence of the steps involved in making a connection with a database.Loading the driverProcess the results.Making the connection with the databaseExecuting the SQL statements
1,3,4,2
1,2,3,4
2,1,3,4
4,1,2,3
Q.8
The ……………… object provides you with methods to access data from the table.
ResultSet
Parametrized
TableStatement
Condition
Q.9
Select the packages in which JDBC classes are defined?
jdbc and javax.jdbc
rdb and javax.rdb
jdbc and java.jdbc.sql
sql and javax.sql
Q.10
Which type of driver converts JDBC calls into the network protocol used by the database management system directly?
Type 1 driver
Type 2 driver
Type 3 driver
Type 4 driver
Q.11
The interface ResultSet has a method, getMetaData(), that returns a/an
Tuple
Valuewrong
Object correct
Result
Q.12
The database system compiles the query when it is
Executed
Initialized
Prepared
Invoked
Q.13
Which of the following is not an interface?
ResultSet
DriverManager
Statement
Connection
Q.14
Which packages contain the JDBC classes?
java.jdbc and javax.jdbc
java.jdbc and java.jdbc.sql
java.sql and javax.sql
java.rdb and javax.rdb
Q.15
Which JDBC driver Type(s) can be used in either applet or servlet code?
Both Type 1 and Type 2
Both Type 1 and Type 3
Both Type 3 and Type 4
Type 4 only
Q.16
Stored procedure can be called by using the ????..?
CallableStatement
Statement
CalledStatement
PreparedStatement
Q.17
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?
Methods on the ResultSet class for retrieving SQL SELECT results as Java types.
Methods on the PreparedStatement class for sending Java types as SQL statement parameters.
Methods on the CallableStatement class for retrieving SQL OUT parameters as Java types.
All mentioned above
Q.18
The ………………………….. method executes a simple query and returns a single Result Set object
executeUpdate()
executeQuery()
execute()
noexecute()
Q.19
Which of the following is not a valid statement in JDBC?
Statement
PreparedStatement
QueryStatement
CallableStatement
Q.20
The method on the result set that tests whether or not there remains at least one unfetched tuple in the result set, is said to be
Fetch method
Current method
Next method
Access method
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page