106) What do you mean by NOT NULL? When will you use it?
The column cannot have nulls. Use it for key fields.
107) When would you prefer to use VARCHAR?
When a column which contains long text, e.g. remarks, notes, may have in most
cases less than 50% of the maximum length.
108) What are the disadvantages of using VARCHAR?
1. Can lead to high space utilization if most of the values are close to
maximum.
2. Positioning of VARCHAR column has to be done carefully as it has
performance implications.
3. Relocation of rows to different pages can lead to more I/Os on
retrieval.
109) How do I create a table MANAGER ( EMP#, MANAGER) where MANAGER is a
foreign key which references to EMP# in the same table? Give the exact DDL.
First CREATE MANAGER table with EMP# as the primary key. Then ALTER it to
define the foreign key.
When is the authorization check on DB2 objects done - at BIND time or run
time?
At run time.
110) What is auditing?
Recording SQL statements that access a table. Specified at table creation
time or through alter.
|