Thursday, March 27, 2008

Latest Technical Interview Questions & Answers

What is the difference between group by and order by ?

Group by controls the presentation of the rows, order by controls the presentation of the columns for the results of the SELECT statement.

What is a subselect? Is it different from a nested select?

A subselect is a select which works in conjunction with another select. A nested select is a kind of subselect where the inner select passes to the where criteria for the outer select.

Explain an outer join ?

An outer join includes rows from tables when there are no matching values in the tables.

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 do the initials DDL and DML stand for and what is their meaning ?

DDL is data definition language and DML is data manipulation language. DDL statements are CREATE, ALTER, TRUNCATE. DML statements are SELECT, INSERT, DELETE and UPDATE.

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.

What is normalization and what are the five normal forms ?

Normalization is a design procedure for representing data in tabular format. The five normal forms are progressive rules to represent the data with minimal redundancy.

What are the levels of isolation available with DB2V4 ?

CS RR UR( added new for DB2V4 which stands for uncommitted read which allows to retrieve records from the space which has exclusive locks also but data integrity will be affected if this option is used )The best available option for data integrity & data concurrency is CS.

What is the difference between TYPE 1 index & TYPE 2 index ?

TYPE 1 & TYPE 2 are specified when an index is created on the table. TYPE 2 index is the option which comes with DB2V4. With TYPE 2 index data can be retrieved faster as only the data pages are locked and not the index pages. Hence TYPE 2 index is recommended.

What does CURRENTDATA option in bind indicate ?

CURRENTDATA option ensures block fetch while selecting rows from a table. In DB2V4 the default has been changed to NO. Therefore it is necessary to change all the bind cards with CURRENTDATA(YES) which is default in DB2V3 & earlier to CURRENTDATA(NO).

0 comments:

Created by Windy Road - Blogger port by Blogger Templates