Software job search
.net sql interview questions
  The best place for technical interview questions

 
Home.netSql serverAsp.netC#Vb.netAdo.netAjaxMcpd dumpsWord count tool
Sql server interview questions
 
Question 1   What is normalization

Normalization in rdbms is a mechanism to reduce data redundancy in database tables. normalization uses relational structure to reduce the data redundancy. normalization divides larger tables into smaller tables by defining relations between them. 1nf, 2nf, 3nf and bcnf are some of the common normalization methods in rdbms. normalization sometimes result in slowness because it is using joins to retrieve data



Question 2   What are different types of normalization

1nf - first normal form defines that no two rows of data contain repeating information or each set of column should have a unique value.

ex –
studentname subjects
--------------------------------------------------------------------
john english,maths

the above table when converted to 1nf will be like this

studentname subjects
--------------------------------------------------------------------
john english
john maths

2nf – in order to be in 2nf it should satisfy the below conditions
1) it should be in 1nf.
2) all non-key attributes should have a dependency on the primary key.

3nf - in order to be in 2nf it should satisfy the below conditions
1) it should be in 1nf.
2) all non-key attributes should have a dependency only on the primary key. if there is a dependency other than the primary key those should be moved to a separate table.

4nf – it is also known as boyce–codd normal form (bcnf). it is a slightly higher version on 3nf.
in order to be in 2nf it should satisfy the below conditions
1) it should be in 1nf.
2) it should not have multiple overlapping candidate keys




Question 3   What is denormalization

Normalization in rdbms is a mechanism to reduce data redundancy in database tables. but normalization sometimes will result in slowness because it is using joins to retrieve data. in such cases we will have reduce level of normalization for fast retrieval of data. this is known as denormalization



Question 4   What is candidate key

In some tables there will be multiple columns which can be selected as a primary key. such columns are known as candidate keys. out of these candidate keys only one can be selected as a primary key



Question 5   What are the different types of joins

Inner join – this is the default join in sql server. in this join data will be retrieved only if both the tables have a matching record

left outer join (also known as left join) – in this join all the rows of the first (left) table will be returned. if it is not able to find a match in the second (right) table null values will be displayed. otherwise values of the right table will be displayed

right outer join (also known as right join) – in this join all the rows of the second (right) table will be returned. if it is not able to find a match in the first (left) table null values will be displayed. otherwise values of the left table will be displayed

cross join – a cartesian product of both tables will be displayed. if table a has 2 rows and table b has 5 rows the resulting join will have 10 rows (2 x 5)



Question 6   What are indexes?

Indexes are used in a table for fast retrieval of data while searching. indexes works in the same way similar to a dictionary where finding a word is much more easier than compared to a normal book.

there are 2 types of indexes in sql server

clustered index – only 1 is allowed in a table.

nonclustered index – sql 2012 allows up to 999 nonclustered indexes in a table




 Rate this page
     
 33 votes , average 5 out of 5
1 2 

Reader's opinions -

No comments
Loading

 
.net interview questions
Asp.net interview questions
C# interview questions
Vb.net interview questions
Ado.net interview questions
Ajax interview questions
Wcf interview questions
Wpf interview questions
.net threading interview questions
.net remoting and webservices interview questions
.net caching interview questions
.net oops interview questions
Sharepoint interview questions
Jquery interview questions
Silverlight interview questions
Linq interview questions
Wwf interview questions
Java interview questions
Sql server interview questions
Ssis interview questions
Ssrs interview questions
Data warehousing interview questions
Data mining interview questions
Oracle interview questions
Php interview questions
Design patterns interview questions
Uml interview questions
Mcpd dumps
Pmp practice tests

This site is best viewed with Internet Explorer 7.0 or higher, Firefox 2.0 or higher, Chrome at a minimum screen resolution of 1024x768.
A complete solution to interview questions
free matrimonial website      
web hosting plans |  compare vps hosting plans |  Compare dedicated hosting plans |  Compare linux hosting plans |  Compare cloud hosting plans |  Compare windows hosting plans | 
Hosting reviews |  GoDaddy reviews | 
Support Wikipedia