JDBC, Java Server Pages, and MySQL
Q. In JDBC, which method is used to execute a SQL statement?
A.
executeQuery()
B.
runQuery()
C.
executeSQL()
D.
executeStatement()
Show solution
Solution
In JDBC, the method used to execute a SQL statement is 'executeQuery()'.
Correct Answer: A — executeQuery()
Learn More →
Q. What does JDBC stand for?
A.
Java Database Connectivity
B.
Java Data Base Connection
C.
Java Data Connection Bridge
D.
Java Database Connection
Show solution
Solution
JDBC stands for Java Database Connectivity, which is an API for connecting and executing queries on a database.
Correct Answer: A — Java Database Connectivity
Learn More →
Q. What does the term 'ACID' stand for in database transactions?
A.
Atomicity, Consistency, Isolation, Durability
B.
Atomicity, Consistency, Integrity, Durability
C.
Atomicity, Concurrency, Isolation, Durability
D.
Atomicity, Consistency, Isolation, Dependability
Show solution
Solution
ACID stands for Atomicity, Consistency, Isolation, and Durability, which are the properties that guarantee reliable processing of database transactions.
Correct Answer: A — Atomicity, Consistency, Isolation, Durability
Learn More →
Q. What is the main purpose of concurrency control in a DBMS?
A.
To prevent data loss
B.
To ensure data consistency
C.
To speed up data retrieval
D.
To manage user permissions
Show solution
Solution
The main purpose of concurrency control in a DBMS is to ensure data consistency when multiple transactions are executed simultaneously.
Correct Answer: B — To ensure data consistency
Learn More →
Q. Which of the following is a characteristic of a relational database?
A.
Data is stored in tables
B.
Data is stored in files
C.
Data is stored in objects
D.
Data is stored in arrays
Show solution
Solution
A characteristic of a relational database is that data is stored in tables.
Correct Answer: A — Data is stored in tables
Learn More →
Q. Which of the following is NOT a type of normalization?
A.
First Normal Form
B.
Second Normal Form
C.
Third Normal Form
D.
Fourth Normal Form
Show solution
Solution
Fourth Normal Form is a valid type of normalization; however, the question is misleading as all options are types of normalization.
Correct Answer: D — Fourth Normal Form
Learn More →
Q. Which SQL statement is used to create an index?
A.
CREATE INDEX
B.
ADD INDEX
C.
NEW INDEX
D.
INDEX CREATE
Show solution
Solution
The SQL statement used to create an index is 'CREATE INDEX'.
Correct Answer: A — CREATE INDEX
Learn More →
Showing 1 to 7 of 7 (1 Pages)