WorksheetsJDBC Quiz
Total questions: 18
Worksheet time: 14mins
What does JDBC stand for?
Java Database Connectivity
Java Data Base Connection
Java Database Connection
Java Data Connectivity
Loại driver JDBC nào bị khuyến cáo không nên sử dụng do driver mỏng?
Driver gốc
Driver giao thức mạng
JDBC-ODBC Bridge
Driver mỏng
Phương pháp nào được sử dụng để thiết lập kết nối cơ sở dữ liệu trong JDBC?
Statement.executeQuery()
Connection.createStatement()
ResultSet.next()
DriverManager.getConnection()
Which of the following is NOT a method of the Connection interface?
prepareStatement()
createStatement()
executeQuery()
setAutoCommit()
What is the default auto-commit mode of a Connection object?
Not defined
Depends on the driver
True
False
Phương pháp nào được sử dụng để thực thi một lô lệnh trong JDBC?
executeUpdate()
addBatch()
executeQuery()
executeBatch()
Mục đích của PreparedStatement là gì?
Quản lý giao dịch
Chỉ thực thi SQL tĩnh
Thực thi các truy vấn có tham số
Tạo một cơ sở dữ liệu mới
Which of the following is a valid JDBC driver type?
Network Protocol Driver
JDBC-ODBC Bridge
Native API Driver
All of the above
What does the ResultSet interface represent?
A statement to execute SQL
The result set of a database query
A connection to the database
A driver for the database
Phương pháp nào được sử dụng để đăng ký một driver với DriverManager?
registerDriver()
createStatement()
deregisterDriver()
getConnection()
What is the purpose of the rollback() method?
To close the connection
To execute a query
To cancel the transaction
To commit the transaction
Which of the following is a feature of CallableStatement?
It can execute SQL queries only
It can call stored procedures
It is slower than PreparedStatement
It cannot accept parameters
Phương thức commit() trong JDBC làm gì?
Nó hủy bỏ giao dịch hiện tại
Nó truy xuất dữ liệu từ cơ sở dữ liệu
Nó đóng kết nối cơ sở dữ liệu
Nó lưu tất cả các thay đổi đã thực hiện trong giao dịch hiện tại
Loại nào sau đây KHÔNG phải là một loại ResultSet?
TYPE_SCROLL_SENSITIVE
TYPE_SCROLL_INSENSITIVE
TYPE_FORWARD_ONLY
TYPE_READ_ONLY
Which class or interface contains the transaction control methods setAutoCommit, commit, and rollback?
Connection
ResultSet
Statement
PreparedStatement
Nếu một người có ý định làm việc với ResultSet, phương thức preparedStatement nào dưới đây sẽ không hoạt động?
executeUpdate()
execute()
executeQuery()
Mục đích chính của lớp DriverManager trong JDBC là gì?
Để tạo các đối tượng ResultSet
Để quản lý các kết nối cơ sở dữ liệu
Để thực thi các câu lệnh SQL
Để xử lý giao dịch
What does the setAutoCommit(false) method do in JDBC?
It enables auto-commit mode
It disables auto-commit mode
It rolls back the current transaction
It commits the current transaction
