DB2 Interview Questions – Set 04

What is CHECK constraint in DB2?

Check constraint is a database rule that checks data integrity. Thus, only values from the domain for the attribute or column are allowed.

What is the use of predicate?

Predicates are used to enhance the performance of query.

What is the use of DB2 Optimizer?

  • DB2 Optimizer is used to process the SQL statement.
  • DB2 Optimizer can be used to enhance the performance of SQL.

Which component is responsible for processing SQL statements and selecting access paths?

DB2 optimizer is used to select the access paths and for processing SQL statements.

How can you classify the locks in DB2?

Locks can be classified based on size, duration and mode.

What is cursor stability in DB2?

Cursor stability ensures that any row that has been changed by activation group with a dissimilar commitment definition cannot be read before committing.

What are the advantages of using a package?

The package provides following advantages:

  • Modularity
  • Easy to design the applications
  • Better performance
  • Hiding information
  • Added functionality
  • Overloading

Where can you declare a cursor in a COBOL-DB2 program?

A cursor can be declared either in Working Storage Section or in Procedure Division also.

What is DB2 Bind?

DB2 bind is process that prepares an access path to the data. This access path is stored as a package in the DB2 catalogue.

What is concurrency in DB2?

Concurrency is the process in which more than one application can access the similar data at same time.