-
What is a NULL value? What are the pros and cons of using NULLS?
A NULL value takes up one byte of storage and indicates that a value is not present as opposed to a space or zero value. It's the DB2 equivalent of TBD on an organizational chart and often correctly portrays a business situation. Unfortunately, it requires extra coding for an application program to handle this situation.
-
-
-
What is a lock?
A lock is the mechanism that controls access to data pages and tablespaces.
-
What is a synonym? How is it used?
A synonym is used to reference a table or view by another name. The other name can then be written in the application code pointing to test tables in the development stage and to production entities when the code is migrated. The synonym is linked to the AUTHID that created it.
-
-
-
What is a precompiler?
It is a DB2 facility for static SQL statements - it replaces these statements with calls to the DB2 language interface module.
-
-
What are foreign keys?
These are attributes of one table that have matching values in a primary key in another table, allowing for relationships between tables.
-
-
-
-
If the base table underlying a view is restructured, eg. attributes are added, does the application code accessing the view need to be redone?
No. The table and its view are created anew, but the programs accessing the view do not need to be changed if the view and attributes accessed remain the same.
-
-
-
What is a clustered index?
For a clustered index DB2 maintains rows in the same sequence as the columns in the index for as long as there is free space. DB2 can then process that table in that order efficiently.
-
What is the FREE command?
The FREE command can be used to delete plans and/or packages no longer needed.
-
What is a thread?
A thread is the connection between DB2 and some other subsystem, such as CICS or IMS/DC.
-
What is meant by isolation level?
This is a key concept for any relational database. Isolation level is the manner in which locks are applied and released during a transaction. For DB@ a 'repeatable read' holds all locks untile the transaction completes or a syncpoint is issued. For transactions using 'cursor stability' the page lock releases are issued as the cursor 'moves', i.e. as the transaction releases addressability to the...
DB2 Interview Questions
Ans