Saturday, December 24, 2011

SQL Server interview questions: - State publisher, distributor and subscriber in “Replication”?

This is the most expected asked SQL Server interview questions during the interview by the interviewer.

Publisher is the one who owns the database and is the main source for data. Publisher identifies what data should be distributed across.

Distributor is a bridge between publisher and subscriber. Distributor gathers all the published data and holds it until it sends it across to all subscriber. So as it is a bridge who sits in between publisher and subscriber, it supports multiple publisher and subscriber concept.

Subscriber is the end source or the final destination to which data has to be transmitted.


                      Figure: - Publisher, Distributor and Subscriber in action

View video on Query Plan, Logical/Physical operators in SQL Server as follows: -



Click for more SQL Server interview questions

Regards,

Visit for more author’s blog on SQL Server interview questions

Thursday, December 22, 2011

SQL Server interview questions: - Different types of relationship existing in database designing?

This is one of the most favorite SQL Server interview questions asked by the interviewer during the interview.

We have tried to keep answer as simple as we can. So starts the answer as, basically there are three major relationship models: -
  • One-to-one

                      Figure: - One-to-One relationship ER diagram
  • One-to-many
In this many records in one table corresponds to the one record in other table. Example: - Every one customer can have multiple sales. So there exist one-to-many relationships between customer and sales table.

One “Asset” can have multiple “Maintenance”. So “Asset” entity has one-to-many relationship between them as the ER model shows below.


                     Figure: - One-to-Many Relationship ER diagram
  • Many-to-many
In this, one record in one table corresponds to many rows in other table and also vice-versa. For instance :- In a company one employee can have many skills like java , c# etc and also one skill can belong to many employees.

Given below is a sample of many-to-many relationship. One employee can have knowledge of multiple “Technology”. So in order to implement this we have one more table “Employee Technology” which is linked to the primary key of “Employee” and “Technology” table.


                  Figure: - Many-to-Many Relationship ER diagram
Also see the following video on differences between unique key and primary key in SQL Server as follows:-



Visit for more SQL Server interview questions

Regards,

Get more from author’s blog for SQL Server interview questions

Monday, December 19, 2011

.NET interview questions: - Below are simple two classes Class1 creates objects of Class2 and Class2 creates object of Class1, What will happen?

See the following snap code: -

class Class1 
{
 Class2 o = new Class2();
}
class Class2
{
 Class1 o = new Class1();
}

Answer:

Both the classes are creating objects of each other due which the object will pile up in the memory and lead to "StackOverFlowException". Below is the error image which is displayed once the memory is overused.


See the following video on regular expressions along with some practical demonstrations as follows: -



Visit to get more stuff on  interview questions and answers for .NET

Regards,

Also visit for more author’s other blogs on Most asked .NET interview questions

Saturday, December 10, 2011

.NET/ASP.NET interview questions: - While choosing design, when to consider Data grid, data list, or repeater?

This is one of quiet often asked .NET/ASP.NET interview questions so prepare accordingly to answer it to the interviewer.

Many of the developers make a blind choice of choosing data grid directly, but that is not the right way.

Data grid provides ability to allow the end-user to sort, page, and edit its data. However, it comes at a cost of speed. Second, the display format is simple that is in row and columns. Real life scenarios can be more demanding that

With its templates, the Data List provides more control over the look and feel of the displayed data than the Data Grid. It offers better performance than data grid

Repeater control allows for complete and total control. With the Repeater, the only HTML emitted are the values of the data binding statements in the templates along with the HTML markup specified in the templates—no "extra" HTML is emitted, as with the Data Grid and Data List. By requiring the developer to specify the complete generated HTML markup, the Repeater often requires the longest development time. However, repeater does not provide editing features like data grid so everything has to be coded by programmer. However, the Repeater does boast the best performance of the three data Web controls. Repeater is fastest followed by Datalist and finally data grid.

See video on ASP.NET 4.0 web.config transformation as follows: -



Get more fundamentals stuffs on .NET/ASP.NET interview questions

Regards,
More from author’s blogs on .NET/ASP.NET interview questions for interview references

Monday, December 5, 2011

ASP.NET interview questions: - Working of Forms authentication in ASP.NET

Start answering this ASP.NET interview questions as follows: -

In traditional ASP if you are told to create a login page and do authentication you have to do hell lot of custom coding. Now in ASP.NET that has made easy by introducing Forms authentication. So let us see in detail what form authentication is.

Forms authentication uses a ticket cookie to see that user is authenticated or not. That means when user is authenticated first time a cookie is set to tell that this user is authenticated. If the cookies expire then Forms authentication mechanism sends the user to the login page.

Following are the steps, which defines steps for Forms authentication:-
  • Configure Web.config file with forms authentication. As shown below in the config file you can see we have give the cookie name and loginurl page.
  • Remove anonymous access to the IIS web application, following are changes done to web.config file.
  • Create the login page, which will accept user information. You will have create your login page that is the Login.aspx, which will actually take the user data.
  • Finally a small coding in the login button.
Let us assume that the login page has two textboxes TX name and txtapssword.

Also, import System.Web.Security and put the following code in login button of the page.


See the following video on Single sign-on using forms authentication in ASP.NET as follows: -



Click and see more ASP.NET interview questions

Regards,

Also view author’s other blog on ASP.NET interview questions