21.
When will you prefer to use VARCHAR?
When we have a column which contains long text, eg remarks, notes, may have in most cases less than 50% of the maximum length then we use VARCHAR.
22.
List the disadvantages of using VARCHAR?
1.VARCHAR 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.
23.
How do we 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 we CREATE MANAGER table with EMP# as the primary key Then ALTER it to define the foreign key.
24.
What is auditing?
Recording SQL statements that access a table Specified at the table creation time or through alter called Auditing.
25.
Define DB2 bind?
A DB2 bind is a process that builds an access path to DB2 tables.