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 JSP stand for in the context of web development?
A.
Java Server Pages
B.
Java Simple Pages
C.
Java Script Pages
D.
Java Server Protocol
Show solution
Solution
JSP stands for Java Server Pages, which is a technology used for developing web pages that support dynamic content.
Correct Answer:
A
— Java Server Pages
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. What is the primary purpose of Java Server Pages (JSP)?
A.
To create dynamic web content
B.
To manage database connections
C.
To handle server-side scripting
D.
To compile Java code
Show solution
Solution
The primary purpose of Java Server Pages (JSP) is to create dynamic web content by embedding Java code in HTML.
Correct Answer:
A
— To create dynamic web content
Learn More →
Q. What is the role of Java Server Pages (JSP) in web applications?
A.
To manage database connections
B.
To create dynamic web content
C.
To handle server-side scripting
D.
To store data in a database
Show solution
Solution
Java Server Pages (JSP) are used to create dynamic web content by embedding Java code in HTML pages.
Correct Answer:
B
— To create dynamic web content
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 a component of DBMS architecture?
A.
User Interface
B.
Database Engine
C.
Data Storage
D.
All of the above
Show solution
Solution
All of the above are components of DBMS architecture, including user interface, database engine, and data storage.
Correct Answer:
D
— All of the above
Learn More →
Q. Which of the following is a feature of MySQL?
A.
Supports only SQL queries
B.
Is a NoSQL database
C.
Is open-source
D.
Does not support transactions
Show solution
Solution
MySQL is an open-source relational database management system that supports SQL queries and transactions.
Correct Answer:
C
— Is open-source
Learn More →
Q. Which of the following is a type of indexing in databases?
A.
B-tree indexing
B.
C-tree indexing
C.
D-tree indexing
D.
E-tree indexing
Show solution
Solution
B-tree indexing is a common type of indexing used in databases to improve the speed of data retrieval.
Correct Answer:
A
— B-tree indexing
Learn More →
Q. Which of the following is a valid JDBC URL format for MySQL?
A.
jdbc:mysql://localhost:3306/mydb
B.
mysql://localhost:3306/mydb
C.
jdbc:mySQL://localhost:3306/mydb
D.
jdbc:mysql:localhost:3306/mydb
Show solution
Solution
The valid JDBC URL format for MySQL is 'jdbc:mysql://localhost:3306/mydb'.
Correct Answer:
A
— jdbc:mysql://localhost:3306/mydb
Learn More →
Q. Which of the following is a valid SQL statement to retrieve all records from a table named 'users'?
A.
SELECT * FROM users;
B.
GET ALL FROM users;
C.
FETCH ALL FROM users;
D.
RETRIEVE * FROM users;
Show solution
Solution
The correct SQL statement to retrieve all records from a table is 'SELECT * FROM users;'.
Correct Answer:
A
— SELECT * FROM users;
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 15 of 15 (1 Pages)