-
What are the three DB2 date and time data types and their associated functions?
The three data types are DATE, TIME and TIMESTAMP. CHAR can be used to specify the format of each type. The DAYS function calculates the number of days between two dates. (It's Y2K compliant).
-
-
What is a composite index and how does it differ from a multiple index?
A multiple index is not one index but two indexes for two different columns of a table. A composite index is one index made up of combined values from two columns in a table. If two columns in a table will often be accessed together a composite index will be efficient.
-
What are leaf pages?
They are the opposite of root pages. Leaf pages are the lowest level index pages - the pages that contain index entries and information to the corresponding table rows.
-
-
Is there any advantage to denormalizing DB2 tables?
Denormalizing DB2 tables reduces the need for processing intensive relational joins and reduces the number of foreign keys.
-
What are the three lock types?
The three types are shared, update and exclusive. Shared locks allow two or more programs to read simultaneously but not change the locked space. An exclusive lock bars all other users from accessing the space. An update lock is less restrictive; it allows other transactions to read or acquire shared locks on the space.
-
What is the SQL Communications Area and what are some of its key fields?
It is a data structure that must be included in any host-language program using SQL. It is used to pass feedback about the sql operations to the program. Fields are return codes, error messages, handling codes and warnings.
-
-
-
-
-
What is a view? Why use it?
A view is a virtual table made up of data from base tables and other views, but not stored separately.
-
-
What is referential integrity?
Referential integrity refers to the consistency that must be maintained between primary and foreign keys, ie every foreign key value must have a corresponding primary key value.
-
-
-
-
Explain the EXPLAIN statement ?
The explain statement provides information about the optimizer's choice of access path of the sql.
-
DB2 Interview Questions
Ans