The Runstats utility collects statistics about ________ in DB2.

  • Database objects
  • Indexes
  • Stored procedures
  • Tables
The Runstats utility in DB2 collects statistics about various database objects such as tables, indexes, columns, and partitions. These statistics help the query optimizer to make informed decisions about the most efficient way to access data, leading to improved query performance. 

Which DB2 feature allows for querying and manipulating XML or JSON data directly?

  • DB2 XML Toolkit
  • JSON_TABLE function
  • SQL/XML
  • XMLTABLE function
The JSON_TABLE function in DB2 allows for querying and manipulating JSON data directly. It provides a way to extract data from JSON documents and transform it into relational format, facilitating seamless integration of JSON data with traditional SQL queries. 

Discuss the benefits of achieving Boyce-Codd Normal Form (BCNF) in database design.

  • Enhancing query performance
  • Improving data integrity
  • Reducing data redundancy and anomalies
  • Simplifying data retrieval
Achieving BCNF helps in minimizing data redundancy and anomalies, thus improving data integrity. It ensures that every determinant is a candidate key, enhancing data integrity. BCNF may simplify data retrieval but does not directly impact query performance. 

What is the difference between range partitioning and hash partitioning in DB2?

  • Data is distributed based on a specified range of values
  • Data is distributed based on hash values of specified columns
  • Data is evenly distributed across partitions
  • Data is randomly distributed across partitions
Range partitioning in DB2 involves distributing data based on a specified range of values for a particular column. Hash partitioning, on the other hand, distributes data based on hash values of specified columns, ensuring even distribution across partitions. Range partitioning is typically used when data can be logically grouped into ranges, while hash partitioning is suitable for distributing data uniformly across partitions. 

What is the purpose of using joins in DB2?

  • To combine rows from two or more tables based on a related column between them
  • To delete duplicate rows in a table
  • To sort the data in a table
  • To update the data in a table
Joins in DB2 are used to combine rows from two or more tables based on a related column between them. This allows for retrieving related data from different tables. 

Describe the role of Access Control Lists (ACLs) in DB2 security.

  • Control access based on alphabetical criteria
  • Control access based on predefined criteria
  • Control access based on random criteria
  • Control access based on user-defined criteria
Access Control Lists (ACLs) in DB2 security enable administrators to define specific criteria for granting or denying access to database objects based on user-defined conditions, ensuring precise control over who can access what. 

Scenario: A developer wants to import data from a CSV file into a DB2 table. However, the CSV file contains a header row that should be excluded during the import process. Which option of the IMPORT utility should they use?

  • MODIFIED BY ANYORDER
  • MODIFIED BY NOHEADERS
  • MODIFIED BY NOCHARDEL
  • MODIFIED BY COLDEL
The MODIFIED BY NOHEADERS option should be used to exclude the header row during the import process. This option instructs the IMPORT utility not to treat the first row of the input file as column data, effectively skipping it during the import operation. This ensures that only the actual data from the CSV file is imported into the DB2 table, without including the header row. 

The COUNT() function in DB2 returns the ________ of rows that meet the specified condition.

  • Number
  • Sum
  • Count
  • Average
The correct option is "Count". The COUNT() function in DB2 returns the number of rows that meet the specified condition. It is commonly used to count the number of rows in a table that satisfy certain criteria. 

The Lock Manager in DB2's architecture ensures ________.

  • Buffer management
  • Data consistency in multi-user environments
  • Data storage and retrieval
  • Query optimization
The Lock Manager in DB2 ensures data consistency in multi-user environments by managing locks on data resources. It ensures that transactions execute serially and concurrently without interfering with each other, thus maintaining data integrity and preventing conflicts. Locks are used to control access to data and prevent concurrent transactions from modifying the same data simultaneously, thereby avoiding inconsistencies. 

What distinguishes different editions of DB2?

  • Functionality
  • Pricing
  • Supported platforms
  • User interface
Different editions of DB2 are distinguished primarily by their functionality. Each edition offers a different set of features and capabilities catering to specific needs and requirements of users. For example, the Express-C edition is designed for small and medium-sized businesses, while the Enterprise edition provides advanced features for large enterprises. Understanding the distinctions between editions helps database administrators select the appropriate version for their organization's needs.