In DB2's architecture, the Data Manager is responsible for ________.

  • Buffer management
  • Data storage and retrieval
  • Query optimization
  • Transaction management
The Data Manager in DB2's architecture is responsible for managing data storage and retrieval. It handles tasks such as managing database files, storing and retrieving data efficiently, and ensuring data integrity. This includes tasks such as managing table spaces, index spaces, and buffer pools. 

In an ERD, what does a diamond-shaped component represent?

  • Attributes
  • Foreign Keys
  • Primary Keys
  • Relationships
In an Entity-Relationship Diagram (ERD), a diamond-shaped component represents relationships between entities. It signifies how entities are related to each other, whether it's a one-to-one, one-to-many, or many-to-many relationship. 

To verify a successful installation, you can check for the presence of ________.

  • db2.exe
  • db2start
  • db2ls
  • db2level
The correct answer is option D. You can verify a successful installation of DB2 by checking the presence of the db2level command. This command displays the DB2 product level and fix pack information, confirming a successful installation. 

How does the SUM() function behave when applied to a column with NULL values in DB2?

  • It ignores NULL values
  • It replaces NULL with 0
  • It returns NULL
  • It throws an error
The SUM() function in DB2 behaves by ignoring NULL values when applied to a column. It calculates the sum of all non-null values in the specified column. This behavior is important to understand when dealing with numerical data in DB2 queries, as it ensures that NULL values do not affect the calculation of sums. 

In DB2, a UNIQUE constraint ensures that ________.

  • Data types are consistent across tables.
  • Each value in a column or set of columns is unique.
  • Null values are allowed in specified columns.
  • The table has a primary key constraint.
The UNIQUE constraint in DB2 ensures that each value in a specified column or set of columns is unique across all the rows in the table. It prevents duplicate values from being entered into the table. 

What does the Reorg utility do to database objects in DB2?

  • Creates new tables
  • Deletes obsolete rows
  • Reorganizes data and indexes
  • Updates table statistics
The Reorg utility in DB2 reorganizes both data and indexes in database objects. It rearranges the physical storage of data, eliminating fragmentation and reclaiming space, which helps in improving performance. Additionally, it also updates statistics for these objects. It does not create new tables or delete obsolete rows. 

The notation of a dotted line connecting entities in an ERD indicates a ________ relationship.

  • Mandatory
  • Many-to-Many
  • One-to-Many
  • One-to-One
A dotted line connecting entities in an ERD typically represents a one-to-many relationship. This means that one instance of an entity can be associated with multiple instances of another entity, but each instance of the second entity can be associated with only one instance of the first entity. 

Scenario: A data analyst wants to add new data to an existing database table. Which SQL statement should they execute?

  • INSERT INTO
  • UPDATE
  • ADD
  • MODIFY
The correct option is 'INSERT INTO'. This SQL statement is used to add new rows of data into an existing database table. It allows the data analyst to insert specific values into specified columns or insert values from a SELECT statement into the table. 

Scenario: A company's DB2 database experiences a critical failure, and the primary server becomes unavailable. How can the company ensure minimal downtime and data loss?

  • Implementing a high availability solution with automatic failover to a standby server
  • Increasing backup frequency to hourly to minimize data loss
  • Moving all data to a cloud-based storage solution
  • Shutting down all database operations until the primary server is restored
In the event of a critical failure, implementing a high availability solution with automatic failover to a standby server is crucial to minimize downtime and data loss. This involves configuring DB2 for automatic client reroute and using tools like HADR (High Availability Disaster Recovery) to ensure seamless failover to the standby server. This approach ensures that database operations can continue with minimal interruption. 

What are the advantages and disadvantages of using row-level locking in DB2?

  • Advantages: Granular control, Reduced contention
  • Advantages: Improved concurrency, Reduced deadlock
  • Disadvantages: Increased complexity, Higher resource consumption
  • Disadvantages: Increased overhead, Potential for lock escalation
Row-level locking in DB2 provides granular control over data access, allowing transactions to lock only specific rows rather than entire tables. This approach reduces contention and improves concurrency by allowing multiple transactions to access different rows simultaneously. However, row-level locking also introduces overhead due to the need to manage individual locks for each row, and it may lead to lock escalation in situations where a transaction locks too many rows, impacting performance. Additionally, managing row-level locks adds complexity to application development and may require more system resources compared to other locking mechanisms.