Db2 Mock Test 3

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Sharmiladevi
S
Sharmiladevi
Community Contributor
Quizzes Created: 4 | Total Attempts: 8,433
Questions: 10 | Attempts: 1,834

SettingsSettingsSettings
Mock Test Quizzes & Trivia

Questions and Answers
  • 1. 

    What is the collection of data designed to be used by different people is called

    • A.

      File

    • B.

      Database

    • C.

      Table

    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.

    Rate this question:

  • 2. 

    DB2 is

    • A.

      Relational Database Management system

    • B.

      D) Programming language

    • C.

      ) Database

    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.

    Rate this question:

  • 3. 

    What are the aggregate functions supported by DB2 ?  

    • A.

      SUM, MAX, MIN, AVG and COUNT

    • B.

      SUM and AVG

    • C.

      NONE

    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.

    Rate this question:

  • 4. 

    EXPLAIN allows the user to obtain information regarding the optimizer’s choice of access strategy for a given SQL statements

    • A.

      True

    • B.

      False

    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.

    Rate this question:

  • 5. 

    SELECT * FROM ………. will  retrieve all columns of the table meeting the selection criteria .

    • A.

      True

    • B.

      False

    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.

    Rate this question:

  • 6. 

    How does the defining of a stored procedure affect the size of a DB2 database?

    • A.

      It decreases the size of the database.

    • B.

      It increases the size of the database.

    • C.

      It does not affect the size of the database. It does not affect the size of the 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.

    Rate this question:

  • 7. 

    Which authority can be granted to a group of users using the GRANT statement?

    • A.

      SYSCTRL

    • B.

      DBCTRL

    • C.

      SYSADM

    Correct Answer
    C. SYSADM
    Explanation
    The authority that can be granted to a group of users using the GRANT statement is SYSADM.

    Rate this question:

  • 8. 

    Given the statement      CREATE TABLE userid.test (      date_taken   DATE NOT NULL,      number       SMALLINT NOT NULL,      PRIMARY KEY (number))

    • A.

      Userid

    • B.

      Number

    • C.

      Test

    Correct Answer
    A. Userid
  • 9. 

    Which system catalog view can be used to determine when a bind      operation was performed on a given package?

    • A.

      SYSCAT.PACKAGES

    • B.

      SYSCAT.TIMESTAMP

    • C.

      SYSCAT.ACCESSPLAN

    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.

    Rate this question:

  • 10. 

    Which type of cursor should be used so that its position will be     maintained between transactions?

    • A.

      FOR FETCH

    • B.

      FOR UPDATE

    • C.

      WITH HOLD

    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.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jul 28, 2011
    Quiz Created by
    Sharmiladevi
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.