1.
What is the collection of data designed to be used by different people is called
Correct Answer
B. Database
Explanation
A collection of data designed to be used by different people is called a database. A database is a structured set of data that is organized and stored in a way that allows for efficient retrieval, manipulation, and management. It is designed to be accessed and used by multiple users simultaneously, making it suitable for collaborative work and sharing information among different individuals or groups.
2.
DB2 is
Correct Answer
A. Relational Database Management system
Explanation
DB2 is a Relational Database Management system. It is a software system designed to manage and organize large amounts of data in a structured manner. It provides a set of tools and functions for creating, modifying, and querying databases. DB2 is widely used in enterprise environments for its reliability, scalability, and support for various platforms. It is not a programming language or a database itself, but rather a software system that manages databases.
3.
What are the aggregate functions supported by DB2 ?
Correct Answer
A. SUM, MAX, MIN, AVG and COUNT
Explanation
DB2 supports several aggregate functions including SUM, MAX, MIN, AVG, and COUNT. These functions are used to perform calculations on a set of values and return a single result. The SUM function calculates the total sum of a column, the MAX function returns the maximum value, the MIN function returns the minimum value, the AVG function calculates the average, and the COUNT function counts the number of rows in a column. These aggregate functions are commonly used in SQL queries to retrieve summarized information from a database.
4.
EXPLAIN allows the user to obtain information regarding the optimizer’s choice of access strategy for a given SQL statements
Correct Answer
A. True
Explanation
The explanation for the given correct answer is that the EXPLAIN command in SQL allows the user to retrieve information about the access strategy chosen by the optimizer for a specific SQL statement. This information can be helpful in analyzing and optimizing the performance of the query, as it provides insights into how the database engine plans to execute the statement and access the necessary data. By understanding the access strategy, users can make informed decisions to improve the efficiency and effectiveness of their SQL queries.
5.
SELECT * FROM ………. will retrieve all columns of the table meeting the selection criteria .
Correct Answer
A. True
Explanation
The SELECT * statement is used to retrieve all columns from a table. In this case, the query is not specifying any specific columns to retrieve, so it will retrieve all columns of the table that meet the selection criteria. Therefore, the given answer "True" is correct.
6.
How does the defining of a stored procedure affect the size of a DB2
database?
Correct Answer
C. It does not affect the size of the database.
It does not affect the size of the database
Explanation
Defining a stored procedure does not affect the size of the database. The size of the database is primarily determined by the amount of data stored in tables, indexes, and other database objects. A stored procedure is a set of SQL statements that are stored and executed on the database server, but it does not consume additional storage space in the database. Therefore, defining a stored procedure does not impact the overall size of the database.
7.
Which authority can be granted to a group of users using the GRANT statement?
Correct Answer
C. SYSADM
Explanation
The authority that can be granted to a group of users using the GRANT statement is SYSADM.
8.
Given the statement
CREATE TABLE userid.test (
date_taken DATE NOT NULL,
number SMALLINT NOT NULL,
PRIMARY KEY (number))
Correct Answer
A. Userid
9.
Which system catalog view can be used to determine when a bind
operation was performed on a given package?
Correct Answer
A. SYSCAT.PACKAGES
Explanation
SYSCAT.PACKAGES can be used to determine when a bind operation was performed on a given package. This system catalog view contains information about all the packages in the database, including the timestamp of the last bind operation performed on each package. By querying this view, one can retrieve the timestamp and determine when the bind operation was executed.
10.
Which type of cursor should be used so that its position will be
maintained between transactions?
Correct Answer
C. WITH HOLD
Explanation
The correct answer is WITH HOLD. When using the WITH HOLD cursor, its position is maintained between transactions, meaning that the cursor will stay at the same position even after a transaction is committed. This allows for easy navigation and retrieval of data in subsequent transactions without having to reposition the cursor.