Friday, October 7, 2011

Database Interview Questions

What is the difference between a "where" clause and a "having" clause?
“Where” is a restriction statement. You use where clause to restrict data being
accessed from the database. Where clause is used before result is retrieved. But
having clause is used after retrieving the data. Having clause is a kind of filtering
command.

What is "normalization"? "Denormalization"? Why do you sometimes want
to denormalize?

Normalizing data means eliminating redundant information from a table and
organizing the data so that future changes to the table are easier. Denormalization
means allowing redundancy in a table. The main benefit of denormalization is
improved performance with simplified data retrieval and manipulation. This is done
by reduction in the number of joins needed for data processing.

What types of join algorithms can you have?
There are three kinds of JOINS in SQL Server, Nested table, Merge and Hash joins.
All of the above depend upon the resources available, MERGE and HASH consume
lots of memory; so, a system that is low on memory would sparingly resort to the
above two join methodologies.

No comments:

Post a Comment