<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-661597201796672556</id><updated>2012-01-17T20:57:53.167-08:00</updated><category term='What is WCF in .Net 3.5'/><category term='What is Windows Activation Service (WAS)'/><category term='Job Interview And Resume Tips for Developers'/><category term='MVC'/><category term='ASP.Net 2.0'/><category term='Difference between .Net Remoting and Web Services'/><category term='ASP.net Interview Questions'/><category term='What is the difference between DELETE and TRUNCATE? Is one faster than the other?'/><category term='What is AJAX in ASP.Net'/><category term='JavaScript Object Notation (JSON)'/><category term='Interview Questions on ADO.net'/><category term='RDBMS Interview Questions'/><category term='Difference between Session object and Application object in asp.Net'/><category term='Interface'/><category term='Attributes in .Net'/><category term='Bubble Events in ASP.net'/><category term='Difference Between ASP.NET Server Controls'/><category term='Interview Questions on UML'/><category term='What is Web Services in .Net'/><category term='ADO.Net Interview Questions'/><category term='SaaS'/><category term='.Net Interview Questions'/><category term='What is Join and its types in SQL Server'/><category term='SQL Interview Questions with Answers'/><category term='Advantages of Stored Procedures'/><category term='OOPS'/><category term='HTML Server Controls and HTML Intrinsic Controls'/><category term='What is WPF in .Net'/><category term='What are the major differences between Crystal and SQL reporting services?'/><category term='Difference between Web Services of ASP.net and Web Services of WCF'/><category term='What is association'/><category term='.Net Framework Interview Questions'/><category term='aggregation and composition in oops'/><category term='What are triggers? How to invoke a trigger on demand?'/><category term='XML Interview Questions'/><category term='Generics'/><category term='What is the differnce between store procedure and Functions (UDF)'/><category term='C#'/><category term='OOPS Interview Question'/><category term='Remoting'/><category term='Difference between outer join and inner join'/><category term='what is diffgram in asp.net'/><category term='Csharp Interveiw Questions'/><category term='Questions on WinForm and Visual Studio .Net'/><category term='Script Manager in Ajax'/><category term='Codd Rules'/><category term='Web Services Interview Questions'/><category term='Interface Vs Delegate'/><category term='WPF'/><category term='.Net Framework'/><title type='text'>Interview Questions on .Net</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-3843299676075278217</id><published>2010-04-18T22:15:00.001-07:00</published><updated>2010-04-18T22:15:34.485-07:00</updated><title type='text'>Difference between Rollup and Cube</title><content type='html'>You can use the CUBE and ROLLUP operators to generate summary information in a query. A CUBE operator generates a result set that shows the aggregates for all combinations of values in the selected columns. A ROLLUP operator generates a result set showing the aggregates for a hierarchy of values in the selected columns. Both the CUBE and ROLLUP operators return data in relational form.&lt;br /&gt;&lt;br /&gt;The CUBE operator generates a multidimensional cube result set. A multidimensional cube is an expansion of fact data, or the data that records individual events.&lt;br /&gt;This expansion is based on columns that the user wants to analyze. These columns are called dimensions. A cube is a result set that contains a cross tabulation of all the possible combinations of the dimensions.&lt;br /&gt;&lt;br /&gt;The CUBE operator is specified in the GROUP BY clause of a SELECT statement. The select list contains the dimension columns and aggregate function expressions. The GROUP BY specifies the dimension columns by using the WITH CUBE keywords.&lt;br /&gt;The result set contains all possible combinations of the values in the dimension columns, together with the aggregate values from the underlying rows that match that combination of dimension values.&lt;br /&gt;&lt;br /&gt;The ROLLUP operator is useful in generating reports that contain aggregate values. The ROLLUP operator generates a result set that is similar to the result set generated by the CUBE operator.&lt;br /&gt;&lt;br /&gt;However, the difference between the CUBE and ROLLUP operator is that the CUBE generates a result set that shows the aggregates for all combinations of values in the selected columns. By contrast, the ROLLUP operator returns only the specific result set.&lt;br /&gt;The ROLLUP operator generates a result set that shows the aggregates for a hierarchy of values in the selected columns. Also, the ROLLUP operator provides only one level of summarization, for example, the cumulative running sum in a table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-3843299676075278217?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/3843299676075278217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/04/difference-between-rollup-and-cube.html#comment-form' title='30 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3843299676075278217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3843299676075278217'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/04/difference-between-rollup-and-cube.html' title='Difference between Rollup and Cube'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>30</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-1995638698848190051</id><published>2010-03-25T22:50:00.001-07:00</published><updated>2010-03-25T22:50:56.654-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Difference Between ASP.NET Server Controls'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML Server Controls and HTML Intrinsic Controls'/><title type='text'>Difference Between ASP.NET Server Controls,HTML Server Controls and HTML Intrinsic Controls</title><content type='html'>ASP.NET Server Controls&lt;br /&gt;Advantages:&lt;br /&gt;&lt;br /&gt;1. ASP .NET Server Controls can however detect the target browser's capabilities and render themselves accordingly. No issues for compatibility issues of Browsers i.e page that might be used by both HTML 3.2 and HTML 4.0 browsers code to be written by you.&lt;br /&gt;2. Newer set of controls that can be used in the same manner as any HTMl control like Calender controls. (No need of Activex Control for doing this which would then bring up issues of Browser compatibility).&lt;br /&gt;3. Processing would be done at the server side. In built functionality to check for few values(with Validation controls) so no need to choose between scripting language which would be incompatible with few browsers.&lt;br /&gt;4. ASP .NET Server Controls have an object model different from the traditional HTML and even provide a set of properties and methods that can change the outlook and behavior of the controls.&lt;br /&gt;5. ASP .NET Server Controls have higher level of abstraction. An output of an ASP .NET server control can be the result of many HTML tags that combine together to produce that control and its events.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Disadvantages:&lt;br /&gt;&lt;br /&gt;1. The control of the code is inbuilt with the web server controls so you have no much of direct control on these controls&lt;br /&gt;2. Migration of ASP to any ASP.NET application is difficult. Its equivalent to rewriting your new application &lt;br /&gt;HTML Server Controls&lt;br /&gt;Advantages:&lt;br /&gt;&lt;br /&gt;1. The HTML Server Controls follow the HTML-centric object model. Model similar to  HTML&lt;br /&gt;2. Here the controls can be made to interact with Client side scripting. Processing would be done at client as well as server depending on your code. &lt;br /&gt;3. Migration of the ASP project thought not very easy can be done by giving each intrinsic HTML control a runat = server to make it HTML Server side control.&lt;br /&gt;4. The HTML Server Controls have no mechanism of identifying the capabilities of the client browser accessing the current page.&lt;br /&gt;5. A HTML Server Control has similar abstraction with its corresponding HTML tag and offers no abstraction.&lt;br /&gt; &lt;br /&gt;Disadvantages:&lt;br /&gt;1. You would need to code for the browser compatibility.&lt;br /&gt;HTML Intrinsic Controls&lt;br /&gt;Advantages:&lt;br /&gt;1. Model similar to HTML&lt;br /&gt;2. Here the controls can be made to interact with Client side scripting&lt;br /&gt; &lt;br /&gt;Disadvantages:&lt;br /&gt;1. You would need to code for the browser compatibilit&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-1995638698848190051?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/1995638698848190051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/03/difference-between-aspnet-server.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/1995638698848190051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/1995638698848190051'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/03/difference-between-aspnet-server.html' title='Difference Between ASP.NET Server Controls,HTML Server Controls and HTML Intrinsic Controls'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-851849990086782781</id><published>2010-03-02T01:49:00.000-08:00</published><updated>2010-03-02T01:50:36.581-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is Join and its types in SQL Server'/><title type='text'>What is Join and its types in SQL Server</title><content type='html'>Join: &lt;br /&gt;&lt;br /&gt;Joins in SQL Server allows the retrieval of data records from one or more tables having some relation between them. Logical operators can also be used to drill down the number of records to get the desired output from sql join queries.&lt;br /&gt;&lt;br /&gt;Types:&lt;br /&gt;&lt;br /&gt;1. Inner Join&lt;br /&gt;2. Outer Join &lt;br /&gt;o Left Outer Join&lt;br /&gt;o Right Outer Join&lt;br /&gt;o Full Outer Join&lt;br /&gt;3. Cross Join&lt;br /&gt;&lt;br /&gt;I) Inner Join: Inner Join is a default type join of SQL Server. It uses logical operators such as =, &lt;, &gt; to match the records in two tables. Inner Join includes equi join and natural joins.&lt;br /&gt;Natural join query example: &lt;br /&gt;SELECT C.*, P.PRODUCTID, P.PRODUCTNAME FROM CATEGORIES C &lt;br /&gt;INNER JOIN&lt;br /&gt;PRODUCTS P ON P.CATEGORYID = C.CATEGORYID &lt;br /&gt;This natural join query will return all the columns of categories table and prodcutId and productName from products table. &lt;br /&gt;Equi Join: Equi Join returns all the columns from both tables and filters the records satisfying the matching condition specified in Join “ON” statement of sql inner join query. &lt;br /&gt;  &lt;br /&gt;SQL Inner Equi Join Example: &lt;br /&gt;  &lt;br /&gt;USE NORTHWIND &lt;br /&gt;SELECT * FROM CATEGORIES C INNER JOIN&lt;br /&gt;PRODUCTS P ON P.CATEGORYID = C.CATEGORYID &lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;Result will display the following columns: &lt;br /&gt;CategoryID, CategoryName, Description, Picture, ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued &lt;br /&gt;  &lt;br /&gt;Above equi join sql query will display the categoryId two times in a row because both the tables have categoryId column. You can convert the result into natural join by elimination the identical columns and unnecessary columns. &lt;br /&gt;Diffrence between natural join and equi join&lt;br /&gt;natural join is basically a form of equi join where one of the join fields is projected out. i.e. it avoids repeatition of the join column.&lt;br /&gt;&lt;br /&gt;II) Outer Join: Outer Join has further 3 sub categories as left, right and full. Outer Join uses these category names as keywords that can be specified in the FROM clause. &lt;br /&gt;o Left Outer Join: Left Outer Join returns all the rows from the table specified first in the Left Outer Join Clause. If in the left table any row has no matching record in the right side table then that row returns null column values for that particular tuple. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;o Right Outer Join: Right Outer Join is exactly the reverse method of Left Outer Join. It returns all the rows from right table and returns null values for the rows having no match in the left joined table. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;o Full Outer Join: Full outer join returns all the rows from both left and right joined tables. If there is any match missing from the left table then it returns null column values for left side table and if there is any match missing from right table then it returns null value columns for the right side table. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;III) Cross Join: Cross join works as a Cartesian product of rows for both left and right table. It combined each row of left table with all the rows of right table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-851849990086782781?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/851849990086782781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/03/what-is-join-and-its-types-in-sql.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/851849990086782781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/851849990086782781'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/03/what-is-join-and-its-types-in-sql.html' title='What is Join and its types in SQL Server'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-2669482820186881106</id><published>2010-03-01T21:36:00.000-08:00</published><updated>2010-03-01T21:37:56.561-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='what is diffgram in asp.net'/><title type='text'>what is diffgram in asp.net</title><content type='html'>DiffGram: &lt;br /&gt;&lt;br /&gt;The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML.  A good use is reading database data to an XML file to be sent to a Web Service. &lt;br /&gt;ADO.NET introduced the DataSet class to support the disconnected, distributed data-access scenarios. With DataSet, the data retrieved from the database is cached in-memory, in addition to the constraints and relationships among the tables. When the ADO.NET DataSet is serialized as XML (for example, when returning a DataSet from an ASP.NET XML Web service method), the XML format used for DataSet serialization is known as DiffGram. Like Updategrams, DiffGrams also contains the tags that specify the original and new state of data. SQLXML and .NET Managed classes can be used to execute DiffGrams to perform the database updates, however there are many things that are supported by Updategrams and not by DiffGrams (ability to pass parameters being one example).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DiffGrams and DataSet&lt;br /&gt;&lt;br /&gt;There are occasions when you want to compare the original data with the current data to get the changes made to the original data. One of the common example is saving data on Web Forms applications. When working with Web based data driven applications, you read data using a DataSet, make some changes to the data and sends data back to the database to save final data. Sending entire DataSet may be a costly affair specially when there are thousands of records in a DataSet. In this scenario, the best practice is to find out the updated rows of a DataSet and send only updated rows back to the database instead of the entire DataSet. This is where the DiffGrams are useful.&lt;br /&gt;&lt;br /&gt;Note: Do you remember GetChanges method of DataSet? This method returns the rows that have been modified in the current version in a form of DataSet. This is how a DataSet knows the modified rows.&lt;br /&gt;&lt;br /&gt;A DiffGram is an XML format that is used to identify current and original versions of data elements. Since the DataSet uses XML format to store and transfer data, it also use DiffGrams to keep track of the original data and the current data. When a DataSet is written as a DiffGram, not only a DiffGram stores original and current data, it also stores row versions, error information, and their orders.&lt;br /&gt;&lt;br /&gt;DiffGram XML Format&lt;br /&gt;&lt;br /&gt;The XML format for a DiffGram has three parts - data instance, diffgram before and diffgram errors. The &lt;DataInstance&gt; tag represents the data instance part of a diffgram, which represents the current data. The diffgram before is represented by the &lt;diffgr:before&gt; tag, which represents the original version of the data. The &lt;diffgr:errors&gt; tag represents the diffgram errors part, which stores the errors and related information. The diffgram itself is represented by tag &lt;diffgr:diffgram&gt;. The XML listed in Listing 1 represents the skeleton of a DiffGram.&lt;br /&gt;&lt;br /&gt;&lt;?xml version="1.0"?&gt;&lt;br /&gt;&lt;diffgr:diffgram &lt;br /&gt;xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&lt;br /&gt;xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&lt;br /&gt;xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt;&lt;DataInstance&gt;&lt;br /&gt;&lt;/DataInstance&gt;&lt;br /&gt;&lt;diffgr:before&gt;&lt;br /&gt;&lt;/diffgr:before&gt;&lt;br /&gt;&lt;diffgr:errors&gt;&lt;br /&gt;&lt;/diffgr:errors&gt;&lt;br /&gt;&lt;/diffgr:diffgram&gt; &lt;br /&gt;&lt;br /&gt;Listing 1. A DiffGram format&lt;br /&gt;&lt;br /&gt;The &lt;diffgr:before&gt; sections only store the changed rows and the &lt;diffgr:errors&gt; section only stores the rows that had errors. Each row in a DiffGram is identified with an id and these three sections communicate through this id. For example, if id of a row is "Id1" and it has been modified and had errors,&lt;br /&gt;&lt;br /&gt;Besides above discussed three sections, a DiffGram uses other elements. These are described in Table 1.&lt;br /&gt;&lt;br /&gt;Table 1 describes the DiffGram elements that are defined in the DiffGram namespace urn:schemas-microsoft-com:xml-diffgram-v1.&lt;br /&gt;&lt;br /&gt;Element  Description &lt;br /&gt;id&lt;br /&gt; DiffGram id. Normally in the format of [TableName][RowIdentifier]. For example: &lt;Customers diffgr:id="Customers1"&gt;. &lt;br /&gt;parentId&lt;br /&gt; Parent row of the current row. Normally in the format of   [TableName][RowIdentifier]. For example: &lt;Orders diffgr:parentId="Customers1"&gt;. &lt;br /&gt;hasChanges Identifies a row in the &lt;DataInstance&gt; block as modified. The hasChanges can have one of the three values - inserted, modified, or descent. Value inserted means an Added row, modified means modified row, and descent means children of a parent row have been modified.  &lt;br /&gt;hasErrors&lt;br /&gt; Identifies a row in the &lt;DataInstance&gt; block with a RowError. The error element is placed in the &lt;diffgr:errors&gt; block.&lt;br /&gt; &lt;br /&gt;Error&lt;br /&gt; Contains the text of the RowError for a particular element in the &lt;diffgr:errors&gt; block. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are two more elements a DataSet generated DiffGrams can have and these elements are RowOrder and Hidden. The RowOrder is the row order of the original data and identifies the index of a row in a particular DataTable. The Hidden identifies a column as having a ColumnMapping property set to MappingType.Hidden.  &lt;br /&gt;&lt;br /&gt;Now let's see an example of DiffGrams. The code listed in Listing 1 reads data from Employees tables and write in an XML document in DiffGram format. &lt;br /&gt;&lt;br /&gt;Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\Northwind.mdb"&lt;br /&gt;Dim sql As String = "SELECT EmployeeID, FirstName, LastName, Title FROM Employees"&lt;br /&gt;Dim conn As OleDbConnection = Nothing&lt;br /&gt;Dim ds As DataSet = Nothing&lt;br /&gt;' Create and open connection&lt;br /&gt;conn = New OleDbConnection(connectionString)&lt;br /&gt;If conn.State &lt;&gt; ConnectionState.Open Then&lt;br /&gt;conn.Open()&lt;br /&gt;End If ' Create a data adapter&lt;br /&gt;Dim adapter As New OleDbDataAdapter(sql, conn)&lt;br /&gt;' Create and fill a DataSet&lt;br /&gt;ds = New DataSet("TempDtSet")&lt;br /&gt;adapter.Fill(ds, "DtSet")&lt;br /&gt;' Write XML in DiffGram format&lt;br /&gt;ds.WriteXml("DiffGramFile.xml", XmlWriteMode.DiffGram)&lt;br /&gt;' Close connection&lt;br /&gt;If conn.State = ConnectionState.Open Then&lt;br /&gt;conn.Close()&lt;br /&gt;End If&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-2669482820186881106?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/2669482820186881106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/03/what-is-diffgram-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2669482820186881106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2669482820186881106'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/03/what-is-diffgram-in-aspnet.html' title='what is diffgram in asp.net'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-639345688589632950</id><published>2010-03-01T21:01:00.000-08:00</published><updated>2010-03-01T21:02:29.653-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bubble Events in ASP.net'/><title type='text'>Bubble Events in ASP.net</title><content type='html'>Event Bubbling is nothing but events raised by child controls is handled by the parent control. Example: Suppose consider datagrid as parent control in which there are several child controls.There can be a column of link buttons right.Each link button has click event.Instead of writing event routine for each link button write one routine for parent which will handlde the click events of the child link button events.&lt;br /&gt;&lt;br /&gt;protected override bool OnBubbleEvent(object source, EventArgs e) {&lt;br /&gt;            if (e is CommandEventArgs) {&lt;br /&gt;                // Adds information about an Item to the  &lt;br /&gt;                // CommandEvent.&lt;br /&gt;                TemplatedListCommandEventArgs args =&lt;br /&gt;                    new TemplatedListCommandEventArgs(this, source, (CommandEventArgs)e);&lt;br /&gt;                RaiseBubbleEvent(this, args);&lt;br /&gt;                return true;&lt;br /&gt;            }&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;Refer: http://msdn.microsoft.com/en-us/library/aa719644(VS.71).aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-639345688589632950?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/639345688589632950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/03/bubble-events-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/639345688589632950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/639345688589632950'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/03/bubble-events-in-aspnet.html' title='Bubble Events in ASP.net'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-7080982357902298111</id><published>2010-02-25T23:09:00.000-08:00</published><updated>2010-02-25T23:10:41.299-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Difference between outer join and inner join'/><title type='text'>Difference between outer join and inner join</title><content type='html'>Inner join:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We use this when we compare two colums from two different table .Based on equality or non equality, we retrieve the rows matched.&lt;br /&gt;eg.&lt;br /&gt;&lt;br /&gt;Select emp.empid , order.orderid &lt;br /&gt;from emp Innerjoin order &lt;br /&gt;on Emp.empid=order.empid&lt;br /&gt;&lt;br /&gt;This example gives all the rows from emp,order tables where the empid's in both the tables are same.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Outer Join:&lt;br /&gt;&lt;br /&gt;There are three types of outer joins namely:&lt;br /&gt;Left Outer Join---For retreiving all the columns from the first table irrespective of the column match.&lt;br /&gt;Right Outer Join---For retreiving all the columns from the second table irrespective of the column match&lt;br /&gt;Full Outer Join---For retreiving all the columns from both the tables irrespective of column match.&lt;br /&gt;&lt;br /&gt;Eg.&lt;br /&gt;&lt;br /&gt;If we have two tables named stud1,stud2 with the following data&lt;br /&gt;&lt;br /&gt;Stud1: id Name stud2: id Name&lt;br /&gt;1 xxx 1 aaa&lt;br /&gt;2 yyy 2 bbb&lt;br /&gt;3 zzz 4 ccc&lt;br /&gt;4 www 6 ddd&lt;br /&gt;When we use Left Outer Join we get the output as:&lt;br /&gt;1 aaa&lt;br /&gt;2 bbb&lt;br /&gt;3 &lt;Null&gt;&lt;br /&gt;4 ccc&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When we use Right Outer Join we get the output as:&lt;br /&gt;1 aaa&lt;br /&gt;2 bbb&lt;br /&gt;4 ccc&lt;br /&gt;&lt;Null&gt; ddd&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When we use Full Outer Join we get the output as:&lt;br /&gt;1 aaa&lt;br /&gt;2 bbb&lt;br /&gt;3 &lt;Null&gt;&lt;br /&gt;4 ccc&lt;br /&gt;&lt;Null&gt; ddd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-7080982357902298111?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/7080982357902298111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/difference-between-outer-join-and-inner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/7080982357902298111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/7080982357902298111'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/difference-between-outer-join-and-inner.html' title='Difference between outer join and inner join'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-2183560800456950229</id><published>2010-02-25T01:01:00.000-08:00</published><updated>2010-02-25T01:03:25.588-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript Object Notation (JSON)'/><title type='text'>JavaScript Object Notation (JSON)</title><content type='html'>JavaScript Object Notation (JSON)&lt;br /&gt;To allow for a more efficient transfer of data and classes between web applications and&lt;br /&gt;web services, ASP.NET AJAX supports the JavaScript Object Notation (JSON) format. It is&lt;br /&gt;lighter weight than XML (Extensible Markup Language)/SOAP (Simple Object Access&lt;br /&gt;Protocol), and delivers a more consistent experience because of the implementation&lt;br /&gt;differences of XML/SOAP by the various browsers.&lt;br /&gt;JSON is a text-based data-interchange format that represents data as a set of ordered&lt;br /&gt;name/value pairs. As an example, take a look at the following class definition, which&lt;br /&gt;stores a person’s name and age:&lt;br /&gt;&lt;br /&gt;public class MyDetails&lt;br /&gt;{&lt;br /&gt; string FirstName;&lt;br /&gt; string LastName;&lt;br /&gt; int Age;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;A two-element array of this object is represented as follows:&lt;br /&gt;{ MyDetails : [ { “FirstName” : “Landon”, “LastName” : “Donovan”, “Age” : “22”}&lt;br /&gt;{ “FirstName” : “John”, “LastName” : “Grieb”, “Age” : “46”}&lt;br /&gt;]&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-2183560800456950229?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/2183560800456950229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/javascript-object-notation-json.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2183560800456950229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2183560800456950229'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/javascript-object-notation-json.html' title='JavaScript Object Notation (JSON)'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-3908191919532651399</id><published>2010-02-22T02:37:00.000-08:00</published><updated>2010-02-22T02:39:55.173-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Script Manager in Ajax'/><title type='text'>What is Script Manager in Ajax+ASP.net</title><content type='html'>ScriptManager control is the parent control that needs to be there on every page wherever we are trying to use ASP.NET AJAX controls. ScriptManager control manages client script for AJAX enabled ASP.NET pages. This control enables client script to use the type system extensions and support features for partial page rendering, webservice calls etc.&lt;br /&gt;&lt;br /&gt;Can we use Multiple Script Manager on same web-page&lt;br /&gt;&lt;br /&gt;No. It is not possible to use multiple ScriptManager control in a web page. In fact, any such requirement never comes in because a single ScriptManager control is enough to handle the objects of a web page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-3908191919532651399?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/3908191919532651399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/what-is-script-manager-in-ajaxaspnet.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3908191919532651399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3908191919532651399'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/what-is-script-manager-in-ajaxaspnet.html' title='What is Script Manager in Ajax+ASP.net'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-1930726421694895105</id><published>2010-02-22T02:02:00.001-08:00</published><updated>2010-02-22T02:02:49.600-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Difference between Session object and Application object in asp.Net'/><title type='text'>Difference between Session object and Application object in asp.Net</title><content type='html'>Session variables are used to store user specific information where as in application variables we can't store user specific information.&lt;br /&gt;&lt;br /&gt;Default lifetime of the session variable is 20 mins and based on the requirement we can change it.&lt;br /&gt;&lt;br /&gt;Application variables are accessible till the application ends.&lt;br /&gt;sessions allows information to be stored in one page and accessed in another,and it supports any type of object,including your own custom data types.&lt;br /&gt;&lt;br /&gt;Application state allows you to store global objects that can be accessed by any client.&lt;br /&gt;&lt;br /&gt;The coomon thing b/w session and application is both support the same type of objects,retain information on the server, and uses the same dictionary -based syntax.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-1930726421694895105?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/1930726421694895105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/difference-between-session-object-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/1930726421694895105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/1930726421694895105'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/difference-between-session-object-and.html' title='Difference between Session object and Application object in asp.Net'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-4372623083689895000</id><published>2010-02-09T03:39:00.000-08:00</published><updated>2010-02-09T03:40:53.918-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is Windows Activation Service (WAS)'/><title type='text'>What is Windows Activation Service (WAS)</title><content type='html'>Windows Activation Service (WAS), introduced with Windows Vista, is the new process activation mechanism that ships with IIS 7.0. WAS builds on the existing IIS 6.0 process and hosting models, but is much more powerful because it provides support for other protocols besides HTTP, such as TCP and Named Pipes. By hosting the Windows Communication Foundation (WCF) services in WAS, one can take advantage of WAS features such as process recycling, rapid failover protection, and the common configuration system, all of which were previously available only to HTTP-based applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-4372623083689895000?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/4372623083689895000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/what-is-windows-activation-service-was.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/4372623083689895000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/4372623083689895000'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/what-is-windows-activation-service-was.html' title='What is Windows Activation Service (WAS)'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6230099188327041713</id><published>2010-02-09T01:19:00.000-08:00</published><updated>2010-02-09T01:20:32.920-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Attributes in .Net'/><title type='text'>Attributes in .Net</title><content type='html'>Attributes are a mechanism for adding metadata, such as compiler instructions and other data about your data, methods, and classes, to the program itself. Attributes are inserted into the metadata and are visible through ILDasm and other metadata-reading tools.&lt;br /&gt;&lt;br /&gt;Reflection is the process by which a program can read its own metadata. A program is said to reflect on itself, extracting metadata from its assembly and using that metadata either to inform the user or to modify its own behavior.&lt;br /&gt;&lt;br /&gt;An attribute is an object that represents data you want to associate with an element in your program. The element to which you attach an attribute is referred to as the target of that attribute.&lt;br /&gt;&lt;br /&gt;Using Attributes&lt;br /&gt;Attributes can be placed on most any declaration (though a specific attribute might restrict the types of declarations on which it is valid). Syntactically, an attribute is specified by placing the name of the attribute, enclosed in square brackets, in front of the declaration of the entity to which it applies. For example, a class with the attribute DllImport is declared like this:&lt;br /&gt;[DllImport] public class MyDllimportClass { ... }&lt;br /&gt;&lt;br /&gt;Many attributes have parameters, which can be either positional (unnamed) or named. &lt;br /&gt;Any positional parameters must be specified in a certain order and cannot be omitted; named parameters are optional and can be specified in any order. Positional parameters are specified first. For example, these three attributes are equivalent:&lt;br /&gt;[DllImport("user32.dll", SetLastError=false, ExactSpelling=false)]&lt;br /&gt;[DllImport("user32.dll", ExactSpelling=false, SetLastError=false)]&lt;br /&gt;[DllImport("user32.dll")]&lt;br /&gt;&lt;br /&gt;The first parameter, the DLL name, is positional and always comes first; the others are named. In this case, both named parameters default to false, so they can be omitted (refer to the individual attribute's documentation for information on default parameter values).&lt;br /&gt;&lt;br /&gt;More than one attribute can be placed on a declaration, either separately or within the same set of brackets:&lt;br /&gt;&lt;br /&gt;bool AMethod([In][Out]ref double x);&lt;br /&gt;bool AMethod([Out][In]ref double x);&lt;br /&gt;bool AMethod([In,Out]ref double x);&lt;br /&gt;&lt;br /&gt;Creating Custom Attributes&lt;br /&gt;&lt;br /&gt;You can create your own custom attributes by defining an attribute class, a class that derives directly or indirectly from System.Attribute (which makes identifying attribute definitions in metadata fast and easy). Suppose you want to tag classes and structs with the name of the programmer who wrote the class or struct. You might define a custom Author attribute class:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)]&lt;br /&gt;public class Author : Attribute&lt;br /&gt;{&lt;br /&gt;public Author(string name) { this.name = name; version = 1.0; }&lt;br /&gt;public double version;&lt;br /&gt;string name;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The class name is the attribute's name, Author. It is derived from System.Attribute, so it is a custom attribute class. The constructor's parameters are the custom attribute's positional parameters (in this case, name), and any public read-write fields or properties are named parameters (in this case, version is the only named parameter). Note the use of the AttributeUsage attribute to make the Author attribute valid only on class and struct declarations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6230099188327041713?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6230099188327041713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/attributes-in-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6230099188327041713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6230099188327041713'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/attributes-in-net.html' title='Attributes in .Net'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-3231278363527003885</id><published>2010-02-04T22:33:00.000-08:00</published><updated>2010-02-04T22:46:47.672-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Difference between Web Services of ASP.net and Web Services of WCF'/><title type='text'>Difference between Web Services of ASP.net and Web Services of WCF</title><content type='html'>The development of web service with ASP.NET relies on defining data  and relies on the XmlSerializer to transform data to or from a service.&lt;br /&gt;&lt;br /&gt;Key issues with XmlSerializer to serialize .NET types to XML &lt;br /&gt;&lt;br /&gt;Only Public fields or Properties of .NET types can be translated into XML. &lt;br /&gt;Only the classes which implement IEnumerable interface. &lt;br /&gt;Classes that implement the IDictionary interface, such as Hash table can not be serialized. &lt;br /&gt;The WCF uses the DataContractAttribute and DataMemeberAttribute to translate .NET FW types in to XML.&lt;br /&gt;&lt;br /&gt;[DataContract] &lt;br /&gt;public class Item &lt;br /&gt;{ &lt;br /&gt;    [DataMember] &lt;br /&gt;    public string ItemID; &lt;br /&gt;    [DataMember] &lt;br /&gt;    public decimal ItemQuantity; &lt;br /&gt;    [DataMember] &lt;br /&gt;    public decimal ItemPrice;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The DataContractAttribute can be applied to the class or a strcture. DataMemberAttribute can be applied to field or a property and theses fields or properties can be either public or private.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Important difference between DataContractSerializer and XMLSerializer.&lt;br /&gt;&lt;br /&gt;A practical benefit of the design of the DataContractSerializer is better performance over XMLserialization. &lt;br /&gt;XMLSerialization does not indicate the which fields or properties of the type are serialized into XML where as DataCotratSerializer Explicitly shows the which fields or properties are serialized into XML. &lt;br /&gt;The DataContractSerializer can translate the HashTable into XML. &lt;br /&gt;Developing Service&lt;br /&gt;&lt;br /&gt;To develop a service using ASP.NET we must add the WebService attribute to the class and WebMethodAttribute to any of the class methods.&lt;br /&gt;&lt;br /&gt;Example &lt;br /&gt;&lt;br /&gt;[WebService] &lt;br /&gt;public class Service : System.Web.Services.WebService &lt;br /&gt;{ &lt;br /&gt;    [WebMethod] &lt;br /&gt;    public string Test(string strMsg) &lt;br /&gt;    { &lt;br /&gt;       return strMsg; &lt;br /&gt;    } &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;To develop a service in WCF we will write the following code&lt;br /&gt;&lt;br /&gt;[ServiceContract] &lt;br /&gt;public interface ITest &lt;br /&gt;{ &lt;br /&gt;    [OperationContract] &lt;br /&gt;    string ShowMessage(string strMsg); &lt;br /&gt;} &lt;br /&gt;public class Service : ITest &lt;br /&gt;{ &lt;br /&gt;    public string ShowMessage(string strMsg) &lt;br /&gt;    { &lt;br /&gt;        return strMsg; &lt;br /&gt;    } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The ServiceContractAttribute specifies that a interface defines a WCF service contract, OperationContract Attribute indicates which of the methods of the interface defines the operations of the service contract.&lt;br /&gt;&lt;br /&gt;A class that implements the service contract is referred to as a service type in WCF.&lt;br /&gt;&lt;br /&gt;Hosting the Service&lt;br /&gt;&lt;br /&gt;ASP.NET web services are compiled into a class library assembly and a service file with an extension .asmx will have the code for the service. The service file is copied into the root of the ASP.NET application and Assembly will be copied to the bin directory. The application is accessible using url of the service file.&lt;br /&gt;&lt;br /&gt;WCF Service can be hosted within IIS or WindowsActivationService.&lt;br /&gt;&lt;br /&gt;Compile the service type into a class library &lt;br /&gt;Copy the service file with an extension .SVC into a virtual directory and assembly into bin sub directory of the virtual directory. &lt;br /&gt;Copy the web.config file into the virtual directory. &lt;br /&gt;Client Development&lt;br /&gt;&lt;br /&gt;Clients for the ASP.NET Web services are generated using the command-line tool WSDL.EXE. &lt;br /&gt;&lt;br /&gt;WCF uses the ServiceMetadata tool(svcutil.exe) to generate the client for the service.&lt;br /&gt;&lt;br /&gt;Message Representation&lt;br /&gt;&lt;br /&gt;The Header of the SOAP Message can be customized in ASP.NET Web service.&lt;br /&gt;&lt;br /&gt;WCF provides attributes MessageContractAttribute , MessageHeaderAttribute and MessageBodyMemberAttribute to describe the structure of the SOAP Message.&lt;br /&gt;&lt;br /&gt;Service Description&lt;br /&gt;&lt;br /&gt;Issuing a HTTP GET Request with query WSDL causes ASP.NET to generate WSDL to describe the service. It returns the WSDL as response to the request.&lt;br /&gt;&lt;br /&gt;The generated WSDL can be customized by deriving the class of ServiceDescriptionFormatExtension.&lt;br /&gt;&lt;br /&gt;Issuing a Request with the query WSDL for the .svc file generates the WSDL. The WSDL that generated by WCF can customized by using ServiceMetadataBehavior class.&lt;br /&gt;&lt;br /&gt;Exception Handling&lt;br /&gt;&lt;br /&gt;In ASP.NET Web services, Unhandled exceptions are returned to the client as SOAP faults.&lt;br /&gt;&lt;br /&gt;In WCF Services, unhandled exceptions are not returned to clients as SOAP faults. A configuration setting is provided to have the unhandled exceptions returned to clients for the purpose of debugging.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-3231278363527003885?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/3231278363527003885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/difference-between-web-services-of.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3231278363527003885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3231278363527003885'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2010/02/difference-between-web-services-of.html' title='Difference between Web Services of ASP.net and Web Services of WCF'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-8971736194993763574</id><published>2009-12-23T04:38:00.000-08:00</published><updated>2009-12-23T04:39:35.539-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Job Interview And Resume Tips for Developers'/><title type='text'>Job Interview And Resume Tips for Developers</title><content type='html'>Excellent Article&lt;br /&gt;&lt;br /&gt;http://eggheadcafe.com/tutorials/aspnet/c3b9b000-f682-4673-8c83-8feb077fb0be/job-interview-and-resume.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-8971736194993763574?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/8971736194993763574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/12/job-interview-and-resume-tips-for.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/8971736194993763574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/8971736194993763574'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/12/job-interview-and-resume-tips-for.html' title='Job Interview And Resume Tips for Developers'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-1955662805764436613</id><published>2009-11-05T02:51:00.000-08:00</published><updated>2009-11-05T02:52:03.567-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML Interview Questions'/><title type='text'>XML Interview Questions</title><content type='html'>What are the different kind of parsers used in XML? &lt;br /&gt;There are 2 parsers:&lt;br /&gt;1) DOM (Document object model): This will interpret Complete XML document.Microsoft major concentration is DOM Parser.&lt;br /&gt;2) SAX Parser (Simple Aplication programming Interface for XML): This will interpret XML document based on the event occurrence only it wont interpret complete document at a time. Sun mycrosystems major concentration is SAX Parser.What is XPath?&lt;br /&gt;XPath is used to navigate through elements and attributes in an XML document.&lt;br /&gt;&lt;br /&gt;Difference between XML and HTML&lt;br /&gt;What is the differnece between XML and HTML &lt;br /&gt;1) XML is not a replacement for HTML.&lt;br /&gt;2) XML and HTML were designed with different goals.&lt;br /&gt;3) XML was designed to describe data and to focus on what data is.&lt;br /&gt;4) HTML was designed to display data and to focus on how data looks.&lt;br /&gt;5) HTML is about displaying information, XML is about describing information&lt;br /&gt;XML&lt;br /&gt;User definable tags&lt;br /&gt;Content driven&lt;br /&gt;End tags required for well formed documents&lt;br /&gt;Quotes required around attributes values&lt;br /&gt;Slash required in empty tags &lt;br /&gt;HTML&lt;br /&gt;Defined set of tags designed for web display&lt;br /&gt;Format driven&lt;br /&gt;End tags not required&lt;br /&gt;Quotes not required&lt;br /&gt;Slash not required&lt;br /&gt;&lt;br /&gt;What is XML and Binary Serialization?&lt;br /&gt;XML Serialization serializes the object into an xml file. This file is human readable and can be shared with other applications.&lt;br /&gt;&lt;br /&gt;Binary serialization is more efficient but the serialized file is in binary format. It may not make any sense for a human being to open this file and understand what it contains. It is a stream of bytes.&lt;br /&gt;&lt;br /&gt;What is XSL?&lt;br /&gt;XSLT - a language for transforming XML documents&lt;br /&gt;XSLT is used to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML and XHTML. Normally XSLT does this by transforming each XML element into an (X)HTML element.&lt;br /&gt;XPath - a language for navigating in XML documents&lt;br /&gt;XSL-FO - a language for formatting XML documents&lt;br /&gt;What is DTD and Schema in XML&lt;br /&gt;&lt;br /&gt;A DTD is: &lt;br /&gt;&lt;br /&gt;The XML Document Type Declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition or DTD. &lt;br /&gt;&lt;br /&gt;The DTD can point to an external subset containing markup declarations, or can contain the markup declarations directly in an internal subset, or can even do both. &lt;br /&gt;&lt;br /&gt;A Schema is: &lt;br /&gt;&lt;br /&gt;XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. &lt;br /&gt;&lt;br /&gt;In summary, schemas are a richer and more powerful of describing information than what is possible with DTDs. &lt;br /&gt;What is XML? &lt;br /&gt;XML is the Extensible Markup Language. It improves the functionality&lt;br /&gt;of the Web by letting you identify your information in a more accurate,&lt;br /&gt;flexible, and adaptable way. It is extensible because it is not&lt;br /&gt;a fixed format like it’s written in SGML, the international standard meta language for&lt;br /&gt;text document markup (ISO 8879). &lt;br /&gt;What is a markup language? &lt;br /&gt;A markup language is a set of words and symbols for describing&lt;br /&gt;the identity of pieces of a document (for example ‘this is&lt;br /&gt;a paragraph’, ‘this is a heading’, ‘this&lt;br /&gt;is a list’, ‘this is the caption of this figure’,&lt;br /&gt;etc). Programs can use this with a style sheet to create output&lt;br /&gt;for screen, print, audio, video, Braille, etc. &lt;br /&gt;&lt;br /&gt;Some markup languages (eg those used in word processors) only describe&lt;br /&gt;appearances (’this is italics’, ‘this is bold’),&lt;br /&gt;but this method can only be used for display, and is not normally&lt;br /&gt;re-usable for anything else. &lt;br /&gt;Where should I use XML? &lt;br /&gt;Its goal is to enable generic SGML to be served, received, and&lt;br /&gt;processed on the Web in the way that is now possible with HTML.&lt;br /&gt;XML has been designed for ease of implementation and for interoperability&lt;br /&gt;with both SGML and HTML. &lt;br /&gt;Despite early attempts, browsers never allowed other SGML, only&lt;br /&gt;HTML (although there were plugins), and they allowed it (even encouraged&lt;br /&gt;it) to be corrupted or broken, which held development back for over&lt;br /&gt;a decade by making it impossible to program for it reliably. XML&lt;br /&gt;fixes that by making it compulsory to stick to the rules, and by&lt;br /&gt;making the rules much simpler than SGML. &lt;br /&gt;But XML is not just for Web pages: in fact it’s very rarely used&lt;br /&gt;for Web pages on its own because browsers still don’t provide reliable&lt;br /&gt;support for formatting and transforming it. Common uses for XML&lt;br /&gt;include: &lt;br /&gt;Information identification because you can define your own markup,&lt;br /&gt;you can define meaningful names for all your information items.&lt;br /&gt;Information storage because XML is portable and non-proprietary,&lt;br /&gt;it can be used to store textual information across any platform.&lt;br /&gt;Because it is backed by an international standard, it will remain&lt;br /&gt;accessible and processable as a data format. Information structure&lt;br /&gt;&lt;br /&gt;XML can therefore be used to store and identify any kind of (hierarchical)&lt;br /&gt;information structure, especially for long, deep, or complex document&lt;br /&gt;sets or data sources, making it ideal for an information-management&lt;br /&gt;back-end to serving the Web. This is its most common Web application,&lt;br /&gt;with a transformation system to serve it as HTML until such time&lt;br /&gt;as browsers are able to handle XML consistently. Publishing the&lt;br /&gt;original goal of XML as defined in the quotation at the start of&lt;br /&gt;this section. Combining the three previous topics (identity, storage,&lt;br /&gt;structure) means it is possible to get all the benefits of robust&lt;br /&gt;document management and control (with XML) and publish to the Web&lt;br /&gt;(as HTML) as well as to paper (as PDF) and to other formats (eg&lt;br /&gt;Braille, Audio, etc) from a single source document by using the&lt;br /&gt;appropriate stylesheets. Messaging and data transfer XML is also&lt;br /&gt;very heavily used for enclosing or encapsulating information in&lt;br /&gt;order to pass it between different computing systems which would&lt;br /&gt;otherwise be unable to communicate. By providing a lingua franca&lt;br /&gt;for data identity and structure, it provides a common envelope for&lt;br /&gt;inter-process communication (messaging). Web services Building on&lt;br /&gt;all of these, as well as its use in browsers, machine-processable&lt;br /&gt;data can be exchanged between consenting systems, where before it&lt;br /&gt;was only comprehensible by humans (HTML). Weather services, e-commerce&lt;br /&gt;sites, blog newsfeeds, AJaX sites, and thousands of other data-exchange&lt;br /&gt;services use XML for data management and transmission, and the web&lt;br /&gt;browser for display and interaction. &lt;br /&gt;Why is XML such an important development? &lt;br /&gt;It removes two constraints which were holding back Web developments:&lt;br /&gt;1. dependence on a single, inflexible document type (HTML) which&lt;br /&gt;was being much abused for tasks it was never designed for;&lt;br /&gt;2. the complexity of full SGML, whose syntax allows many powerful&lt;br /&gt;but hard-to-program options.&lt;br /&gt;XML allows the flexible development of user-defined document types.&lt;br /&gt;It provides a robust, non-proprietary, persistent, and verifiable&lt;br /&gt;file format for the storage and transmission of text and data both&lt;br /&gt;on and off the Web; and it removes the more complex options of SGML,&lt;br /&gt;making it easier to program for. &lt;br /&gt; What is SGML? &lt;br /&gt;SGML is the Standard Generalized Markup Language (ISO 8879:1986),&lt;br /&gt;the international standard for defining descriptions of the structure&lt;br /&gt;of different types of electronic document. There is an SGML FAQ&lt;br /&gt;from David Megginson at http://math.albany.edu:8800/hm/sgml/cts-faq.htmlFAQ;&lt;br /&gt;and Robin Cover’s SGML Web pages are at http://www.oasis-open.org/cover/general.html.&lt;br /&gt;For a little light relief, try Joe English’s ‘Not the SGML&lt;br /&gt;FAQ’ at http://www.flightlab.com/~joe/sgml/faq-not.txtFAQ.&lt;br /&gt;&lt;br /&gt;SGML is very large, powerful, and complex. It has been in heavy&lt;br /&gt;industrial and commercial use for nearly two decades, and there&lt;br /&gt;is a significant body of expertise and software to go with it. &lt;br /&gt;XML is a lightweight cut-down version of SGML which keeps enough&lt;br /&gt;of its functionality to make it useful but removes all the optional&lt;br /&gt;features which made SGML too complex to program for in a Web environment. &lt;br /&gt;Aren’t XML, SGML, and HTML all the same thing? &lt;br /&gt;Not quite; SGML is the mother tongue, and has been used for describing&lt;br /&gt;thousands of different document types in many fields of human activity,&lt;br /&gt;from transcriptions of ancient Irish manuscripts to the technical&lt;br /&gt;documentation for stealth bombers, and from patients’ clinical records&lt;br /&gt;to musical notation. SGML is very large and complex, however, and&lt;br /&gt;probably overkill for most common office desktop applications. &lt;br /&gt;XML is an abbreviated version of SGML, to make it easier to use&lt;br /&gt;over the Web, easier for you to define your own document types,&lt;br /&gt;and easier for programmers to write programs to handle them. It&lt;br /&gt;omits all the complex and less-used options of SGML in return for&lt;br /&gt;the benefits of being easier to write applications for, easier to&lt;br /&gt;understand, and more suited to delivery and interoperability over&lt;br /&gt;the Web. But it is still SGML, and XML files may still be processed&lt;br /&gt;in the same way as any other SGML file (see the question on XML&lt;br /&gt;software). &lt;br /&gt;HTML is just one of many SGML or XML applicationsÃ¢â‚¬â€the one&lt;br /&gt;most frequently used on the Web. &lt;br /&gt;Technical readers may find it more useful to think of XML as being&lt;br /&gt;SGML– rather than HTML++. &lt;br /&gt;Why is XML such an important development? &lt;br /&gt;It removes two constraints which were holding back Web developments:&lt;br /&gt;&lt;br /&gt;1. dependence on a single, inflexible document type (HTML) which&lt;br /&gt;was being much abused for tasks it was never designed for;&lt;br /&gt;2. the complexity of full question A.4, SGML, whose syntax allows&lt;br /&gt;many powerful but hard-to-program options. &lt;br /&gt;XML allows the flexible development of user-defined document types.&lt;br /&gt;It provides a robust, non-proprietary, persistent, and verifiable&lt;br /&gt;file format for the storage and transmission of text and data both&lt;br /&gt;on and off the Web; and it removes the more complex options of SGML,&lt;br /&gt;making it easier to program for. &lt;br /&gt;Give a few examples of types of applications that can&lt;br /&gt;benefit from using XML. &lt;br /&gt;There are literally thousands of applications that can benefit&lt;br /&gt;from XML technologies. The point of this question is not to have&lt;br /&gt;the candidate rattle off a laundry list of projects that they have&lt;br /&gt;worked on, but, rather, to allow the candidate to explain the rationale&lt;br /&gt;for choosing XML by citing a few real world examples. For instance,&lt;br /&gt;one appropriate answer is that XML allows content management systems&lt;br /&gt;to store documents independently of their format, which thereby&lt;br /&gt;reduces data redundancy. Another answer relates to B2B exchanges&lt;br /&gt;or supply chain management systems. In these instances, XML provides&lt;br /&gt;a mechanism for multiple companies to exchange data according to&lt;br /&gt;an agreed upon set of rules. A third common response involves wireless&lt;br /&gt;applications that require WML to render data on hand held devices. &lt;br /&gt;What is DOM and how does it relate to XML? &lt;br /&gt;The Document Object Model (DOM) is an interface specification maintained&lt;br /&gt;by the W3C DOM Workgroup that defines an application independent&lt;br /&gt;mechanism to access, parse, or update XML data. In simple terms&lt;br /&gt;it is a hierarchical model that allows developers to manipulate&lt;br /&gt;XML documents easily Any developer that has worked extensively with&lt;br /&gt;XML should be able to discuss the concept and use of DOM objects&lt;br /&gt;freely. Additionally, it is not unreasonable to expect advanced&lt;br /&gt;candidates to thoroughly understand its internal workings and be&lt;br /&gt;able to explain how DOM differs from an event-based interface like&lt;br /&gt;SAX. &lt;br /&gt;What is SOAP and how does it relate to XML? &lt;br /&gt;The Simple Object Access Protocol (SOAP) uses XML to define a protocol&lt;br /&gt;for the exchange of information in distributed computing environments.&lt;br /&gt;SOAP consists of three components: an envelope, a set of encoding&lt;br /&gt;rules, and a convention for representing remote procedure calls.&lt;br /&gt;Unless experience with SOAP is a direct requirement for the open&lt;br /&gt;position, knowing the specifics of the protocol, or how it can be&lt;br /&gt;used in conjunction with HTTP, is not as important as identifying&lt;br /&gt;it as a natural application of XML. &lt;br /&gt;Why not just carry on extending HTML? &lt;br /&gt;HTML was already overburdened with dozens of interesting but incompatible&lt;br /&gt;inventions from different manufacturers, because it provides only&lt;br /&gt;one way of describing your information. &lt;br /&gt;XML allows groups of people or organizations to question C.13, create&lt;br /&gt;their own customized markup applications for exchanging information&lt;br /&gt;in their domain (music, chemistry, electronics, hill-walking, finance,&lt;br /&gt;surfing, petroleum geology, linguistics, cooking, knitting, stellar&lt;br /&gt;cartography, history, engineering, rabbit-keeping, question C.19,&lt;br /&gt;mathematics, genealogy, etc). &lt;br /&gt;HTML is now well beyond the limit of its usefulness as a way of&lt;br /&gt;describing information, and while it will continue to play an important&lt;br /&gt;role for the content it currently represents, many new applications&lt;br /&gt;require a more robust and flexible infrastructure. &lt;br /&gt;Why should I use XML? &lt;br /&gt;Here are a few reasons for using XML (in no particular order).&lt;br /&gt;Not all of these will apply to your own requirements, and you may&lt;br /&gt;have additional reasons not mentioned here (if so, please let the&lt;br /&gt;editor of the FAQ know!). &lt;br /&gt;* XML can be used to describe and identify information accurately&lt;br /&gt;and unambiguously, in a way that computers can be programmed to&lt;br /&gt;‘understand’ (well, at least manipulate as if they could&lt;br /&gt;understand).&lt;br /&gt;* XML allows documents which are all the same type to be created&lt;br /&gt;consistently and without structural errors, because it provides&lt;br /&gt;a standardized way of describing, controlling, or allowing/disallowing&lt;br /&gt;particular types of document structure. [Note that this has absolutely&lt;br /&gt;nothing whatever to do with formatting, appearance, or the actual&lt;br /&gt;text content of your documents, only the structure of them.]&lt;br /&gt;* XML provides a robust and durable format for information storage&lt;br /&gt;and transmission. Robust because it is based on a proven standard,&lt;br /&gt;and can thus be tested and verified; durable because it uses plain-text&lt;br /&gt;file formats which will outlast proprietary binary ones.&lt;br /&gt;* XML provides a common syntax for messaging systems for the exchange&lt;br /&gt;of information between applications. Previously, each messaging&lt;br /&gt;system had its own format and all were different, which made inter-system&lt;br /&gt;messaging unnecessarily messy, complex, and expensive. If everyone&lt;br /&gt;uses the same syntax it makes writing these systems much faster&lt;br /&gt;and more reliable.&lt;br /&gt;* XML is free. Not just free of charge (free as in beer) but free&lt;br /&gt;of legal encumbrances (free as in speech). It doesn’t belong to&lt;br /&gt;anyone, so it can’t be hijacked or pirated. And you don’t have to&lt;br /&gt;pay a fee to use it (you can of course choose to use commercial&lt;br /&gt;software to deal with it, for lots of good reasons, but you don’t&lt;br /&gt;pay for XML itself).&lt;br /&gt;* XML information can be manipulated programmatically (under machine&lt;br /&gt;control), so XML documents can be pieced together from disparate&lt;br /&gt;sources, or taken apart and re-used in different ways. They can&lt;br /&gt;be converted into almost any other format with no loss of information.&lt;br /&gt;* XML lets you separate form from content. Your XML file contains&lt;br /&gt;your document information (text, data) and identifies its structure:&lt;br /&gt;your formatting and other processing needs are identified separately&lt;br /&gt;in a style sheet or processing system. The two are combined at output&lt;br /&gt;time to apply the required formatting to the text or data identified&lt;br /&gt;by its structure (location, position, rank, order, or whatever). &lt;br /&gt;How would you build a search engine for large volumes&lt;br /&gt;of XML data? &lt;br /&gt;The way candidates answer this question may provide insight into&lt;br /&gt;their view of XML data. For those who view XML primarily as a way&lt;br /&gt;to denote structure for text files, a common answer is to build&lt;br /&gt;a full-text search and handle the data similarly to the way Internet&lt;br /&gt;portals handle HTML pages. Others consider XML as a standard way&lt;br /&gt;of transferring structured data between disparate systems. These&lt;br /&gt;candidates often describe some scheme of importing XML into a relational&lt;br /&gt;or object database and relying on the database’s engine for searching.&lt;br /&gt;Lastly, candidates that have worked with vendors specializing in&lt;br /&gt;this area often say that the best way the handle this situation&lt;br /&gt;is to use a third party software package optimized for XML data. &lt;br /&gt;&lt;br /&gt;Does XML replace HTML? &lt;br /&gt;No. XML itself does not replace HTML. Instead, it provides an alternative&lt;br /&gt;which allows you to define your own set of markup elements. HTML&lt;br /&gt;is expected to remain in common use for some time to come, and the&lt;br /&gt;current version of HTML is in XML syntax. XML is designed to make&lt;br /&gt;the writing of DTDs much simpler than with full SGML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-1955662805764436613?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/1955662805764436613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/11/xml-interview-questions.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/1955662805764436613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/1955662805764436613'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/11/xml-interview-questions.html' title='XML Interview Questions'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-4311354189875217383</id><published>2009-11-04T04:16:00.000-08:00</published><updated>2009-11-04T04:17:52.070-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Services Interview Questions'/><title type='text'>Web Services Interview Questions</title><content type='html'>1) What is a Web service?&lt;br /&gt;Many people and companies have debated the exact definition of Web services. At a minimum, however, a Web service is any piece of software that makes itself available over the Internet and uses a standardized XML messaging system. &lt;br /&gt;XML is used to encode all communications to a Web service. For example, a client invokes a Web service by sending an XML message, then waits for a corresponding XML response. Because all communication is in XML, Web services are not tied to any one operating system or programming language--Java can talk with Perl; Windows applications can talk with Unix applications. &lt;br /&gt;Beyond this basic definition, a Web service may also have two additional (and desirable) properties: &lt;br /&gt;First, a Web service can have a public interface, defined in a common XML grammar. The interface describes all the methods available to clients and specifies the signature for each method. Currently, interface definition is accomplished via the Web Service Description Language (WSDL). (See FAQ number 7.) &lt;br /&gt;Second, if you create a Web service, there should be some relatively simple mechanism for you to publish this fact. Likewise, there should be some simple mechanism for interested parties to locate the service and locate its public interface. The most prominent directory of Web services is currently available via UDDI, or Universal Description, Discovery, and Integration. (See FAQ number 8.) &lt;br /&gt;Web services currently run a wide gamut from news syndication and stock-market data to weather reports and package-tracking systems. For a quick look at the range of Web services currently available, check out the XMethods directory of Web services. &lt;br /&gt;2) What is new about Web services? &lt;br /&gt; People have been using Remote Procedure Calls (RPC) for some time now, and they long ago discovered how to send such calls over HTTP. &lt;br /&gt;So, what is really new about Web services? The answer is XML. &lt;br /&gt;XML lies at the core of Web services, and provides a common language for describing Remote Procedure Calls, Web services, and Web service directories. &lt;br /&gt;Prior to XML, one could share data among different applications, but XML makes this so much easier to do. In the same vein, one can share services and code without Web services, but XML makes it easier to do these as well. &lt;br /&gt;By standardizing on XML, different applications can more easily talk to one another, and this makes software a whole lot more interesting. &lt;br /&gt;3) I keep reading about Web services, but I have never actually seen one. Can you show me a real Web service in action? &lt;br /&gt; If you want a more intuitive feel for Web services, try out the IBM Web Services Browser, available on the IBM Alphaworks site. The browser provides a series of Web services demonstrations. Behind the scenes, it ties together SOAP, WSDL, and UDDI to provide a simple plug-and-play interface for finding and invoking Web services. For example, you can find a stock-quote service, a traffic-report service, and a weather service. Each service is independent, and you can stack services like building blocks. You can, therefore, create a single page that displays multiple services--where the end result looks like a stripped-down version of my.yahoo or my.excite. &lt;br /&gt;4) What is the Web service protocol stack?&lt;br /&gt;&lt;br /&gt; The Web service protocol stack is an evolving set of protocols used to define, discover, and implement Web services. The core protocol stack consists of four layers: &lt;br /&gt;Service Transport: This layer is responsible for transporting messages between applications. Currently, this includes HTTP, SMTP, FTP, and newer protocols, such as Blocks Extensible Exchange Protocol (BEEP). &lt;br /&gt;XML Messaging: This layer is responsible for encoding messages in a common XML format so that messages can be understood at either end. Currently, this includes XML-RPC and SOAP. &lt;br /&gt;Service Description: This layer is responsible for describing the public interface to a specific Web service. Currently, service description is handled via the WSDL. &lt;br /&gt;Service Discovery: This layer is responsible for centralizing services into a common registry, and providing easy publish/find functionality. Currently, service discovery is handled via the UDDI. &lt;br /&gt;Beyond the essentials of XML-RPC, SOAP, WSDL, and UDDI, the Web service protocol stack includes a whole zoo of newer, evolving protocols. These include WSFL (Web Services Flow Language), SOAP-DSIG (SOAP Security Extensions: Digital Signature), and USML (UDDI Search Markup Language). For an overview of these protocols, check out Pavel Kulchenko's article, Web Services Acronyms, Demystified, on XML.com. &lt;br /&gt;Fortunately, you do not need to understand the full protocol stack to get started with Web services. Assuming you already know the basics of HTTP, it is best to start at the XML Messaging layer and work your way up. &lt;br /&gt;5) What is XML-RPC? &lt;br /&gt; XML-RPC is a protocol that uses XML messages to perform Remote Procedure Calls. Requests are encoded in XML and sent via HTTP POST; XML responses are embedded in the body of the HTTP response. &lt;br /&gt;More succinctly, XML-RPC = HTTP + XML + Remote Procedure Calls. &lt;br /&gt;Because XML-RPC is platform independent, diverse applications can communicate with one another. For example, a Java client can speak XML-RPC to a Perl server. &lt;br /&gt;To get a quick sense of XML-RPC, here is a sample XML-RPC request to a weather service (with the HTTP Headers omitted): &lt;br /&gt;&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;br /&gt;&lt;methodCall&gt;&lt;br /&gt;&lt;methodName&gt;weather.getWeather&lt;/methodName&gt;&lt;br /&gt;&lt;params&gt;&lt;br /&gt;&lt;param&gt;&lt;value&gt;10016&lt;/value&gt;&lt;/param&gt;&lt;br /&gt;&lt;/params&gt;&lt;br /&gt;&lt;/methodCall&gt;&lt;br /&gt;The request consists of a simple element, which specifies the method name (getWeather) and any method parameters (zip code).&lt;br /&gt;&lt;br /&gt;Here is a sample XML-RPC response from the weather service:&lt;br /&gt;&lt;br /&gt;&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;br /&gt;&lt;methodResponse&gt;&lt;br /&gt;&lt;params&gt;&lt;br /&gt;&lt;param&gt;&lt;br /&gt;&lt;value&gt;&lt;int&gt;65&lt;/int&gt;&lt;/value&gt;&lt;br /&gt;&lt;/param&gt;&lt;br /&gt;&lt;/params&gt;&lt;br /&gt;&lt;/methodResponse&gt;&lt;br /&gt;The response consists of a single element, which specifies the return value (the current temperature). In this case, the return value is specified as an integer. &lt;br /&gt;In many ways, XML-RPC is much simpler than SOAP, and therefore represents the easiest way to get started with Web services. &lt;br /&gt;The official XML-RPC specification is available at XML-RPC.com. Dozens of XML-RPC implementations are available in Perl, Python, Java, and Ruby. See the XML-RPC home page for a complete list of implementations.&lt;br /&gt;6) What is SOAP?&lt;br /&gt; SOAP is an XML-based protocol for exchanging information between computers. Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of transport protocols, the main focus of SOAP is Remote Procedure Calls (RPC) transported via HTTP. Like XML-RPC, SOAP is platform independent, and therefore enables diverse applications to communicate with one another.&lt;br /&gt;&lt;br /&gt;To get a quick sense of SOAP, here is a sample SOAP request to a weather service (with the HTTP Headers omitted): &lt;br /&gt;&lt;br /&gt;&lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;br /&gt;&lt;SOAP-ENV:Envelope&lt;br /&gt;xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt;&lt;SOAP-ENV:Body&gt;&lt;br /&gt;&lt;ns1:getWeather &lt;br /&gt;xmlns:ns1="urn:examples:weatherservice"&lt;br /&gt;SOAP-ENV:encodingStyle=" http://www.w3.org/2001/09/soap-encoding&lt;br /&gt;&lt;zipcode xsi:type="xsd:string"&gt;10016&lt;/zipcode&gt;&lt;br /&gt;&lt;/ns1:getWeather&gt;&lt;br /&gt;&lt;/SOAP-ENV:Body&gt;&lt;br /&gt;&lt;/SOAP-ENV:Envelope&gt;&lt;br /&gt;As you can see, the request is slightly more complicated than XML-RPC and makes use of both XML namespaces and XML Schemas. Much like XML-RPC, however, the body of the request specifies both a method name (getWeather), and a list of parameters (zipcode).&lt;br /&gt;&lt;br /&gt;Here is a sample SOAP response from the weather service:&lt;br /&gt;&lt;br /&gt;&lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;br /&gt;&lt;SOAP-ENV:Envelope&lt;br /&gt;xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt;&lt;SOAP-ENV:Body&gt;&lt;br /&gt;&lt;ns1:getWeatherResponse&lt;br /&gt;xmlns:ns1="urn:examples:weatherservice"&lt;br /&gt;SOAP-ENV:encodingStyle="http://www.w3.org/2001/09/soap-encoding"&gt;&lt;br /&gt;&lt;return xsi:type="xsd:int"&gt;65&lt;/return&gt;&lt;br /&gt;&lt;/ns1:getWeatherResponse&gt;&lt;br /&gt;&lt;/SOAP-ENV:Body&gt;&lt;br /&gt;&lt;/SOAP-ENV:Envelope&gt;&lt;br /&gt;&lt;br /&gt;The response indicates a single integer return value (the current temperature). &lt;br /&gt;The World Wide Web Consortium (W3C) is in the process of creating a SOAP standard. The latest working draft is designated as SOAP 1.2, and the specification is now broken into two parts. Part 1 describes the SOAP messaging framework and envelope specification. Part 2 describes the SOAP encoding rules, the SOAP-RPC convention, and HTTP binding details.&lt;br /&gt;7) What is WSDL?&lt;br /&gt;&lt;br /&gt; The Web Services Description Language (WSDL) currently represents the service description layer within the Web service protocol stack. &lt;br /&gt;In a nutshell, WSDL is an XML grammar for specifying a public interface for a Web service. This public interface can include the following: &lt;br /&gt;&lt;br /&gt;Information on all publicly available functions. &lt;br /&gt;Data type information for all XML messages. &lt;br /&gt;Binding information about the specific transport protocol to be used. &lt;br /&gt;Address information for locating the specified service. &lt;br /&gt;&lt;br /&gt;WSDL is not necessarily tied to a specific XML messaging system, but it does include built-in extensions for describing SOAP services.&lt;br /&gt;&lt;br /&gt;Below is a sample WSDL file. This file describes the public interface for the weather service used in the SOAP example above. Obviously, there are many details to understanding the example. For now, just consider two points. &lt;br /&gt;First, the &lt;message&gt; elements specify the individual XML messages that are transferred between computers. In this case, we have a getWeatherRequest and a getWeatherResponse. Second, the element specifies that the service is available via SOAP and is available at a specific URL. &lt;br /&gt;&lt;br /&gt;&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;br /&gt;&lt;definitions name="WeatherService"&lt;br /&gt;targetNamespace="http://www.ecerami.com/wsdl/WeatherService.wsdl"&lt;br /&gt;xmlns="http://schemas.xmlsoap.org/wsdl/"&lt;br /&gt;xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"&lt;br /&gt;xmlns:tns="http://www.ecerami.com/wsdl/WeatherService.wsdl"&lt;br /&gt;xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt;&lt;message name="getWeatherRequest"&gt;&lt;br /&gt;&lt;part name="zipcode" type="xsd:string"/&gt;&lt;br /&gt;&lt;/message&gt;&lt;br /&gt;&lt;message name="getWeatherResponse"&gt;&lt;br /&gt;&lt;part name="temperature" type="xsd:int"/&gt;&lt;br /&gt;&lt;/message&gt;&lt;br /&gt;&lt;br /&gt;&lt;portType name="Weather_PortType"&gt;&lt;br /&gt;&lt;operation name="getWeather"&gt;&lt;br /&gt;&lt;input message="tns:getWeatherRequest"/&gt;&lt;br /&gt;&lt;output message="tns:getWeatherResponse"/&gt;&lt;br /&gt;&lt;/operation&gt;&lt;br /&gt;&lt;/portType&gt;&lt;br /&gt;&lt;br /&gt;&lt;binding name="Weather_Binding" type="tns:Weather_PortType"&gt;&lt;br /&gt;&lt;soap:binding style="rpc" &lt;br /&gt;transport="http://schemas.xmlsoap.org/soap/http"/&gt;&lt;br /&gt;&lt;operation name="getWeather"&gt;&lt;br /&gt;&lt;soap:operation soapAction=""/&gt;&lt;br /&gt;&lt;input&gt;&lt;br /&gt;&lt;soap:body&lt;br /&gt;encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&lt;br /&gt;namespace="urn:examples:weatherservice"&lt;br /&gt;use="encoded"/&gt;&lt;br /&gt;&lt;/input&gt;&lt;br /&gt;&lt;output&gt;&lt;br /&gt;&lt;soap:body&lt;br /&gt;encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&lt;br /&gt;namespace="urn:examples:weatherservice"&lt;br /&gt;use="encoded"/&gt;&lt;br /&gt;&lt;/output&gt;&lt;br /&gt;&lt;/operation&gt;&lt;br /&gt;&lt;/binding&gt;&lt;br /&gt;&lt;br /&gt;&lt;service name="Weather_Service"&gt;&lt;br /&gt;&lt;documentation&gt;WSDL File for Weather Service&lt;/documentation&gt;&lt;br /&gt;&lt;port binding="tns:Weather_Binding" name="Weather_Port"&gt;&lt;br /&gt;&lt;soap:address &lt;br /&gt;location="http://localhost:8080/soap/servlet/rpcrouter"/&gt;&lt;br /&gt;&lt;/port&gt;&lt;br /&gt;&lt;/service&gt;&lt;br /&gt;&lt;/definitions&gt;&lt;br /&gt;Using WSDL, a client can locate a Web service, and invoke any of the publicly available functions. With WSDL-aware tools, this process can be entirely automated, enabling applications to easily integrate new services with little or no manual code. For example, check out the GLUE platform from the Mind Electric. &lt;br /&gt;WSDL has been submitted to the W3C, but it currently has no official status within the W3C. See this W3C page for the latest draft. &lt;br /&gt;8) What is UDDI?&lt;br /&gt; UDDI (Universal Description, Discovery, and Integration) currently represents the discovery layer within the Web services protocol stack. &lt;br /&gt;UDDI was originally created by Microsoft, IBM, and Ariba, and represents a technical specification for publishing and finding businesses and Web services. &lt;br /&gt;At its core, UDDI consists of two parts. &lt;br /&gt;First, UDDI is a technical specification for building a distributed directory of businesses and Web services. Data is stored within a specific XML format, and the UDDI specification includes API details for searching existing data and publishing new data. &lt;br /&gt;Second, the UDDI Business Registry is a fully operational implementation of the UDDI specification. Launched in May 2001 by Microsoft and IBM, the UDDI registry now enables anyone to search existing UDDI data. It also enables any company to register themselves and their services. &lt;br /&gt;The data captured within UDDI is divided into three main categories: &lt;br /&gt;White Pages: This includes general information about a specific company. For example, business name, business description, and address. &lt;br /&gt;Yellow Pages: This includes general classification data for either the company or the service offered. For example, this data may include industry, product, or geographic codes based on standard taxonomies. &lt;br /&gt;Green Pages: This includes technical information about a Web service. Generally, this includes a pointer to an external specification, and an address for invoking the Web service. &lt;br /&gt;You can view the Microsoft UDDI site, or the IBM UDDI site. The complete UDDI specification is available at uddi.org. &lt;br /&gt;Beta versions of UDDI Version 2 are available at: &lt;br /&gt;Hewlett Packard &lt;br /&gt;IBM &lt;br /&gt;Microsoft &lt;br /&gt;SAP&lt;br /&gt;9) How do I get started with Web Services? &lt;br /&gt; The easiest way to get started with Web services is to learn XML-RPC. Check out the XML-RPC specification or read my book, Web Services Essentials. O'Reilly has also recently released a book on Programming Web Services with XML-RPC by Simon St.Laurent, Joe Johnston, and Edd Dumbill. &lt;br /&gt;Once you have learned the basics of XML-RPC, move onto SOAP, WSDL, and UDDI. These topics are also covered in Web Services Essentials. For a comprehensive treatment of SOAP, check out O'Reilly's Programming Web Services with SOAP, by Doug Tidwell, James Snell, and Pavel Kulchenko. &lt;br /&gt;10) Does the W3C support any Web service standards? &lt;br /&gt; The World Wide Web Consortium (W3C) is actively pursuing standardization of Web service protocols. In September 2000, the W3C established an XML Protocol Activity. The goal of the group is to establish a formal standard for SOAP. A draft version of SOAP 1.2 is currently under review, and progressing through the official W3C recommendation process. &lt;br /&gt;On January 25, 2002, the W3C also announced the formation of a Web Service Activity. This new activity will include the current SOAP work as well as two new groups. The first new group is the Web Services Description Working Group, which will take up work on WSDL. The second new group is the Web Services Architecture Working Group, which will attempt to create a cohesive framework for Web service protocols.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-4311354189875217383?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/4311354189875217383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/11/web-services-interview-questions.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/4311354189875217383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/4311354189875217383'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/11/web-services-interview-questions.html' title='Web Services Interview Questions'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-3822350638325953347</id><published>2009-10-28T02:56:00.001-07:00</published><updated>2009-10-28T02:56:44.746-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Codd Rules'/><title type='text'>Codd Rules</title><content type='html'>Rule 1 : The information Rule.&lt;br /&gt;"All information in a relational data base is represented explicitly at the logical level and in exactly one way - by values in tables."&lt;br /&gt;&lt;br /&gt;Everything within the database exists in tables and is accessed via table access routines.&lt;br /&gt;&lt;br /&gt;Rule 2 : Guaranteed access Rule.&lt;br /&gt;"Each and every datum (atomic value) in a relational data base is guaranteed to be logically accessible by resorting to a combination of table name, primary key value and column name."&lt;br /&gt;&lt;br /&gt;To access any data-item you specify which column within which table it exists, there is no reading of characters 10 to 20 of a 255 byte string.&lt;br /&gt;&lt;br /&gt;Rule 3 : Systematic treatment of null values.&lt;br /&gt;"Null values (distinct from the empty character string or a string of blank characters and distinct from zero or any other number) are supported in fully relational DBMS for representing missing information and inapplicable information in a systematic way, independent of data type."&lt;br /&gt;&lt;br /&gt;If data does not exist or does not apply then a value of NULL is applied, this is understood by the RDBMS as meaning non-applicable data.&lt;br /&gt;&lt;br /&gt;Rule 4 : Dynamic on-line catalog based on the relational model.&lt;br /&gt;"The data base description is represented at the logical level in the same way as-ordinary data, so that authorized users can apply the same relational language to its interrogation as they apply to the regular data."&lt;br /&gt;&lt;br /&gt;The Data Dictionary is held within the RDBMS, thus there is no-need for off-line volumes to tell you the structure of the database.&lt;br /&gt;&lt;br /&gt;Rule 5 : Comprehensive data sub-language Rule.&lt;br /&gt;"A relational system may support several languages and various modes of terminal use (for example, the fill-in-the-blanks mode). However, there must be at least one language whose statements are expressible, per some well-defined syntax, as character strings and that is comprehensive in supporting all the following items &lt;br /&gt;&lt;br /&gt;Data Definition &lt;br /&gt;View Definition &lt;br /&gt;Data Manipulation (Interactive and by program). &lt;br /&gt;Integrity Constraints &lt;br /&gt;Authorization. &lt;br /&gt;&lt;br /&gt;Every RDBMS should provide a language to allow the user to query the contents of the RDBMS and also manipulate the contents of the RDBMS.&lt;br /&gt;&lt;br /&gt;Rule 6 : .View updating Rule&lt;br /&gt;"All views that are theoretically updatable are also updatable by the system."&lt;br /&gt;&lt;br /&gt;Not only can the user modify data, but so can the RDBMS when the user is not logged-in.&lt;br /&gt;&lt;br /&gt;Rule 7 : High-level insert, update and delete.&lt;br /&gt;"The capability of handling a base relation or a derived relation as a single operand applies not only to the retrieval of data but also to the insertion, update and deletion of data."&lt;br /&gt;&lt;br /&gt;The user should be able to modify several tables by modifying the view to which they act as base tables.&lt;br /&gt;&lt;br /&gt;Rule 8 : Physical data independence.&lt;br /&gt;"Application programs and terminal activities remain logically unimpaired whenever any changes are made in either storage representations or access methods."&lt;br /&gt;&lt;br /&gt;The user should not be aware of where or upon which media data-files are stored&lt;br /&gt;&lt;br /&gt;Rule 9 : Logical data independence.&lt;br /&gt;"Application programs and terminal activities remain logically unimpaired when information-preserving changes of any kind that theoretically permit un-impairment are made to the base tables."&lt;br /&gt;&lt;br /&gt;User programs and the user should not be aware of any changes to the structure of the tables (such as the addition of extra columns).&lt;br /&gt;&lt;br /&gt;Rule 10 : Integrity independence.&lt;br /&gt;"Integrity constraints specific to a particular relational data base must be definable in the relational data sub-language and storable in the catalog, not in the application programs."&lt;br /&gt;&lt;br /&gt;If a column only accepts certain values, then it is the RDBMS which enforces these constraints and not the user program, this means that an invalid value can never be entered into this column, whilst if the constraints were enforced via programs there is always a chance that a buggy program might allow incorrect values into the system.&lt;br /&gt;&lt;br /&gt;Rule 11 : Distribution independence.&lt;br /&gt;"A relational DBMS has distribution independence."&lt;br /&gt;&lt;br /&gt;The RDBMS may spread across more than one system and across several networks, however to the end-user the tables should appear no different to those that are local.&lt;br /&gt;&lt;br /&gt;Rule 12 : Non-subversion Rule.&lt;br /&gt;"If a relational system has a low-level (single-record-at-a-time) language, that low level cannot be used to subvert or bypass the integrity Rules and constraints expressed in the higher level relational language (multiple-records-at-a-time)."&lt;br /&gt;&lt;br /&gt;The RDBMS should prevent users from accessing the data without going through the Oracle data-read functions.&lt;br /&gt;In Rule 5 Codd stated that an RDBMS required a Query Language, however Codd does not explicitly state that SQL should be the query tool, just that there should be a tool, and many of the initial products had their own tools, Oracle had UFI (User Friendly Interface), Ingres had QUEL (QUery Execution Language) and the never released DB1 had a language called sequel, the acronym SQL is often pronounced such as it was sequel that provided the core functionality to SQL.&lt;br /&gt;Even when the vendors eventually all started offering SQL the flavours were/are all radically different and contained wildly varying syntax. This situation was somewhat resolved in the late 80's when ANSI brought out their first definition of the SQL syntax.&lt;br /&gt;This has since been upgraded to version 2 and now all vendors offer a standard core SQL, however ANSI SQL is somewhat limited and thus all RDBMS providers offer extensions to SQL which may differ from vendor to vendor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-3822350638325953347?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/3822350638325953347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/codd-rules.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3822350638325953347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3822350638325953347'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/codd-rules.html' title='Codd Rules'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-3128497135260268999</id><published>2009-10-20T23:54:00.000-07:00</published><updated>2009-10-20T23:55:12.018-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADO.Net Interview Questions'/><title type='text'>ADO.Net Interview Questions</title><content type='html'>1.    What is ADO.Net? &lt;br /&gt; &lt;br /&gt;ActiveX Data Object (ADO).NET is the primary relational data access model for Microsoft .NET-based applications. ADO.Net provides consistent data access from database management system (DBMS) such as SQL Server, Oracle etc. ADO.NET is exclusively designed to meet the requirements of web-based applications model such as disconnected data architecture, integration with XML, common data representation, combining data from multiple data sources, and optimization in interacting with the database.  &lt;br /&gt;  &lt;br /&gt;2.    Explain the ADO .Net Architecture? &lt;br /&gt; &lt;br /&gt;ADO.NET Architecture includes three data providers for implementing connectivity with databases: SQL Server .NET Data Provider, OLEDB .NET Data Provider, and ODBC .Net Data Provider. You can access data through data provider in two ways either using a DataReader or DataAdapter.&lt;br /&gt;&lt;br /&gt;Leverage current ADO knowledge &lt;br /&gt;Support the N-Tier programming model &lt;br /&gt;Provide support for XML &lt;br /&gt; &lt;br /&gt;In distributed applications, the concept of working with disconnected data has become very common. A disconnected model means that once you have retrieved the data that you need, the connection to the data source is dropped—you work with the data locally. The reason why this model has become so popular is that it frees up precious database server resources, which leads to highly scalable applications. The ADO.NET solution for disconnected data is the DataSet object. &lt;br /&gt;&lt;br /&gt;Data Access in ADO.NET relies on two components:&lt;br /&gt;&lt;br /&gt;DataSet &lt;br /&gt;Data Provider. &lt;br /&gt;DataSet&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The ADO.NET Data Set is explicitly designed for data access independent of any data source. As a result, it can be used with multiple and differing data sources, used with XML data, or used to manage data local to the application. The DataSet contains a collection of one or more objects made up of rows and columns of data, as well as primary key, foreign key, constraint, and relation information about the data in the DataTable objects.&lt;br /&gt;The dataset is a disconnected, in-memory representation of data. It can be considered as a local copy of the relevant portions of the database. The DataSet is persisted in memory and the data in it can be manipulated and updated independent of the database. When the use of this DataSet is finished, changes can be made back to the central database for updating. The data in DataSet can be loaded from any valid data source like Microsoft SQL server database, an Oracle database or from a Microsoft Access database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Provider &lt;br /&gt;&lt;br /&gt;The Data Provider is responsible for providing and maintaining the connection to the database. A DataProvider is a set of related components that work together to provide data in an efficient and performance driven manner. The .NET Framework currently comes with two DataProviders: the SQL Data Provider which is designed only to work with Microsoft's SQL Server 7.0 or later and the OleDb DataProvider which allows us to connect to other types of databases like Access and Oracle. Each DataProvider consists of the following component classes:&lt;br /&gt;&lt;br /&gt;The Connection object which provides a connection to the database&lt;br /&gt;The Command object which is used to execute a command&lt;br /&gt;The DataReader object which provides a forward-only, read only, connected recordset&lt;br /&gt;The DataAdapter object which populates a disconnected DataSet with data and performs update&lt;br /&gt;&lt;br /&gt;Data access with ADO.NET can be summarized as follows:&lt;br /&gt;A connection object establishes the connection for the application with the database. The command object provides direct execution of the command to the database. If the command returns more than a single value, the command object returns a DataReader to provide the data. Alternatively, the DataAdapter can be used to fill the Dataset object. The database can be updated using the command object or the DataAdapter. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Component classes that make up the Data Providers&lt;br /&gt;&lt;br /&gt; The Connection Object&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The Connection object creates the connection to the database. Microsoft Visual Studio .NET provides two types of Connection classes: the SqlConnection object, which is designed specifically to connect to Microsoft SQL Server 7.0 or later, and the OleDbConnection object, which can provide connections to a wide range of database types like Microsoft Access and Oracle. The Connection object contains all of the information required to open a connection to the database.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Command Object&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The Command object is represented by two corresponding classes: SqlCommand and OleDbCommand. Command objects are used to execute commands to a database across a data connection. The Command objects can be used to execute stored procedures on the database, SQL commands, or return complete tables directly. Command objects provide three methods that are used to execute commands on the database:&lt;br /&gt;ExecuteNonQuery: Executes commands that have no return values such as INSERT, UPDATE or DELETE &lt;br /&gt;ExecuteScalar: Returns a single value from a database query &lt;br /&gt;ExecuteReader: Returns a result set by way of a DataReader object&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The DataReader Object&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The DataReader object provides a forward-only, read-only, connected stream recordset from a database. Unlike other components of the Data Provider, DataReader objects cannot be directly instantiated. Rather, the DataReader is returned as the result of the Command object's ExecuteReader method. The SqlCommand.ExecuteReader method returns a SqlDataReader object, and the OleDbCommand.ExecuteReader method returns an OleDbDataReader object. The DataReader can provide rows of data directly to application logic when you do not need to keep the data cached in memory. Because only one row is in memory at a time, the DataReader provides the lowest overhead in terms of system performance but requires the exclusive use of an open Connection object for the lifetime of the DataReader.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The DataAdapter Object&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The DataAdapter is the class at the core of ADO .NET's disconnected data access. It is essentially the middleman facilitating all communication between the database and a DataSet. The DataAdapter is used either to fill a DataTable or DataSet with data from the database with it's Fill method. After the memory-resident data has been manipulated, the DataAdapter can commit the changes to the database by calling the Update method. The DataAdapter provides four properties that represent database commands:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SelectCommand &lt;br /&gt;InsertCommand &lt;br /&gt;DeleteCommand &lt;br /&gt;UpdateCommand &lt;br /&gt;When the Update method is called, changes in the DataSet are copied back to the database and the appropriate InsertCommand, DeleteCommand, or UpdateCommand is executed.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;3.    What are the advantages and drawbacks of using ADO.NET?  &lt;br /&gt; &lt;br /&gt;Pros&lt;br /&gt;&lt;br /&gt;ADO.NET is rich with plenty of features that are bound to impress even the most skeptical of programmers. If this weren’t the case, Microsoft wouldn’t even be able to get anyone to use the Beta. What we’ve done here is come up with a short list of some of the more outstanding benefits to using the ADO.NET architecture and the System.Data namespace. &lt;br /&gt;&lt;br /&gt;* Performance – there is no doubt that ADO.NET is extremely fast. The actual figures vary depending on who performed the test and which benchmark was being used, but ADO.NET performs much, much faster at the same tasks than its predecessor, ADO. Some of the reasons why ADO.NET is faster than ADO are discussed in the ADO versus ADO.NET section later in this chapter. &lt;br /&gt;&lt;br /&gt;* Optimized SQL Provider – in addition to performing well under general circumstances, ADO.NET includes a SQL Server Data Provider that is highly optimized for interaction with SQL Server. It uses SQL Server’s own TDS (Tabular Data Stream) format for exchanging information. Without question, your SQL Server 7 and above data access operations will run blazingly fast utilizing this optimized Data Provider. &lt;br /&gt;&lt;br /&gt;* XML Support (and Reliance) – everything you do in ADO.NET at some point will boil down to the use of XML. In fact, many of the classes in ADO.NET, such as the DataSet, are so intertwined with XML that they simply cannot exist or function without utilizing the technology. You’ll see later when we compare and contrast the “old” and the “new” why the reliance on XML for internal storage provides many, many advantages, both to the framework and to the programmer utilizing the class library. &lt;br /&gt;&lt;br /&gt;* Disconnected Operation Model – the core ADO.NET class, the DataSet, operates in an entirely disconnected fashion. This may be new to some programmers, but it is a remarkably efficient and scalable architecture. Because the disconnected model allows for the DataSet class to be unaware of the origin of its data, an unlimited number of supported data sources can be plugged into code without any hassle in the future. &lt;br /&gt;&lt;br /&gt;* Rich Object Model – the entire ADO.NET architecture is built on a hierarchy of class inheritance and interface implementation. Once you start looking for things you need within this namespace, you’ll find that the logical inheritance of features and base class support makes the entire system extremely easy to use, and very customizable to suit your own needs. It is just another example of how everything in the .NET framework is pushing toward a trend of strong application design and strong OOP implementations. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cons&lt;br /&gt;&lt;br /&gt;Hard as it may be to believe, there are a couple of drawbacks or disadvantages to using the ADO.NET architecture. I’m sure others can find many more faults than we list here, but we decided to stick with a short list of some of the more obvious and important shortcomings of the technology. &lt;br /&gt;&lt;br /&gt;* Managed-Only Access – for a few obvious reasons, and some far more technical, you cannot utilize the ADO.NET architecture from anything but managed code. This means that there is no COM interoperability allowed for ADO.NET. Therefore, in order to take advantage of the advanced SQL Server Data Provider and any other feature like DataSets, XML internal data storage, etc, your code must be running under the CLR. &lt;br /&gt;&lt;br /&gt;* Only Three Managed Data Providers (so far) – unfortunately, if you need to access any data that requires a driver that cannot be used through either an OLEDB provider or the SQL Server Data Provider, then you may be out of luck. However, the good news is that the OLEDB provider for ODBC is available for download from Microsoft. At that point the down-side becomes one of performance, in which you are invoking multiple layers of abstraction as well as crossing the COM InterOp gap, incurring some initial overhead as well. &lt;br /&gt;&lt;br /&gt;* Learning Curve – despite the misleading name, ADO.NET is not simply a new version of ADO, nor should it even be considered a direct successor. ADO.NET should be thought of more as the data access class library for use with the .NET framework. The difficulty in learning to use ADO.NET to its fullest is that a lot of it does seem familiar. It is this that causes some common pitfalls. Programmers need to learn that even though some syntax may appear the same, there is actually a considerable amount of difference in the internal workings of many classes. For example (this will be discussed in far more detail later), an ADO.NET DataSet is nothing at all like a disconnected ADO RecordSet. Some may consider a learning curve a drawback, but I consider learning curves more like scheduling issues. There’s a learning curve in learning anything new; it’s just up to you to schedule that curve into your time so that you can learn the new technology at a pace that fits your schedule. &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;4.    Explain what a diffgram is and its usage ? &lt;br /&gt; &lt;br /&gt;A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order.&lt;br /&gt;When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram. &lt;br /&gt;The DiffGram format is divided into three sections: the current data, the original (or "before") data, and an errors section, as shown in the following example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;?xml version="1.0"?&gt;&lt;br /&gt;&lt;diffgr:diffgram &lt;br /&gt;         xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&lt;br /&gt;         xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&lt;br /&gt;         xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt;   &lt;DataInstance&gt;&lt;br /&gt;   &lt;/DataInstance&gt;&lt;br /&gt;  &lt;diffgr:before&gt;&lt;br /&gt;  &lt;/diffgr:before&gt;&lt;br /&gt;  &lt;diffgr:errors&gt;&lt;br /&gt;  &lt;/diffgr:errors&gt;&lt;br /&gt;&lt;/diffgr:diffgram&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The DiffGram format consists of the following blocks of data: &lt;br /&gt;&lt;DataInstance&gt; &lt;br /&gt;The name of this element, DataInstance, is used for explanation purposes in this documentation. A DataInstance element represents a DataSet or a row of a DataTable. Instead of DataInstance, the element would contain the name of the DataSet or DataTable. This block of the DiffGram format contains the current data, whether it has been modified or not. An element, or row, that has been modified is identified with the diffgr:hasChanges annotation. &lt;br /&gt;&lt;diffgr:before&gt; &lt;br /&gt;This block of the DiffGram format contains the original version of a row. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation. &lt;br /&gt;&lt;diffgr:errors&gt; &lt;br /&gt;This block of the DiffGram format contains error information for a particular row in the DataInstance block. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Attribute&lt;br /&gt; Description&lt;br /&gt; &lt;br /&gt;diffgr:hasChanges &lt;br /&gt; The row has been modified (see related row in &lt;diffgr:before&gt;) or inserted.&lt;br /&gt; &lt;br /&gt;diffgr:hasErrors &lt;br /&gt; The row has an error (see related row in &lt;diffgr:errors&gt;).&lt;br /&gt; &lt;br /&gt;diffgr:id &lt;br /&gt; Identifies the ID used to couple rows across sections: TableName+RowIdentifier.&lt;br /&gt; &lt;br /&gt;diffgr:parentId &lt;br /&gt; Identifies the ID used to identify the parent of the current row.&lt;br /&gt; &lt;br /&gt;diffgr:error &lt;br /&gt; Contains the error text for the row in &lt;diffgr:errors&gt;.&lt;br /&gt; &lt;br /&gt;msdata:rowOrder &lt;br /&gt; Tracks the ordinal position of the row in the DataSet.&lt;br /&gt; &lt;br /&gt;msdata:hidden &lt;br /&gt; Identifies columns marked as hidden msdata:hiddenColumn=…&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;5.    Can you edit data in the Repeater control?  &lt;br /&gt; &lt;br /&gt;NO. &lt;br /&gt;&lt;br /&gt;6.    Which method do you invoke on the DataAdapter control to load your generated dataset with data?  &lt;br /&gt; &lt;br /&gt;You have to use the Fill method of the DataAdapter control and pass the dataset object as an argument to load the generated data.  &lt;br /&gt;  &lt;br /&gt;7.    Which are the different IsolationLevels ? &lt;br /&gt; &lt;br /&gt;Isolation Level&lt;br /&gt; Description&lt;br /&gt; &lt;br /&gt;ReadCommitted &lt;br /&gt; The default for SQL Server. This level ensures that data written by one transaction will only be accessible in a second transaction after the first transaction commits.&lt;br /&gt; &lt;br /&gt;ReadUncommitted &lt;br /&gt; This permits your transaction to read data within the database, even data that has not yet been committed by another transaction. For example, if two users were accessing the same database, and the first inserted some data without concluding their transaction (by means of a Commit or Rollback), then the second user with their isolation level set to ReadUncommitted could read the data. &lt;br /&gt; &lt;br /&gt;RepeatableRead &lt;br /&gt; This level, which extends the ReadCommitted level, ensures that if the same statement is issued within the transaction, regardless of other poten- tial updates made to the database, the same data will always be returned. This level does require extra locks to be held on the data, which could adversely affect performance. This level guarantees that, for each row in the initial query, no changes can be made to that data. It does, however, permit "phantom" rows to show up — these are completely new rows that another transaction might have inserted while your transaction was running. &lt;br /&gt; &lt;br /&gt;Serializable &lt;br /&gt; This is the most "exclusive" transaction level, which in effect serializes access to data within the database. With this isolation level, phantom rows can never show up, so a SQL statement issued within a serializable transac- tion will always retrieve the same data. The negative performance impact of a Serializable transaction should not be underestimated — if you don't absolutely need to use this level of isolation, stay away from it. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;8.    How xml files and be read and write using dataset?. &lt;br /&gt; &lt;br /&gt;DataSet exposes method like ReadXml and WriteXml to read and write xml  &lt;br /&gt;  &lt;br /&gt;9.    What are the different rowversions available? &lt;br /&gt; &lt;br /&gt;DataRow Version Value&lt;br /&gt; Description&lt;br /&gt; &lt;br /&gt;Current &lt;br /&gt; The value existing at present within the column. If no edit has occurred, this will be the same as the original value. If an edit (or edits) have occurred, the value will be the last valid value entered.&lt;br /&gt; &lt;br /&gt;Default &lt;br /&gt; The default value (in other words, any default set up for the column).&lt;br /&gt; &lt;br /&gt;Original &lt;br /&gt; The value of the column when originally selected from the database. If the DataRow's AcceptChanges method is called, this value will update to the Current value. &lt;br /&gt; &lt;br /&gt;Proposed &lt;br /&gt; When changes are in progress for a row, it is possible to retrieve this modified value. If you call BeginEdit() on the row and make changes, each column will have a proposed value until either EndEdit() or CancelEdit() is called. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;10.    Explain ACID properties?. &lt;br /&gt; &lt;br /&gt;The ACID model is one of the oldest and most important concepts of database theory. It sets forward four goals that every database management system must strive to achieve: atomicity, consistency, isolation and durability. No database that fails to meet any of these four goals can be considered reliable. &lt;br /&gt;&lt;br /&gt;Let’s take a moment to examine each one of these characteristics in detail: &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Atomicity states that database modifications must follow an “all or nothing” rule. Each transaction is said to be “atomic.” If one part of the transaction fails, the entire transaction fails. It is critical that the database management system maintain the atomic nature of transactions in spite of any DBMS, operating system or hardware failure.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Consistency states that only valid data will be written to the database. If, for some reason, a transaction is executed that violates the database’s consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules. On the other hand, if a transaction successfully executes, it will take the database from one state that is consistent with the rules to another state that is also consistent with the rules. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Isolation requires that multiple transactions occurring at the same time not impact each other’s execution. For example, if Joe issues a transaction against a database at the same time that Mary issues a different transaction, both transactions should operate on the database in an isolated manner. The database should either perform Joe’s entire transaction before executing Mary’s or vice-versa. This prevents Joe’s transaction from reading intermediate data produced as a side effect of part of Mary’s transaction that will not eventually be committed to the database. Note that the isolation property does not ensure which transaction will execute first, merely that they will not interfere with each other.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Durability ensures that any transaction committed to the database will not be lost. Durability is ensured through the use of database backups and transaction logs that facilitate the restoration of committed transactions in spite of any subsequent software or hardware failures. &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;11.    Differences Between ADO and ADO.NET &lt;br /&gt; &lt;br /&gt;ADO.NET is an evolution of ADO. The following table lists several data access features and how each feature differs between ADO and ADO.NET.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Feature &lt;br /&gt; ADO &lt;br /&gt; ADO.NET&lt;br /&gt; &lt;br /&gt;Memory-resident data representation&lt;br /&gt; Uses the Recordset object, which holds single rows of data, much like a database table &lt;br /&gt; Uses the DataSet object, which can contain one or more tables represented by DataTable objects &lt;br /&gt; &lt;br /&gt;Relationships between multiple tables &lt;br /&gt; Requires the JOIN query to assemble data from multiple database tables in a single result table. Also offers hierarchical recordsets, but they are hard to use &lt;br /&gt; Supports the DataRelation object to associate rows in one DataTable object with rows in another DataTable object&lt;br /&gt; &lt;br /&gt;Data navigation &lt;br /&gt; Traverses rows in a Recordset sequentially, by using the .MoveNext method &lt;br /&gt; The DataSet uses a navigation paradigm for nonsequential access to rows in a table. Accessing the data is more like accessing data in a collection or array. This is possible because of the Rows collection of the DataTable; it allows you to access rows by index. Follows relationships to navigate from rows in one table to corresponding rows in another table&lt;br /&gt; &lt;br /&gt;Disconnected access &lt;br /&gt; Provided by the Recordset but it has to be explicitly coded for. The default for a Recordset object is to be connected via the ActiveConnection property. You communicate to a database with calls to an OLE DB provider &lt;br /&gt; Communicates to a database with standardized calls to the DataAdapter object, which communicates to an OLE DB data provider, or directly to a SQL Server data provider&lt;br /&gt; &lt;br /&gt;Programmability &lt;br /&gt; All Recordset field data types are COM Variant data types, and usually correspond to field names in a database table &lt;br /&gt; Uses the strongly typed programming characteristic of XML. Data is self-describing because names for code items correspond to the business problem solved by the code. Data in DataSet and DataReader objects can be strongly typed, thus making code easier to read and to write &lt;br /&gt; &lt;br /&gt;Sharing disconnected data between tiers or components &lt;br /&gt; Uses COM marshaling to transmit a disconnected record set. This supports only those data types defined by the COM standard. Requires type conversions, which demand system resources &lt;br /&gt; Transmits a DataSet as XML. The XML format places no restrictions on data types and requires no type conversions&lt;br /&gt; &lt;br /&gt;Transmitting data through firewalls &lt;br /&gt; Problematic, because firewalls are typically configured to prevent system-level requests such as COM marshaling &lt;br /&gt; Supported, because ADO.NET DataSet objects use XML, which can pass through firewalls&lt;br /&gt; &lt;br /&gt;Scalability &lt;br /&gt; Since the defaults in ADO are to use connected Recordset objects, database locks, and active database connections for long durations contend for limited database resources &lt;br /&gt; Disconnected access to database data without retaining database locks or active database connections for lengthy periods limits contention for limited database resources&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;12.    Whate are different types of Commands available with DataAdapter ? &lt;br /&gt; &lt;br /&gt;The SqlDataAdapter has four command objects &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SelectCommand &lt;br /&gt;InsertCommand &lt;br /&gt;DeleteCommand &lt;br /&gt;UpdateCommand &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;13.    What is a Dataset? &lt;br /&gt; &lt;br /&gt;Major component of ADO.NET is the DataSet object, which you can think of as being similar to an in-memory relational database. DataSet objects contain DataTable objects, relationships, and constraints, allowing them to replicate an entire data source, or selected parts of it, in a disconnected fashion.&lt;br /&gt;A DataSet object is always disconnected from the source whose data it contains, and as a consequence it doesn't care where the data comes from—it can be used to manipulate data from a traditional database or an XML document, or anything in between. In order to connect a DataSet to a data source, you need to use a data adapter as an intermediary between the DataSet and the .NET data provider.&lt;br /&gt;&lt;br /&gt;Datasets are the result of bringing together ADO and XML. A dataset contains one or more data of tabular XML, known as DataTables, these data can be treated separately, or can have relationships defined between them. Indeed these relationships give you ADO data SHAPING without needing to master the SHAPE language, which many people are not comfortable with.&lt;br /&gt;The dataset is a disconnected in-memory cache database. The dataset object model looks like this:&lt;br /&gt;Dataset&lt;br /&gt;  DataTableCollection&lt;br /&gt;  DataTable&lt;br /&gt;   DataView&lt;br /&gt;   DataRowCollection&lt;br /&gt;    DataRow&lt;br /&gt;   DataColumnCollection&lt;br /&gt;    DataColumn&lt;br /&gt;   ChildRelations&lt;br /&gt;   ParentRelations&lt;br /&gt;   Constraints&lt;br /&gt;   PrimaryKey&lt;br /&gt;DataRelationCollection&lt;br /&gt;Let’s take a look at each of these:&lt;br /&gt;DataTableCollection: As we say that a DataSet is an in-memory database. So it has this collection, which holds data from multiple tables in a single DataSet object.&lt;br /&gt;DataTable: In the DataTableCollection, we have DataTable objects, which represents the individual tables of the dataset. &lt;br /&gt;DataView: The way we have views in database, same way we can have DataViews. We can use these DataViews to do Sort, filter data.&lt;br /&gt;DataRowCollection: Similar to DataTableCollection, to represent each row in each Table we have DataRowCollection.&lt;br /&gt;DataRow:  To represent each and every row of the DataRowCollection, we have DataRows.&lt;br /&gt;DataColumnCollection: Similar to DataTableCollection, to represent each column in each Table we have DataColumnCollection.&lt;br /&gt;DataColumn: To represent each and every Column of the DataColumnCollection, we have DataColumn.&lt;br /&gt;PrimaryKey: Dataset defines Primary key for the table and the primary key validation will take place without going to the database.&lt;br /&gt;Constraints: We can define various constraints on the Tables, and can use Dataset.Tables(0).enforceConstraints. This will execute all the constraints, whenever we enter data in DataTable.&lt;br /&gt;DataRelationCollection: as we know that we can have more than 1 table in the dataset, we can also define relationship between these tables using this collection and maintain a parent-child relationship.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;14.    How you will set the datarelation between two columns? &lt;br /&gt; &lt;br /&gt;ADO.NET provides DataRelation object to set relation between two columns.It helps to enforce the following constraints,a unique constraint, which guarantees that a column in the table contains no duplicates and a foreign-key constraint,which can be used to maintain referential integrity.A unique constraint is implemented either by simply setting the Unique property of a data column to true, or by adding an instance of the UniqueConstraint class to the DataRelation object's ParentKeyConstraint. As part of the foreign-key constraint, you can specify referential integrity rules that are applied at three points,when a parent record is updated,when a parent record is deleted and when a change is accepted or rejected.  &lt;br /&gt;  &lt;br /&gt;15.    Which method do you invoke on the DataAdapter control to load your generated dataset with data? &lt;br /&gt; &lt;br /&gt;Use the Fill method of the DataAdapter control and pass the dataset object as an argument to load the generated data. &lt;br /&gt;&lt;br /&gt;16.    How do you handle data concurrency in .NET ? &lt;br /&gt; &lt;br /&gt;In general, there are three common ways to manage concurrency in a database: &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Pessimistic concurrency control: A row is unavailable to users from the time the record is fetched until it is updated in the database. &lt;br /&gt;Optimistic concurrency control: A row is unavailable to other users only while the data is actually being updated. The update examines the row in the database and determines whether any changes have been made. Attempting to update a record that has already been changed results in a concurrency violation. &lt;br /&gt;"Last in wins": A row is unavailable to other users only while the data is actually being updated. However, no effort is made to compare updates against the original record; the record is simply written out, potentially overwriting any changes made by other users since you last refreshed the records. &lt;br /&gt;Pessimistic Concurrency&lt;br /&gt;&lt;br /&gt;Pessimistic concurrency is typically used for two reasons. First, in some situations there is high contention for the same records. The cost of placing locks on the data is less than the cost of rolling back changes when concurrency conflicts occur.&lt;br /&gt;Pessimistic concurrency is also useful for situations where it is detrimental for the record to change during the course of a transaction. A good example is an inventory application. Consider a company representative checking inventory for a potential customer. You typically want to lock the record until an order is generated, which would generally flag the item with a status of ordered and remove it from available inventory. If no order is generated, the lock would be released so that other users checking inventory get an accurate count of available inventory.&lt;br /&gt;However, pessimistic concurrency control is not possible in a disconnected architecture. Connections are open only long enough to read the data or to update it, so locks cannot be sustained for long periods. Moreover, an application that holds onto locks for long periods is not scalable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Optimistic Concurrency&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In optimistic concurrency, locks are set and held only while the database is being accessed. The locks prevent other users from attempting to update records at the same instant. The data is always available except for the exact moment that an update is taking place. For more information, see Using Optimistic Concurrency.&lt;br /&gt;When an update is attempted, the original version of a changed row is compared against the existing row in the database. If the two are different, the update fails with a concurrency error. It is up to you at that point to reconcile the two rows, using business logic that you create.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Last in Wins&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With "last in wins," no check of the original data is made and the update is simply written to the database. It is understood that the following scenario can occur: &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;User A fetches a record from the database. &lt;br /&gt;User B fetches the same record from the database, modifies it, and writes the updated record back to the database. &lt;br /&gt;User A modifies the 'old' record and writes it back to the database. &lt;br /&gt;In the above scenario, the changes User B made were never seen by User A. Be sure that this situation is acceptable if you plan to use the "last in wins" approach of concurrency control.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Concurrency Control in ADO.NET and Visual Studio&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ADO.NET and Visual Studio use optimistic concurrency, because the data architecture is based on disconnected data. Therefore, you need to add business logic to resolve issues with optimistic concurrency.&lt;br /&gt;If you choose to use optimistic concurrency, there are two general ways to determine if changes have occurred: the version approach (true version numbers or date-time stamps) and the saving-all-values approach.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Version Number Approach&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the version number approach, the record to be updated must have a column that contains a date-time stamp or version number. The date-time stamp or a version number is saved on the client when the record is read. This value is then made part of the update.&lt;br /&gt;One way to handle concurrency is to update only if value in the WHERE clause matches the value on the record. The SQL representation of this approach is:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;  UPDATE Table1 SET Column1 = @newvalue1, Column2 = @newvalue2 WHERE DateTimeStamp = @origDateTimeStamp &lt;br /&gt;&lt;br /&gt;Alternatively, the comparison can be made using the version number:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  UPDATE Table1 SET Column1 = @newvalue1, Column2 = @newvalue2 WHERE RowVersion = @origRowVersionValue &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If the date-time stamps or version numbers match, the record in the data store has not changed and can be safely updated with the new values from the dataset. An error is returned if they don't match. You can write code to implement this form of concurrency checking in Visual Studio. You will also have to write code to respond to any update conflicts. To keep the date-time stamp or version number accurate, you need to set up a trigger on the table to update it when a change to a row occurs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Saving-All-Values Approach&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;An alternative to using a date-time stamp or version number is to get copies of all the fields when the record is read. The DataSet object in ADO.NET maintains two versions of each modified record: an original version (that was originally read from the data source) and a modified version, representing the user updates. When attempting to write the record back to the data source, the original values in the data row are compared against the record in the data source. If they match, it means that the database record has not changed since it was read. In that case, the changed values from the dataset are successfully written to the database.&lt;br /&gt;Each data adapter command has a parameters collection for each of its four commands (DELETE, INSERT, SELECT, and UPDATE). Each command has parameters for both the original values, as well as the current (or modified) values.&lt;br /&gt;The following example shows the command text for a dataset command that updates a typical Customers table. The command is specified for dynamic SQL and optimistic concurrency.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;  UPDATE Customers SET CustomerID = @currCustomerID, CompanyName = @currCompanyName, ContactName = @currContactName, ContactTitle = currContactTitle, Address = @currAddress, City = @currCity, PostalCode = @currPostalCode, Phone = @currPhone, Fax = @currFax WHERE (CustomerID = @origCustomerID) AND (Address = @origAddress OR @origAddress IS NULL AND Address IS NULL) AND (City = @origCity OR @origCity IS NULL AND City IS NULL) AND (CompanyName = @origCompanyName OR @origCompanyName IS NULL AND CompanyName IS NULL) AND (ContactName = @origContactName OR @origContactName IS NULL AND ContactName IS NULL) AND (ContactTitle = @origContactTitle OR @origContactTitle IS NULL AND ContactTitle IS NULL) AND (Fax = @origFax OR @origFax IS NULL AND Fax IS NULL) AND (Phone = @origPhone OR @origPhone IS NULL AND Phone IS NULL) AND (PostalCode = @origPostalCode OR @origPostalCode IS NULL AND PostalCode IS NULL); SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, PostalCode, Phone, Fax FROM Customers WHERE (CustomerID = @currCustomerID) &lt;br /&gt;&lt;br /&gt;Note that the nine SET statement parameters represent the current values that will be written to the database, whereas the nine WHERE statement parameters represent the original values that are used to locate the original record.&lt;br /&gt;The first nine parameters in the SET statement correspond to the first nine parameters in the parameters collection. These parameters would have their SourceVersion property set to Current. &lt;br /&gt;The next nine parameters in the WHERE statement are used for optimistic concurrency. These placeholders would correspond to the next nine parameters in the parameters collection, and each of these parameters would have their SourceVersion property set to Original.&lt;br /&gt;The SELECT statement is used to refresh the dataset after the update has occurred. It is generated when you set the Refresh the DataSet option in the Advanced SQL Generations Options dialog box.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;17.    What are relation objects in dataset and how &amp; where to use them? &lt;br /&gt; &lt;br /&gt;In a DataSet that contains multiple DataTable objects, you can use DataRelation objects to relate one table to another, to navigate through the tables, and to return child or parent rows from a related table. Adding a DataRelation to a DataSet adds, by default, a UniqueConstraint to the parent table and a ForeignKeyConstraint to the child table.&lt;br /&gt;&lt;br /&gt;The following code example creates a DataRelation using two DataTable objects in a DataSet. Each DataTable contains a column named CustID, which serves as a link between the two DataTable objects. The example adds a single DataRelation to the Relations collection of the DataSet. The first argument in the example specifies the name of the DataRelation being created. The second argument sets the parent DataColumn and the third argument sets the child DataColumn.`&lt;br /&gt;&lt;br /&gt;  custDS.Relations.Add("CustOrders",&lt;br /&gt;custDS.Tables["Customers"].Columns["CustID"],&lt;br /&gt;custDS.Tables["Orders"].Columns["CustID"]);  &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;18.    Difference between OLEDB Provider and SqlClient ? &lt;br /&gt; &lt;br /&gt;SQLClient .NET classes are highly optimized for the .net / sqlserver combination and achieve optimal results. The SqlClient data provider is fast. It's faster than the Oracle provider, and faster than accessing database via the OleDb layer. It's faster because it accesses the native library (which automatically gives you better performance), and it was written with lots of help from the SQL Server team.  &lt;br /&gt;  &lt;br /&gt;19.    What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database? &lt;br /&gt; &lt;br /&gt;Following are different Namespaces:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;System.Data.OleDb - classes that make up the .NET Framework Data Provider for OLE DB-compatible data sources. These classes allow you to connect to an OLE DB data source, execute commands against the source, and read the results. &lt;br /&gt;System.Data.SqlClient - classes that make up the .NET Framework Data Provider for SQL Server, which allows you to connect to SQL Server 7.0, execute commands, and read results. The System.Data.SqlClient namespace is similar to the System.Data.OleDb namespace, but is optimized for access to SQL Server 7.0 and later. &lt;br /&gt;System.Data.Odbc - classes that make up the .NET Framework Data Provider for ODBC. These classes allow you to access ODBC data source in the managed space. &lt;br /&gt;System.Data.OracleClient - classes that make up the .NET Framework Data Provider for Oracle. These classes allow you to access an Oracle data source in the managed space.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;20.    What is Data Reader? &lt;br /&gt; &lt;br /&gt;You can use the ADO.NET DataReader to retrieve a read-only, forward-only stream of data from a database. Using the DataReader can increase application performance and reduce system overhead because only one row at a time is ever in memory.&lt;br /&gt;After creating an instance of the Command object, you create a DataReader by calling Command. ExecuteReader to retrieve rows from a data source, as shown in the following example.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SqlDataReader myReader = myCommand.ExecuteReader();&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;You use the Read method of the DataReader object to obtain a row from the results of the query.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;while (myReader.Read())&lt;br /&gt;Console.WriteLine("\t{0}\t{1}", myReader.GetInt32(0), myReader.GetString(1));&lt;br /&gt;myReader.Close();&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;21.    What is Data Set? &lt;br /&gt; &lt;br /&gt;The DataSet is a memory-resident representation of data that provides a consistent relational programming model regardless of the data source. It can be used with multiple and differing data sources, used with XML data, or used to manage data local to the application. The DataSet represents a complete set of data including related tables, constraints, and relationships among the tables. The methods and objects in a DataSet are consistent with those in the relational database model. The DataSet can also persist and reload its contents as XML and its schema as XML Schema definition language (XSD) schema.  &lt;br /&gt;  &lt;br /&gt;22.    What is Data Adapter? &lt;br /&gt; &lt;br /&gt;The DataAdapter serves as a bridge between a DataSet and a data source for retrieving and saving data. The DataAdapter provides this bridge by mapping Fill, which changes the data in the DataSet to match the data in the data source, and Update, which changes the data in the data source to match the data in the DataSet. If you are connecting to a Microsoft SQL Server database, you can increase overall performance by using the SqlDataAdapter along with its associated SqlCommand and SqlConnection. For other OLE DB-supported databases, use the DataAdapter with its associated OleDbCommand and OleDbConnection objects.  &lt;br /&gt;  &lt;br /&gt;23.    Which method do you invoke on the DataAdapter control to load your generated dataset with data? &lt;br /&gt; &lt;br /&gt;Fill() method is used to load the generated data set with Data.  &lt;br /&gt;  &lt;br /&gt;24.    Explain different methods and Properties of DataReader which you have used in your project?  &lt;br /&gt; &lt;br /&gt;Following are the methods and properties :&lt;br /&gt;&lt;br /&gt;Read&lt;br /&gt;GetString&lt;br /&gt;GetInt32&lt;br /&gt;while (myReader.Read())&lt;br /&gt;Console.WriteLine("\t{0}\t{1}", myReader.GetInt32(0), myReader.GetString(1));&lt;br /&gt;myReader.Close();&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;25.    What happens when we issue Dataset.ReadXml command? &lt;br /&gt; &lt;br /&gt;Reads XML schema and data into the DataSet  &lt;br /&gt;  &lt;br /&gt;26.    What Method checks if a datareader is closed or opened? &lt;br /&gt; &lt;br /&gt;IsClosed() checks whether a datareader is closed or open.  &lt;br /&gt;  &lt;br /&gt;27.    What is method to get XML and schema from Dataset? &lt;br /&gt; &lt;br /&gt;getXML () and get Schema ().  &lt;br /&gt;  &lt;br /&gt;28.    Differences between dataset.clone and dataset.copy? &lt;br /&gt; &lt;br /&gt;The Difference is as follows:&lt;br /&gt;&lt;br /&gt;Clone - Copies the structure of the DataSet, including all DataTable schemas, relations, and constraints. Does not copy any data. &lt;br /&gt;Copy - Copies both the structure and data for this DataSet.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;29.    What are the differences between the Recordset and the DataSet objects?  &lt;br /&gt; &lt;br /&gt;Tables represented by the object: The ADO Recordset object represents only one table at a given time, while the DataSet object in ADO.NET can represent any number of tables, keys, constraints and relations which makes it very much like an RDBMS. &lt;br /&gt;Navigation: Navigating the Recordset object depend on the cursor used to create the object with limited functionality in moving back and forth while the DataSet represents data in “collections” that could be accessed through indexers in a random-access fashion &lt;br /&gt;Connection Model: The Recordset is designed to work as a “connected object” with a server-side cursor in mind while the DataSet is designed to work as a disconnected object containing hierarchy of data in XML format. &lt;br /&gt;Database Updates: Updating a database through the use of a Recordset object is direct since it is tied to the database. On the other hand, the DataSet as an independent data store must use a database-specific DataAdapter object to post updates to the database. &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;30.    Which ADO.Net objects fall under connected database model and disconnected database model? &lt;br /&gt; &lt;br /&gt;The DataReader object falls under connected model and DataSet, DataTable, DataAdapter objects fall under disconnected database model.  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;31.    How to use ImportRow method? &lt;br /&gt; &lt;br /&gt;The ImportRow method of DataTable copies a row into a DataTable with all of the properties and data of the row. It actually calls NewRow method on destination DataTable with current table schema and sets DataRowState to Added. &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;DataTable dt; /// fill the table before you use it &lt;br /&gt;DataTable copyto; &lt;br /&gt;&lt;br /&gt;foreach(DataRow dr in dt.Rows) &lt;br /&gt;{ &lt;br /&gt;copyto.ImportRow(dr); &lt;br /&gt;}  &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;32.    What are the pros and cons of using DataReader object? &lt;br /&gt; &lt;br /&gt;The DataReader object is a forward-only resultset and is faster to traverse as compared to its counterpart DataTable. However it holds an active connection to the database until all records are retrieved from it or closed explicitly. This could be a problem when the resultset holds large number of records and the application has many concurrent users.  &lt;br /&gt;  &lt;br /&gt;33.    What are different execute methods of ADO.NET command object? &lt;br /&gt; &lt;br /&gt;ExecuteScalar method returns a single value from the first row and first column of the resultset obtained from the execution of SQL query.&lt;br /&gt;ExecuteNonQuery method executes the DML SQL query such as insert, delete or update and returns the number of rows affected by this action.&lt;br /&gt;ExecuteReader method returns DataReader object which is a forward-only resultset.&lt;br /&gt;ExecuteXMLReader method is available for SQL Server 2000 or later. Upon execution it builds XMLReader object from standard SQL query.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;34.    What is the difference between data reader and data adapter? &lt;br /&gt; &lt;br /&gt;DateReader is an forward only and read only cursor type if you are accessing data through DataRead it shows the data on the web form/control but you can not perform the paging feature on that record(because it's forward only type).&lt;br /&gt;&lt;br /&gt; Reader is best fit to show the Data (where no need to work on data)&lt;br /&gt;&lt;br /&gt;DataAdapter is not only connect with the Databse(through Command object) it provide four types of command (InsertCommand,  UpdateCommand, DeleteCommand, SelectCommand), It supports to the disconnected Architecture of .NET show we can populate the  records to the DataSet. where as Dataadapter is best fit to work on data.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;35.    Difference between SqlCommand and SqlCommandBuilder? &lt;br /&gt; &lt;br /&gt;SQLCommand is used to retrieve or update the data from database.&lt;br /&gt;&lt;br /&gt;You can use the SELECT / INSERT,UPDATE,DELETE command with SQLCommand. SQLCommand will execute these commnds in the database.&lt;br /&gt;&lt;br /&gt;SQLBUILDER is used to build the SQL Command like SELECT/ INSERTR, UPDATE etc.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;36.    Can you edit data in the Repeater control?  &lt;br /&gt; &lt;br /&gt;NO. &lt;br /&gt;  &lt;br /&gt;37.    What are the different rowversions available? &lt;br /&gt; &lt;br /&gt;There are four types of Rowversions.&lt;br /&gt;Current:&lt;br /&gt;The current values for the row. This row version does not exist for rows with a RowState of Deleted.&lt;br /&gt;Default :&lt;br /&gt;The row the default version for the current DataRowState. For a DataRowState value of Added, Modified or Current, the default version is Current. For a DataRowState of Deleted, the version is Original. For a DataRowState value of Detached, the version is Proposed.&lt;br /&gt;Original:&lt;br /&gt;The row contains its original values.&lt;br /&gt;Proposed:&lt;br /&gt;The proposed values for the row. This row version exists during an edit operation on a row, or for a row that is not part of a DataRowCollection&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;38.    Explain DataSet.AcceptChanges and DataAdapter.Update methods? &lt;br /&gt; &lt;br /&gt;Dataset maintains the rowstate of each row with in a table. as a dataset is loaded its rowstate version is unchanged . whenever there is a modification in a paricular row with in a datatable , dataset changes the rowversion as modified, Added or deleted based on the particular action performed on the particular row.&lt;br /&gt;&lt;br /&gt;AcceptChanges() method again change the Rowversion back to Unchanged.&lt;br /&gt;&lt;br /&gt;Update() method is for updation of any changes made to the dataset in the database. This function checks the rowversion of each row with in a table. If it finds any row with added rowstate then that particular row is inserted else if it is Modified it is upadted if deleted then a delete statement is executed.&lt;br /&gt;&lt;br /&gt;But if Acceptchanges() is done before an update function it wold not update anything to database since rowstate becomes unchanged&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;39.    How you will set the datarelation between two columns? &lt;br /&gt; &lt;br /&gt;ADO.NET provides DataRelation object to set relation between two columns.It helps to enforce the following constraints,a unique constraint, which guarantees that a column in the table contains no duplicates and a foreign-key constraint,which can be used to maintain referential integrity.A unique constraint is implemented either by simply setting the Unique property of a data column to true, or by adding an instance of the UniqueConstraint class to the DataRelation object's ParentKeyConstraint. As part of the foreign-key constraint, you can specify referential integrity rules that are applied at three points,when a parent record is updated,when a parent record is deleted and when a change is accepted or rejected.  &lt;br /&gt;  &lt;br /&gt;40.    What connections does Microsoft SQL Server support?  &lt;br /&gt; &lt;br /&gt;Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords).  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; 41.    Which one is trusted and which one is untrusted?  &lt;br /&gt;  &lt;br /&gt; Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.  &lt;br /&gt;   &lt;br /&gt; 42.    What is Connection pooling? &lt;br /&gt;  &lt;br /&gt; The connection represents an open and unique link to a data source. In a distributed system, this often involves a network connection. Depending on the underlying data source, the programming interface of the various connection objects may differ quite a bit. A connection object is specific to a particular type of data source, such as SQL Server and Oracle. Connection objects can't be used interchangeably across different data sources, but all share a common set of methods and properties grouped in the IDbConnection interface.&lt;br /&gt; In ADO.NET, connection objects are implemented within data providers as sealed classes (that is, they are not further inheritable). This means that the behavior of a connection class can never be modified or overridden, just configured through properties and attributes. In ADO.NET, all connection classes support connection pooling, although each class may implement it differently. Connection pooling is implicit, meaning that you don't need to enable it because the provider manages this automatically.&lt;br /&gt; ADO.NET pools connections with the same connection or configuration (connection string). It can maintain more than one pool (actually, one for each configuration). An interesting note: Connection pooling is utilized (by default) unless otherwise specified. If you close and dispose of all connections, then there will be no pool (since there are no available connections).&lt;br /&gt; While leaving database connections continuously open can be troublesome, it can be advantageous for applications that are in constant communication with a database by negating the need to re-open connections. Some database administrators may frown on the practice since multiple connections (not all of which may be useful) to the database are open. Using connection pooling depends upon available server resources and application requirements (i.e., does it really need it).&lt;br /&gt; &lt;br /&gt; Using connection pooling&lt;br /&gt; &lt;br /&gt; Connection pooling is enabled by default. You may override the default behavior with the pooling setting in the connection string. The following SQL Server connection string does not utilize connection pooling:&lt;br /&gt; Data Source=TestServer;Initial Catalog=Northwind;&lt;br /&gt; User ID=Chester;Password=Tester;Pooling=False;&lt;br /&gt; You can use the same approach with other .NET Data Providers. You may enable it by setting it to True (or eliminating the Pooling variable to use the default behavior). In addition, the default size of the connection pool is 100, but you may override this as well with connection string variables. You may use the following variables to control the minimum and maximum size of the pool as well as transaction support:&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; •          Max Pool Size: The maximum number of connections allowed in the pool. The default value is 100. &lt;br /&gt; •          Min Pool Size: The minimum number of connections allowed in the pool. The default value is zero. &lt;br /&gt; •          Enlist: Signals whether the pooler automatically enlists the connection in the creation thread's current transaction context. The default value is true. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; The following SQL Server connection string uses connection pooling with a minimum size of five and a maximum size of 100:&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; Data Source=TestServer;Initial Catalog=Northwind;&lt;br /&gt; User ID=Chester;Password=Tester;Max Pool Size=50;&lt;br /&gt; Min Pool Size=5;Pooling=True;&lt;br /&gt;  &lt;br /&gt;   &lt;br /&gt; 43.    What are the two fundamental objects in ADO.NET ? &lt;br /&gt;  &lt;br /&gt; Datareader and Dataset are the two fundamental objects in ADO.NET.  &lt;br /&gt;   &lt;br /&gt; 44.    What is the use of connection object ? &lt;br /&gt;  &lt;br /&gt; They are used to connect a data to a Command object.&lt;br /&gt; &lt;br /&gt; An OleDbConnection object is used with an OLE-DB provider &lt;br /&gt; A SqlConnection object uses Tabular Data Services (TDS) with MS SQL Server &lt;br /&gt;  &lt;br /&gt;   &lt;br /&gt; 45.    What are the various objects in Dataset ? &lt;br /&gt;  &lt;br /&gt; Dataset has a collection of DataTable object within the Tables collection. Each DataTable object contains a collection of DataRow objects and a collection of DataColumn objects. There are also collections for the primary keys, constraints, and default values used in this table which is called as constraint collection, and the parent and child relationships between the tables. Finally, there is a DefaultView object for each table. This is used to create a Data View object based on the table, so that the data can be searched, filtered or otherwise manipulated while displaying the data. &lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;46.    How can we force the connection object to close after my datareader is closed ? &lt;br /&gt; &lt;br /&gt;Command method Executereader takes a parameter called as  CommandBehavior where in we can specify saying close connection automatically after the Datareader is close.&lt;br /&gt;pobjDataReader =pobjCommand.ExecuteReader(CommandBehavior.CloseConnection)&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;47.    How can we get only schema using dataReader? &lt;br /&gt; &lt;br /&gt;pobjDataReader = pobjCommand.ExecuteReader(Co-mmandBehavior.SchemaOnly)  &lt;br /&gt;  &lt;br /&gt;48.    Explain how to use stored procedures with ADO.net? &lt;br /&gt; &lt;br /&gt;Using Stored Procedures with a Command&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Stored procedures offer many advantages in data-driven applications. Using stored procedures, database operations can be encapsulated in a single command, optimized for best performance, and enhanced with additional security. While a stored procedure can be called by simply passing the stored procedure name followed by parameter arguments as an SQL statement, using the Parameters collection of the ADO.NET Command object enables you to more explicitly define stored procedure parameters as well as to access output parameters and return values.&lt;br /&gt;To call a stored procedure, set the CommandType of the Command object to StoredProcedure. Once the CommandType is set to StoredProcedure, you can use the Parameters collection to define parameters, as in the following example.&lt;br /&gt;Note   The OdbcCommand requires that you supply the full ODBC CALL syntax when calling a stored procedure.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SqlClient&lt;br /&gt;[Visual Basic]&lt;br /&gt;Dim nwindConn As SqlConnection = New SqlConnection("Data Source=localhost;Integrated Security=SSPI;" &amp; _&lt;br /&gt;                                                   "Initial Catalog=northwind")&lt;br /&gt;&lt;br /&gt;Dim salesCMD As SqlCommand = New SqlCommand("SalesByCategory", nwindConn)&lt;br /&gt;salesCMD.CommandType = CommandType.StoredProcedure&lt;br /&gt;&lt;br /&gt;Dim myParm As SqlParameter = salesCMD.Parameters.Add("@CategoryName", SqlDbType.NVarChar, 15)&lt;br /&gt;myParm.Value = "Beverages"&lt;br /&gt;&lt;br /&gt;nwindConn.Open()&lt;br /&gt;&lt;br /&gt;Dim myReader As SqlDataReader = salesCMD.ExecuteReader()&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", myReader.GetName(0), myReader.GetName(1))&lt;br /&gt;&lt;br /&gt;Do While myReader.Read()&lt;br /&gt;  Console.WriteLine("{0}, ${1}", myReader.GetString(0), myReader.GetDecimal(1))&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;myReader.Close()&lt;br /&gt;nwindConn.Close()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[C#]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SqlConnection nwindConn = new SqlConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=northwind");&lt;br /&gt;&lt;br /&gt;SqlCommand salesCMD = new SqlCommand("SalesByCategory", nwindConn);&lt;br /&gt;salesCMD.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;SqlParameter myParm = salesCMD.Parameters.Add("@CategoryName", SqlDbType.NVarChar, 15);&lt;br /&gt;myParm.Value = "Beverages";&lt;br /&gt;&lt;br /&gt;nwindConn.Open();&lt;br /&gt;&lt;br /&gt;SqlDataReader myReader = salesCMD.ExecuteReader();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", myReader.GetName(0), myReader.GetName(1));&lt;br /&gt;&lt;br /&gt;while (myReader.Read())&lt;br /&gt;{&lt;br /&gt;  Console.WriteLine("{0}, ${1}", myReader.GetString(0), myReader.GetDecimal(1));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;myReader.Close();&lt;br /&gt;nwindConn.Close();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OleDb&lt;br /&gt;[Visual Basic]&lt;br /&gt;Dim nwindConn As OleDbConnection = New OleDbConnection("Provider=SQLOLEDB;Data Source=localhost;Integrated Security=SSPI;" &amp; _&lt;br /&gt;                                                       "Initial Catalog=northwind")&lt;br /&gt;&lt;br /&gt;Dim salesCMD As OleDbCommand = New OleDbCommand("SalesByCategory", nwindConn)&lt;br /&gt;salesCMD.CommandType = CommandType.StoredProcedure&lt;br /&gt;&lt;br /&gt;Dim myParm As OleDbParameter = salesCMD.Parameters.Add("@CategoryName", OleDbType.VarChar, 15)&lt;br /&gt;myParm.Value = "Beverages"&lt;br /&gt;&lt;br /&gt;nwindConn.Open()&lt;br /&gt;&lt;br /&gt;Dim myReader As OleDbDataReader = salesCMD.ExecuteReader()&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", myReader.GetName(0), myReader.GetName(1))&lt;br /&gt;&lt;br /&gt;Do While myReader.Read()&lt;br /&gt;  Console.WriteLine("{0}, ${1}", myReader.GetString(0), myReader.GetDecimal(1))&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;myReader.Close()&lt;br /&gt;nwindConn.Close()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[C#]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OleDbConnection nwindConn = new OleDbConnection("Provider=SQLOLEDB;Data Source=localhost;Integrated Security=SSPI;" +&lt;br /&gt;                                                "Initial Catalog=northwind");&lt;br /&gt;&lt;br /&gt;OleDbCommand salesCMD = new OleDbCommand("SalesByCategory", nwindConn);&lt;br /&gt;salesCMD.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;OleDbParameter myParm = salesCMD.Parameters.Add("@CategoryName", OleDbType.VarChar, 15);&lt;br /&gt;myParm.Value = "Beverages";&lt;br /&gt;&lt;br /&gt;nwindConn.Open();&lt;br /&gt;&lt;br /&gt;OleDbDataReader myReader = salesCMD.ExecuteReader();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("\t{0}, {1}", myReader.GetName(0), myReader.GetName(1));&lt;br /&gt;&lt;br /&gt;while (myReader.Read())&lt;br /&gt;{&lt;br /&gt;  Console.WriteLine("\t{0}, ${1}", myReader.GetString(0), myReader.GetDecimal(1));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;myReader.Close();&lt;br /&gt;nwindConn.Close();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Odbc&lt;br /&gt;[Visual Basic]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim nwindConn As OdbcConnection = New OdbcConnection("Driver={SQL Server};Server=localhost;Trusted_Connection=yes;" &amp; _&lt;br /&gt;                                                       "Database=northwind")&lt;br /&gt;nwindConn.Open()&lt;br /&gt;&lt;br /&gt;Dim salesCMD As OdbcCommand = New OdbcCommand("{ CALL SalesByCategory(?) }", nwindConn)&lt;br /&gt;salesCMD.CommandType = CommandType.StoredProcedure&lt;br /&gt;&lt;br /&gt;Dim myParm As OdbcParameter = salesCMD.Parameters.Add("@CategoryName", OdbcType.VarChar, 15)&lt;br /&gt;myParm.Value = "Beverages"&lt;br /&gt;&lt;br /&gt;Dim myReader As OdbcDataReader = salesCMD.ExecuteReader()&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", myReader.GetName(0), myReader.GetName(1))&lt;br /&gt;&lt;br /&gt;Do While myReader.Read()&lt;br /&gt;  Console.WriteLine("{0}, ${1}", myReader.GetString(0), myReader.GetDecimal(1))&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;myReader.Close()&lt;br /&gt;nwindConn.Close()&lt;br /&gt;[C#]&lt;br /&gt;OdbcConnection nwindConn = new OdbcConnection("Driver={SQL Server};Server=localhost;Trusted_Connection=yes;" +&lt;br /&gt;                                              "Database=northwind");&lt;br /&gt;nwindConn.Open();&lt;br /&gt;&lt;br /&gt;OdbcCommand salesCMD = new OdbcCommand("{ CALL SalesByCategory(?) }", nwindConn);&lt;br /&gt;salesCMD.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;OdbcParameter myParm = salesCMD.Parameters.Add("@CategoryName", OdbcType.VarChar, 15);&lt;br /&gt;myParm.Value = "Beverages";&lt;br /&gt;&lt;br /&gt;OdbcDataReader myReader = salesCMD.ExecuteReader();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("\t{0}, {1}", myReader.GetName(0), myReader.GetName(1));&lt;br /&gt;&lt;br /&gt;while (myReader.Read())&lt;br /&gt;{&lt;br /&gt;  Console.WriteLine("\t{0}, ${1}", myReader.GetString(0), myReader.GetDecimal(1));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;myReader.Close();&lt;br /&gt;nwindConn.Close();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A Parameter object can be created using the Parameter constructor, or by calling the Add method of the Parameters collection of a Command. Parameters.Add will take as input either constructor arguments or an existing Parameter object. When setting the Value of a Parameter to a null reference, use DBNull.Value.&lt;br /&gt;For parameters other than Input parameters, you must set the ParameterDirection property to specify whether the parameter type is InputOutput, Output, or ReturnValue. The following example shows the difference between creating Input, Output, and ReturnValue parameters.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Visual Basic]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim sampleCMD As SqlCommand = New SqlCommand("SampleProc", nwindConn)&lt;br /&gt;sampleCMD.CommandType = CommandType.StoredProcedure&lt;br /&gt;&lt;br /&gt;Dim sampParm As SqlParameter = sampleCMD.Parameters.Add("RETURN_VALUE", SqlDbType.Int)&lt;br /&gt;sampParm.Direction = ParameterDirection.ReturnValue&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@InputParm", SqlDbType.NVarChar, 12)&lt;br /&gt;sampParm.Value = "Sample Value"&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@OutputParm", SqlDbType.NVarChar, 28)&lt;br /&gt;sampParm.Direction = ParameterDirection.Output&lt;br /&gt;&lt;br /&gt;nwindConn.Open()&lt;br /&gt;&lt;br /&gt;Dim sampReader As SqlDataReader = sampleCMD.ExecuteReader()&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", sampReader.GetName(0), sampReader.GetName(1))&lt;br /&gt;&lt;br /&gt;Do While sampReader.Read()&lt;br /&gt;  Console.WriteLine("{0}, {1}", sampReader.GetInt32(0), sampReader.GetString(1))&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;sampReader.Close()&lt;br /&gt;nwindConn.Close()&lt;br /&gt;&lt;br /&gt;Console.WriteLine(" @OutputParm: {0}", sampleCMD.Parameters("@OutputParm").Value)&lt;br /&gt;Console.WriteLine("RETURN_VALUE: {0}", sampleCMD.Parameters("RETURN_VALUE").Value)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[C#]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SqlCommand sampleCMD = new SqlCommand("SampleProc", nwindConn);&lt;br /&gt;sampleCMD.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;SqlParameter sampParm = sampleCMD.Parameters.Add("RETURN_VALUE", SqlDbType.Int);&lt;br /&gt;sampParm.Direction = ParameterDirection.ReturnValue;&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@InputParm", SqlDbType.NVarChar, 12);&lt;br /&gt;sampParm.Value = "Sample Value";&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@OutputParm", SqlDbType.NVarChar, 28);&lt;br /&gt;sampParm.Direction = ParameterDirection.Output;&lt;br /&gt;&lt;br /&gt;nwindConn.Open();&lt;br /&gt;&lt;br /&gt;SqlDataReader sampReader = sampleCMD.ExecuteReader();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", sampReader.GetName(0), sampReader.GetName(1));&lt;br /&gt;&lt;br /&gt;while (sampReader.Read())&lt;br /&gt;{&lt;br /&gt;  Console.WriteLine("{0}, {1}", sampReader.GetInt32(0), sampReader.GetString(1));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sampReader.Close();&lt;br /&gt;nwindConn.Close();&lt;br /&gt;&lt;br /&gt;Console.WriteLine(" @OutputParm: {0}", sampleCMD.Parameters["@OutputParm"].Value);&lt;br /&gt;Console.WriteLine("RETURN_VALUE: {0}", sampleCMD.Parameters["RETURN_VALUE"].Value);&lt;br /&gt;OleDb&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Visual Basic]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim sampleCMD As OleDbCommand = New OleDbCommand("SampleProc", nwindConn)&lt;br /&gt;sampleCMD.CommandType = CommandType.StoredProcedure&lt;br /&gt;&lt;br /&gt;Dim sampParm As OleDbParameter = sampleCMD.Parameters.Add("RETURN_VALUE", OleDbType.Integer)&lt;br /&gt;sampParm.Direction = ParameterDirection.ReturnValue&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@InputParm", OleDbType.VarChar, 12)&lt;br /&gt;sampParm.Value = "Sample Value"&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@OutputParm", OleDbType.VarChar, 28)&lt;br /&gt;sampParm.Direction = ParameterDirection.Output&lt;br /&gt;&lt;br /&gt;nwindConn.Open()&lt;br /&gt;&lt;br /&gt;Dim sampReader As OleDbDataReader = sampleCMD.ExecuteReader()&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", sampReader.GetName(0), sampReader.GetName(1))&lt;br /&gt;&lt;br /&gt;Do While sampReader.Read()&lt;br /&gt;  Console.WriteLine("{0}, {1}", sampReader.GetInt32(0), sampReader.GetString(1))&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;sampReader.Close()&lt;br /&gt;nwindConn.Close()&lt;br /&gt;&lt;br /&gt;Console.WriteLine(" @OutputParm: {0}", sampleCMD.Parameters("@OutputParm").Value)&lt;br /&gt;Console.WriteLine("RETURN_VALUE: {0}", sampleCMD.Parameters("RETURN_VALUE").Value)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[C#]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OleDbCommand sampleCMD = new OleDbCommand("SampleProc", nwindConn);&lt;br /&gt;sampleCMD.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;OleDbParameter sampParm = sampleCMD.Parameters.Add("RETURN_VALUE", OleDbType.Integer);&lt;br /&gt;sampParm.Direction = ParameterDirection.ReturnValue;&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@InputParm", OleDbType.VarChar, 12);&lt;br /&gt;sampParm.Value = "Sample Value";&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@OutputParm", OleDbType.VarChar, 28);&lt;br /&gt;sampParm.Direction = ParameterDirection.Output;&lt;br /&gt;&lt;br /&gt;nwindConn.Open();&lt;br /&gt;&lt;br /&gt;OleDbDataReader sampReader = sampleCMD.ExecuteReader();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", sampReader.GetName(0), sampReader.GetName(1));&lt;br /&gt;&lt;br /&gt;while (sampReader.Read())&lt;br /&gt;{&lt;br /&gt;  Console.WriteLine("{0}, {1}", sampReader.GetInt32(0), sampReader.GetString(1));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sampReader.Close();&lt;br /&gt;nwindConn.Close();&lt;br /&gt;&lt;br /&gt;Console.WriteLine(" @OutputParm: {0}", sampleCMD.Parameters["@OutputParm"].Value);&lt;br /&gt;Console.WriteLine("RETURN_VALUE: {0}", sampleCMD.Parameters["RETURN_VALUE"].Value);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Odbc&lt;br /&gt;[Visual Basic]&lt;br /&gt;Dim sampleCMD As OdbcCommand = New OdbcCommand("{ ? = CALL SampleProc(?, ?) }", nwindConn)&lt;br /&gt;sampleCMD.CommandType = CommandType.StoredProcedure&lt;br /&gt;&lt;br /&gt;Dim sampParm As OdbcParameter = sampleCMD.Parameters.Add("RETURN_VALUE", OdbcType.Int)&lt;br /&gt;sampParm.Direction = ParameterDirection.ReturnValue&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@InputParm", OdbcType.VarChar, 12)&lt;br /&gt;sampParm.Value = "Sample Value"&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@OutputParm", OdbcType.VarChar, 28)&lt;br /&gt;sampParm.Direction = ParameterDirection.Output&lt;br /&gt;&lt;br /&gt;nwindConn.Open()&lt;br /&gt;&lt;br /&gt;Dim sampReader As OdbcDataReader = sampleCMD.ExecuteReader()&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", sampReader.GetName(0), sampReader.GetName(1))&lt;br /&gt;&lt;br /&gt;Do While sampReader.Read()&lt;br /&gt;  Console.WriteLine("{0}, {1}", sampReader.GetInt32(0), sampReader.GetString(1))&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;sampReader.Close()&lt;br /&gt;nwindConn.Close()&lt;br /&gt;&lt;br /&gt;Console.WriteLine(" @OutputParm: {0}", sampleCMD.Parameters("@OutputParm").Value)&lt;br /&gt;Console.WriteLine("RETURN_VALUE: {0}", sampleCMD.Parameters("RETURN_VALUE").Value)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[C#]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OdbcCommand sampleCMD = new OdbcCommand("{ ? = CALL SampleProc(?, ?) }", nwindConn);&lt;br /&gt;sampleCMD.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;OdbcParameter sampParm = sampleCMD.Parameters.Add("RETURN_VALUE", OdbcType.Int);&lt;br /&gt;sampParm.Direction = ParameterDirection.ReturnValue;&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@InputParm", OdbcType.VarChar, 12);&lt;br /&gt;sampParm.Value = "Sample Value";&lt;br /&gt;&lt;br /&gt;sampParm = sampleCMD.Parameters.Add("@OutputParm", OdbcType.VarChar, 28);&lt;br /&gt;sampParm.Direction = ParameterDirection.Output;&lt;br /&gt;&lt;br /&gt;nwindConn.Open();&lt;br /&gt;&lt;br /&gt;OdbcDataReader sampReader = sampleCMD.ExecuteReader();&lt;br /&gt;&lt;br /&gt;Console.WriteLine("{0}, {1}", sampReader.GetName(0), sampReader.GetName(1));&lt;br /&gt;&lt;br /&gt;while (sampReader.Read())&lt;br /&gt;{&lt;br /&gt;  Console.WriteLine("{0}, {1}", sampReader.GetInt32(0), sampReader.GetString(1));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sampReader.Close();&lt;br /&gt;nwindConn.Close();&lt;br /&gt;&lt;br /&gt;Console.WriteLine(" @OutputParm: {0}", sampleCMD.Parameters["@OutputParm"].Value);&lt;br /&gt;Console.WriteLine("RETURN_VALUE: {0}", sampleCMD.Parameters["RETURN_VALUE"].Value);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using Parameters with a SqlCommand&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When using parameters with a SqlCommand, the names of the parameters added to the Parameters collection must match the names of the parameter markers in your stored procedure. The .NET Framework Data Provider for SQL Server treats parameters in the stored procedure as named parameters and searches for the matching parameter markers.&lt;br /&gt;The .NET Framework Data Provider for SQL Server does not support the question mark (?) placeholder for passing parameters to an SQL statement or a stored procedure. In this case, you must use named parameters, as in the following example.&lt;br /&gt;SELECT * FROM Customers WHERE CustomerID = @CustomerID&lt;br /&gt;Using Parameters with an OleDbCommand or OdbcCommand&lt;br /&gt;When using parameters with an OleDbCommand or OdbcCommand, the order of the parameters added to the Parameters collection must match the order of the parameters defined in your stored procedure. The .NET Framework Data Provider for OLE DB and .NET Framework Data Provider for ODBC treat parameters in a stored procedure as placeholders and applies parameter values in order. In addition, return value parameters must be the first parameters added to the Parameters collection.&lt;br /&gt;The .NET Framework Data Provider for OLE DB and .NET Framework Data Provider for ODBC do not support named parameters for passing parameters to an SQL statement or a stored procedure. In this case, you must use the question mark (?) placeholder, as in the following example.&lt;br /&gt;SELECT * FROM Customers WHERE CustomerID = ?&lt;br /&gt;As a result, the order in which Parameter objects are added to the Parameters collection must directly correspond to the position of the question mark placeholder for the parameter.&lt;br /&gt;Deriving Parameter Information&lt;br /&gt;Parameters can also be derived from a stored procedure using the CommandBuilder class. Both the SqlCommandBuilder and OleDbCommandBuilder classes provide a static method, DeriveParameters, which will automatically populate the Parameters collection of a Command object with parameter information from a stored procedure. Note that DeriveParameters will overwrite any existing parameter information for the Command.&lt;br /&gt;Deriving parameter information does require an added trip to the data source for the information. If parameter information is known at design-time, you can improve the performance of your application by setting the parameters explicitly.&lt;br /&gt;The following code example shows how to populate the Parameters collection of a Command object using CommandBuilder.DeriveParameters.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[Visual Basic]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim nwindConn As SqlConnection = New SqlConnection("Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;")&lt;br /&gt;Dim salesCMD As SqlCommand = New SqlCommand("Sales By Year", nwindConn)&lt;br /&gt;salesCMD.CommandType = CommandType.StoredProcedure&lt;br /&gt;&lt;br /&gt;nwindConn.Open()&lt;br /&gt;SqlCommandBuilder.DeriveParameters(salesCMD)&lt;br /&gt;nwindConn.Close()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[C#]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SqlConnection nwindConn = new SqlConnection("Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;");&lt;br /&gt;SqlCommand salesCMD = new SqlCommand("Sales By Year", nwindConn);&lt;br /&gt;salesCMD.CommandType = CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;nwindConn.Open();&lt;br /&gt;SqlCommandBuilder.DeriveParameters(salesCMD);&lt;br /&gt;nwindConn.Close();&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;49.    How can we fine tune the command object when we are expecting a single row or a single value ? &lt;br /&gt; &lt;br /&gt;CommandBehaviour enumeration provides two values SingleResult and SingleRow.If you are expecting a single value then pass "CommandBehaviour.SingleResult" and the query is optimized accordingly, if you are expecting single row then pass "CommandBehaviour.SingleRow" and query is optimized according to single row.  &lt;br /&gt;  &lt;br /&gt;50.   How can you Obtaining Data as XML from SQL Server? &lt;br /&gt; &lt;br /&gt;[Visual Basic]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim custCMD As SqlCommand = New SqlCommand("SELECT * FROM Customers FOR XML AUTO, ELEMENTS", nwindConn)&lt;br /&gt; Dim myXR As System.Xml.XmlReader = custCMD.ExecuteXmlReader()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[C#]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SqlCommand custCMD = new SqlCommand("SELECT * FROM Customers FOR XML AUTO, ELEMENTS", nwindConn);&lt;br /&gt; System.Xml.XmlReader myXR = custCMD.ExecuteXmlReader();&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; 51.   How to add Existing Constraints to a DataSet? &lt;br /&gt;  &lt;br /&gt; The Fill method of the DataAdapter fills a DataSet only with table columns and rows from a data source; though constraints are commonly set by the data source, the Fill method does not add this schema information to the DataSet by default. To populate a DataSet with existing primary key constraint information from a data source, you can either call the FillSchema method of the DataAdapter, or set the MissingSchemaAction property of the DataAdapter to AddWithKey before calling Fill. This will ensure that primary key constraints in the DataSet reflect those at the data source. Foreign key constraint information is not included and will need to be created explicitly&lt;br /&gt; &lt;br /&gt; Adding schema information to a DataSet before filling it with data ensures that primary key constraints are included with the DataTable objects in the DataSet. As a result, when additional calls to Fill the DataSet are made, the primary key column information is used to match new rows from the data source with current rows in each DataTable, and current data in the tables is overwritten with data from the data source. Without the schema information, the new rows from the data source are appended to the DataSet, resulting in duplicate rows.&lt;br /&gt; &lt;br /&gt; Using FillSchema or setting the MissingSchemaAction to AddWithKey requires extra processing at the data source to determine primary key column information. This additional processing can hinder performance. If you know the primary key information at design-time, it is recommended that you specify the primary key column or columns explicitly in order to achieve optimal performance. For information about explicitly setting primary key information for a table&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; [Visual Basic]&lt;br /&gt; Dim custDS As DataSet = New DataSet()&lt;br /&gt; &lt;br /&gt; custDA.FillSchema(custDS, SchemaType.Source, "Customers")&lt;br /&gt; custDA.Fill(custDS, "Customers")&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; [C#]&lt;br /&gt; DataSet custDS = new DataSet();&lt;br /&gt; &lt;br /&gt; custDA.FillSchema(custDS, SchemaType.Source, "Customers");&lt;br /&gt; custDA.Fill(custDS, "Customers");&lt;br /&gt; &lt;br /&gt;  [Visual Basic]&lt;br /&gt; Dim custDS As DataSet = New DataSet()&lt;br /&gt; &lt;br /&gt; custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey&lt;br /&gt; custDA.Fill(custDS, "Customers")&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; [C#]&lt;br /&gt; DataSet custDS = new DataSet();&lt;br /&gt; &lt;br /&gt; custDA.MissingSchemaAction = MissingSchemaAction.AddWithKey;&lt;br /&gt; custDA.Fill(custDS, "Customers");&lt;br /&gt;  &lt;br /&gt;   &lt;br /&gt; 52.    How to add relation between tables? &lt;br /&gt;  &lt;br /&gt; In a DataSet that contains multiple DataTable objects, you can use DataRelation objects to relate one table to another, to navigate through the tables, and to return child or parent rows from a related table.&lt;br /&gt; Adding a DataRelation to a DataSet adds, by default, a UniqueConstraint to the parent table and a ForeignKeyConstraint to the child table. For more information about these default constraints&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; [Visual Basic]&lt;br /&gt; custDS.Relations.Add("CustOrders", _&lt;br /&gt;                      custDS.Tables("Customers").Columns("CustID"), _&lt;br /&gt;                      custDS.Tables("Orders").Columns("CustID"))&lt;br /&gt; &lt;br /&gt; [C#]&lt;br /&gt; custDS.Relations.Add("CustOrders",&lt;br /&gt;                      custDS.Tables["Customers"].Columns["CustID"],&lt;br /&gt;                      custDS.Tables["Orders"].Columns["CustID"]);&lt;br /&gt;  &lt;br /&gt;   &lt;br /&gt; 53.    How to get the data changes in dataset? &lt;br /&gt;  &lt;br /&gt; GetChanges : Gets a copy of the DataSet containing all changes made to it since it was last loaded, or since AcceptChanges was called.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; [Visual Basic] &lt;br /&gt; Private Sub UpdateDataSet(ByVal myDataSet As DataSet)&lt;br /&gt;    ' Check for changes with the HasChanges method first.&lt;br /&gt;    If Not myDataSet.HasChanges(DataRowState.Modified) Then Exit Sub&lt;br /&gt;    ' Create temporary DataSet variable.&lt;br /&gt;    Dim xDataSet As DataSet&lt;br /&gt;    ' GetChanges for modified rows only.&lt;br /&gt;    xDataSet = myDataSet.GetChanges(DataRowState.Modified)&lt;br /&gt;    ' Check the DataSet for errors.&lt;br /&gt;    If xDataSet.HasErrors Then&lt;br /&gt;       ' Insert code to resolve errors.&lt;br /&gt;    End If&lt;br /&gt;    ' After fixing errors, update the data source with the DataAdapter &lt;br /&gt;    ' used to create the DataSet.&lt;br /&gt;    myOleDbDataAdapter.Update(xDataSet)&lt;br /&gt; End Sub&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; [C#] &lt;br /&gt; private void UpdateDataSet(DataSet myDataSet){&lt;br /&gt;    // Check for changes with the HasChanges method first.&lt;br /&gt;    if(!myDataSet.HasChanges(DataRowState.Modified)) return;&lt;br /&gt;    // Create temp &lt;br /&gt;  &lt;br /&gt;   &lt;br /&gt; 54.    What are the various methods provided by the dataset object to generate XML? &lt;br /&gt;  &lt;br /&gt; ReadXML : Read's a XML document in to Dataset. &lt;br /&gt; GetXML : This is function's which return's a string containing XML document. &lt;br /&gt; WriteXML : This write's a XML data to disk. &lt;br /&gt;  &lt;br /&gt;   &lt;br /&gt; 55.    What is Dataview and what’s the use of Dataview? &lt;br /&gt;  &lt;br /&gt; Represents a databindable, customized view of a DataTable for sorting, filtering, searching, editing, and navigation. A major function of the DataView is to allow data binding on both Windows Forms and Web Forms.&lt;br /&gt; &lt;br /&gt; Dataview has 4 main method's :-&lt;br /&gt; Find&lt;br /&gt; Take's a array of value's and return's the index of the row.&lt;br /&gt; FindRow&lt;br /&gt; This also takes array of values but returns a collection of "DataRow".&lt;br /&gt; If we want to manipulate data of "DataTable" object create "DataView" (Using the "DefaultView" we can create "DataView" object) of the "DataTable" object, and use the following functionalities:-&lt;br /&gt; AddNew&lt;br /&gt; Add's a new row to the "DataView" object.&lt;br /&gt; Delete&lt;br /&gt; Deletes the specified row from "DataView" object.&lt;br /&gt; &lt;br /&gt; Additionally, a DataView can be customized to present a subset of data from the DataTable. This capability allows you to have two controls bound to the same DataTable, but showing different versions of the data. For example, one control may be bound to a DataView showing all of the rows in the table, while a second may be configured to display only the rows that have been deleted from the DataTable. The DataTable also has a DefaultView property which returns the default DataView for the table. For example, if you wish to create a custom view on the table, set the RowFilter on the DataView returned by the DefaultView.&lt;br /&gt; &lt;br /&gt; To create a filtered and sorted view of data, set the RowFilter and Sort properties. Then use the Item property to return a single DataRowView.&lt;br /&gt; &lt;br /&gt; You can also add and delete from the set of rows using the AddNew and Delete methods. When you use those methods, the RowStateFilter property can set to specify that only deleted rows or new rows be displayed by the DataView.&lt;br /&gt;  &lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;56.    What is CommandBuilder? &lt;br /&gt; &lt;br /&gt;What the CommandBuilder can do is relieve you of the responsibility of writing your own action queries by automatically constructing the SQL code, ADO.NET Command objects, and their associated Parameters collections given a SelectCommand.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The CommandBuilder expects you to provide a viable, executable, and simple SelectCommand associated with a DataAdapter. It also expects a viable Connection. That's because the CommandBuilder opens the Connection associated with the DataAdapter and makes a round trip to the server each and every time it's asked to construct the action queries. It closes the Connection when it's done. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Dim cn As SqlConnection&lt;br /&gt;Dim da As SqlDataAdapter&lt;br /&gt;Dim cb As SqlCommandBuilder&lt;br /&gt;cn = New SqlConnection("data source=demoserver…")&lt;br /&gt;da = New SqlDataAdapter("SELECT Au_ID, au_lname, City FROM authors", cn)&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;57.    what’s the difference between optimistic locking and pessimistic locking? &lt;br /&gt; &lt;br /&gt;In pessimistic locking when user wants to update data it locks the record and till then no one can update data. Other user's can only view the data when there is pessimistic locking.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In optimistic locking multiple user's can open the same record for updating, thus increase maximum concurrency. Record is only locked when updating the record. This is the most preferred way of locking practically. Now a days browser based application are very common and having pessimistic locking is not a practical solution. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The basic difference between Optimistic and Pessimistic locking is the time at which the lock on a  row or page occurs. A Pessimistic lock is enforced when the row is being edited while an Optimistic lock occurs at the time the row is being updated. Obviously the time between an Edit and Update can be very short, but Pessimistic locking will allow the database provider to prevent a user from overwriting changes to a row by another user that occurred while he was updating it. There is no&lt;br /&gt;provision for this under Optimistic locking and the last user to perform the update wins.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;58.    How to implement pessimistic locking? &lt;br /&gt; &lt;br /&gt;The basics steps for pessimistic locking are as follows:&lt;br /&gt;&lt;br /&gt;Create a transaction with an IsolationLevel of RepeatableRead. &lt;br /&gt;Set the DataAdapter’s SelectCommand property to use the transaction you created. &lt;br /&gt;Make the changes to the data. &lt;br /&gt;Set DataAdapter’s Insert, Update, and Delete command properties to use the transaction you created. &lt;br /&gt;Call the DataAdapter’s Update method. &lt;br /&gt;Commit the transaction. &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;59.    How to use transactions in ADO.net? &lt;br /&gt; &lt;br /&gt;Transactions are a feature offered by most enterprise-class databases for making sure data integrity is maintained when data is modified. A transaction at its most basic level consists of two required steps—Begin, and then either Commit or Rollback. The Begin call defines the start of the transaction boundary, and the call to either Commit or Rollback defines the end of it. Within the transaction boundary, all of the statements executed are considered to be part of a unit for accomplishing the given task, and must succeed or fail as one. Commit (as the name suggests) commits the data modifications if everything was successful, and Rollback undoes the data modifications if an error occurs. All of the .NET data providers provide similar classes and methods to accomplish these operations.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The ADO.NET data providers offer transaction functionality through the Connection, Command, and Transaction classes. A typical transaction would follow a process similar to this: &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Open the transaction using Connection.BeginTransaction(). &lt;br /&gt;Enlist statements or stored procedure calls in the transaction by setting the Command.Transaction property of the Command objects associated with them. &lt;br /&gt;Depending on the provider, optionally use Transaction.Save() or Transaction.Begin() to create a savepoint or a nested transaction to enable a partial rollback. &lt;br /&gt;Commit or roll back the transaction using Transaction.Commit() or Transaction.Rollback(). &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Drawing;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Windows.Forms;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;using System.Data.SqlTypes;&lt;br /&gt;&lt;br /&gt;…public void SPTransaction(int partID, int numberMoved, int siteID)&lt;br /&gt;{&lt;br /&gt;   // Create and open the connection.&lt;br /&gt;   SqlConnection conn = new SqlConnection();&lt;br /&gt;   string connString = "Server=SqlInstance;Database=Test;"&lt;br /&gt;      + "Integrated Security=SSPI";&lt;br /&gt;   conn.ConnectionString = connString;&lt;br /&gt;   conn.Open();&lt;br /&gt;&lt;br /&gt;   // Create the commands and related parameters.&lt;br /&gt;   // cmdDebit debits inventory from the WarehouseInventory &lt;br /&gt;   // table by calling the DebitWarehouseInventory &lt;br /&gt;   // stored procedure.&lt;br /&gt;   SqlCommand cmdDebit = &lt;br /&gt;      new SqlCommand("DebitWarehouseInventory", conn);&lt;br /&gt;   cmdDebit.CommandType = CommandType.StoredProcedure;&lt;br /&gt;   cmdDebit.Parameters.Add("@PartID", SqlDbType.Int, 0, "PartID");&lt;br /&gt;   cmdDebit.Parameters["@PartID"].Direction = &lt;br /&gt;      ParameterDirection.Input;&lt;br /&gt;   cmdDebit.Parameters.Add("@Debit", SqlDbType.Int, 0, "Quantity");&lt;br /&gt;   cmdDebit.Parameters["@Debit"].Direction = &lt;br /&gt;ParameterDirection.Input;&lt;br /&gt;&lt;br /&gt;   // cmdCredit adds inventory to the SiteInventory &lt;br /&gt;   // table by calling the CreditSiteInventory &lt;br /&gt;   // stored procedure.&lt;br /&gt;   SqlCommand cmdCredit = &lt;br /&gt;new SqlCommand("CreditSiteInventory", conn);&lt;br /&gt;   cmdCredit.CommandType = CommandType.StoredProcedure;&lt;br /&gt;   cmdCredit.Parameters.Add("@PartID", SqlDbType.Int, 0, "PartID");&lt;br /&gt;   cmdCredit.Parameters["@PartID"].Direction = &lt;br /&gt;ParameterDirection.Input;&lt;br /&gt;   cmdCredit.Parameters.Add&lt;br /&gt;("@Credit", SqlDbType.Int, 0, "Quantity");&lt;br /&gt;   cmdCredit.Parameters["@Credit"].Direction = &lt;br /&gt;ParameterDirection.Input;&lt;br /&gt;   cmdCredit.Parameters.Add("@SiteID", SqlDbType.Int, 0, "SiteID");&lt;br /&gt;   cmdCredit.Parameters["@SiteID"].Direction = &lt;br /&gt;ParameterDirection.Input;&lt;br /&gt;&lt;br /&gt;   // Begin the transaction and enlist the commands.&lt;br /&gt;   SqlTransaction tran = conn.BeginTransaction();&lt;br /&gt;   cmdDebit.Transaction = tran;&lt;br /&gt;   cmdCredit.Transaction  = tran;&lt;br /&gt;&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;      // Execute the commands.&lt;br /&gt;      cmdDebit.Parameters["@PartID"].Value = partID;&lt;br /&gt;      cmdDebit.Parameters["@Debit"].Value = numberMoved;&lt;br /&gt;      cmdDebit.ExecuteNonQuery();&lt;br /&gt;&lt;br /&gt;      cmdCredit.Parameters["@PartID"].Value = partID;&lt;br /&gt;      cmdCredit.Parameters["@Credit"].Value = numberMoved;&lt;br /&gt;      cmdCredit.Parameters["@SiteID"].Value = siteID;&lt;br /&gt;      cmdCredit.ExecuteNonQuery();&lt;br /&gt;&lt;br /&gt;      // Commit the transaction.&lt;br /&gt;      tran.Commit();&lt;br /&gt;   }&lt;br /&gt;   catch(SqlException ex)&lt;br /&gt;   {&lt;br /&gt;      // Roll back the transaction.&lt;br /&gt;      tran.Rollback();&lt;br /&gt;&lt;br /&gt;      // Additional error handling if needed.&lt;br /&gt;   }&lt;br /&gt;   finally&lt;br /&gt;   {&lt;br /&gt;      // Close the connection.&lt;br /&gt;conn.Close();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;60.    Whats the difference between Dataset.clone and Dataset.copy ? &lt;br /&gt; &lt;br /&gt;The Clone method of the DataSet class copies only the schema of a DataSet object. It returns a new DataSet object that has the same schema as the existing DataSet object, including all DataTable schemas, relations, and constraints. It does not copy any data from the existing DataSet object into the new DataSet. &lt;br /&gt;&lt;br /&gt;The Copy method of the DataSet class copies both the structure and data of a DataSet object. It returns a new DataSet object having the same structure (including all DataTable schemas, relations, and constraints) and data as the existing DataSet object.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;61.    Difference between OLEDB Provider and SqlClient ?  &lt;br /&gt; &lt;br /&gt;SQLClient .NET classes are highly optimized for the .net / sqlserver combination and achieve optimal results. The SqlClient data provider is fast. It's faster than the Oracle provider, and faster than accessing database via the OleDb layer. It's faster because it accesses the native library (which automatically gives you better performance), and it was written with lots of help from the SQL Server team.  &lt;br /&gt;  &lt;br /&gt;62.    What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?  &lt;br /&gt; &lt;br /&gt;System.Data.OleDb – classes that make up the .NET Framework Data Provider for OLE DB-compatible data sources. These classes  allow you to connect to an OLE DB data source, execute commands against the source, and read the results. &lt;br /&gt;System.Data.SqlClient – classes that make up the .NET Framework Data Provider for SQL Server, which allows you to connect to SQL Server 7.0, execute commands, and read results. The System.Data.SqlClient namespace is similar to the System.Data.OleDb namespace, but is optimized for access to SQL Server 7.0 and later. &lt;br /&gt;System.Data.Odbc - classes that make up the .NET Framework Data Provider for ODBC. These classes allow you to access ODBC data source in the managed space. &lt;br /&gt;System.Data.OracleClient - classes that make up the .NET Framework Data Provider for Oracle. These classes allow you to access an Oracle data source in the managed space. &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;63.    How to check if a datareader is closed or opened? &lt;br /&gt; &lt;br /&gt;IsClosed()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-3128497135260268999?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/3128497135260268999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/adonet-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3128497135260268999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3128497135260268999'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/adonet-interview-questions.html' title='ADO.Net Interview Questions'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-5214436758176690237</id><published>2009-10-20T23:52:00.000-07:00</published><updated>2009-10-20T23:53:36.408-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Framework Interview Questions'/><title type='text'>.Net Framework Interview Questions</title><content type='html'>1.   When was .NET announced? &lt;br /&gt;&lt;br /&gt;Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET. &lt;br /&gt; &lt;br /&gt;2.    When was the first version of .NET released?&lt;br /&gt;&lt;br /&gt;The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on 15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers. &lt;br /&gt; &lt;br /&gt;3.   What platforms does the .NET Framework run on?&lt;br /&gt;&lt;br /&gt;The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on 15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers. &lt;br /&gt; &lt;br /&gt;4.   Explain .NET Framework architecture?&lt;br /&gt;&lt;br /&gt;The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is designed to fulfill the following objectives:&lt;br /&gt;• To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. &lt;br /&gt;• To provide a code-execution environment that minimizes software deployment and versioning conflicts. &lt;br /&gt;• To provide a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party. &lt;br /&gt;• To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments. &lt;br /&gt;• To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications. &lt;br /&gt;• To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code. &lt;br /&gt;The .NET Framework has two main components: the common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that promote security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. The class library, the other main component of the .NET Framework, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services. &lt;br /&gt;&lt;br /&gt;The .NET Framework can be hosted by unmanaged components that load the common language runtime into their processes and initiate the execution of managed code, thereby creating a software environment that can exploit both managed and unmanaged features. The .NET Framework not only provides several runtime hosts, but also supports the development of third-party runtime hosts. &lt;br /&gt;&lt;br /&gt;For example, ASP.NET hosts the runtime to provide a scalable, server-side environment for managed code. ASP.NET works directly with the runtime to enable ASP.NET applications and XML Web services, both of which are discussed later in this topic. &lt;br /&gt;&lt;br /&gt;Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code (similar to Microsoft® ActiveX® controls) possible, but with significant improvements that only managed code can offer, such as semi-trusted execution and isolated file storage. &lt;br /&gt;&lt;br /&gt;The following illustration shows the relationship of the common language runtime and the class library to your applications and to the overall system. The illustration also shows how managed code operates within a larger architecture. &lt;br /&gt;&lt;br /&gt;.NET Framework in context&lt;br /&gt;&lt;br /&gt;The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime.&lt;br /&gt;&lt;br /&gt;With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, enterprise network, or local computer). This means that a managed component might or might not be able to perform file-access operations, registry-access operations, or other sensitive functions, even if it is being used in the same active application.&lt;br /&gt;&lt;br /&gt;The runtime enforces code access security. For example, users can trust that an executable embedded in a Web page can play an animation on screen or sing a song, but cannot access their personal data, file system, or network. The security features of the runtime thus enable legitimate Internet-deployed software to be exceptionally feature rich.&lt;br /&gt;&lt;br /&gt;The runtime also enforces code robustness by implementing a strict type-and-code-verification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety.&lt;br /&gt;&lt;br /&gt;In addition, the managed environment of the runtime eliminates many common software issues. For example, the runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references.&lt;br /&gt;&lt;br /&gt;The runtime also accelerates developer productivity. For example, programmers can write applications in their development language of choice, yet take full advantage of the runtime, the class library, and components written in other languages by other developers. Any compiler vendor who chooses to target the runtime can do so. Language compilers that target the .NET Framework make the features of the .NET Framework available to existing code written in that language, greatly easing the migration process for existing applications.&lt;br /&gt;&lt;br /&gt;While the runtime is designed for the software of the future, it also supports software of today and yesterday. Interoperability between managed and unmanaged code enables developers to continue to use necessary COM components and DLLs.&lt;br /&gt;&lt;br /&gt;The runtime is designed to enhance performance. Although the common language runtime provides many standard runtime services, managed code is never interpreted. A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing. Meanwhile, the memory manager removes the possibilities of fragmented memory and increases memory locality-of-reference to further increase performance.&lt;br /&gt;&lt;br /&gt;Finally, the runtime can be hosted by high-performance, server-side applications, such as Microsoft® SQL Server™ and Internet Information Services (IIS). This infrastructure enables you to use managed code to write your business logic, while still enjoying the superior performance of the industry's best enterprise servers that support runtime hosting.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;The following sections describe the main components and features of the .NET Framework in greater detail.&lt;br /&gt;Features of the Common Language Runtime&lt;br /&gt;&lt;br /&gt;The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime.&lt;br /&gt;&lt;br /&gt;With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, enterprise network, or local computer). This means that a managed component might or might not be able to perform file-access operations, registry-access operations, or other sensitive functions, even if it is being used in the same active application.&lt;br /&gt;&lt;br /&gt;The runtime enforces code access security. For example, users can trust that an executable embedded in a Web page can play an animation on screen or sing a song, but cannot access their personal data, file system, or network. The security features of the runtime thus enable legitimate Internet-deployed software to be exceptionally feature rich.&lt;br /&gt;&lt;br /&gt;The runtime also enforces code robustness by implementing a strict type-and-code-verification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety.&lt;br /&gt;&lt;br /&gt;In addition, the managed environment of the runtime eliminates many common software issues. For example, the runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references.&lt;br /&gt;&lt;br /&gt;The runtime also accelerates developer productivity. For example, programmers can write applications in their development language of choice, yet take full advantage of the runtime, the class library, and components written in other languages by other developers. Any compiler vendor who chooses to target the runtime can do so. Language compilers that target the .NET Framework make the features of the .NET Framework available to existing code written in that language, greatly easing the migration process for existing applications.&lt;br /&gt;&lt;br /&gt;While the runtime is designed for the software of the future, it also supports software of today and yesterday. Interoperability between managed and unmanaged code enables developers to continue to use necessary COM components and DLLs.&lt;br /&gt;&lt;br /&gt;The runtime is designed to enhance performance. Although the common language runtime provides many standard runtime services, managed code is never interpreted. A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing. Meanwhile, the memory manager removes the possibilities of fragmented memory and increases memory locality-of-reference to further increase performance.&lt;br /&gt;&lt;br /&gt;Finally, the runtime can be hosted by high-performance, server-side applications, such as Microsoft® SQL Server™ and Internet Information Services (IIS). This infrastructure enables you to use managed code to write your business logic, while still enjoying the superior performance of the industry's best enterprise servers that support runtime hosting.&lt;br /&gt;&lt;br /&gt;.NET Framework Class Library&lt;br /&gt;&lt;br /&gt;The .NET Framework class library is a collection of reusable types that tightly integrate with the common language runtime. The class library is object oriented, providing types from which your own managed code can derive functionality. This not only makes the .NET Framework types easy to use, but also reduces the time associated with learning new features of the .NET Framework. In addition, third-party components can integrate seamlessly with classes in the .NET Framework.&lt;br /&gt;&lt;br /&gt;For example, the .NET Framework collection classes implement a set of interfaces that you can use to develop your own collection classes. Your collection classes will blend seamlessly with the classes in the .NET Framework.&lt;br /&gt;&lt;br /&gt;As you would expect from an object-oriented class library, the .NET Framework types enable you to accomplish a range of common programming tasks, including tasks such as string management, data collection, database connectivity, and file access. In addition to these common tasks, the class library includes types that support a variety of specialized development scenarios. For example, you can use the .NET Framework to develop the following types of applications and services: &lt;br /&gt;&lt;br /&gt;• Console applications. &lt;br /&gt;• Windows GUI applications (Windows Forms). &lt;br /&gt;• ASP.NET applications. &lt;br /&gt;• XML Web services. &lt;br /&gt;• Windows services. &lt;br /&gt;For example, the Windows Forms classes are a comprehensive set of reusable types that vastly simplify Windows GUI development. If you write an ASP.NET Web Form application, you can use the Web Forms classes.&lt;br /&gt;Client Application Development&lt;br /&gt;&lt;br /&gt;Client applications are the closest to a traditional style of application in Windows-based programming. These are the types of applications that display windows or forms on the desktop, enabling a user to perform a task. Client applications include applications such as word processors and spreadsheets, as well as custom business applications such as data-entry tools, reporting tools, and so on. Client applications usually employ windows, menus, buttons, and other GUI elements, and they likely access local resources such as the file system and peripherals such as printers.&lt;br /&gt;&lt;br /&gt;Another kind of client application is the traditional ActiveX control (now replaced by the managed Windows Forms control) deployed over the Internet as a Web page. This application is much like other client applications: it is executed natively, has access to local resources, and includes graphical elements.&lt;br /&gt;&lt;br /&gt;In the past, developers created such applications using C/C++ in conjunction with the Microsoft Foundation Classes (MFC) or with a rapid application development (RAD) environment such as Microsoft® Visual Basic®. The .NET Framework incorporates aspects of these existing products into a single, consistent development environment that drastically simplifies the development of client applications.&lt;br /&gt;&lt;br /&gt;The Windows Forms classes contained in the .NET Framework are designed to be used for GUI development. You can easily create command windows, buttons, menus, toolbars, and other screen elements with the flexibility necessary to accommodate shifting business needs.&lt;br /&gt;&lt;br /&gt;For example, the .NET Framework provides simple properties to adjust visual attributes associated with forms. In some cases the underlying operating system does not support changing these attributes directly, and in these cases the .NET Framework automatically recreates the forms. This is one of many ways in which the .NET Framework integrates the developer interface, making coding simpler and more consistent.&lt;br /&gt;&lt;br /&gt;Unlike ActiveX controls, Windows Forms controls have semi-trusted access to a user's computer. This means that binary or natively executing code can access some of the resources on the user's system (such as GUI elements and limited file access) without being able to access or compromise other resources. Because of code access security, many applications that once needed to be installed on a user's system can now be deployed through the Web. Your applications can implement the features of a local application while being deployed like a Web page.&lt;br /&gt;&lt;br /&gt;Server Application Development&lt;br /&gt;&lt;br /&gt;Server-side applications in the managed world are implemented through runtime hosts. Unmanaged applications host the common language runtime, which allows your custom managed code to control the behavior of the server. This model provides you with all the features of the common language runtime and class library while gaining the performance and scalability of the host server.&lt;br /&gt;&lt;br /&gt;The following illustration shows a basic network schema with managed code running in different server environments. Servers such as IIS and SQL Server can perform standard operations while your application logic executes through the managed code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;ASP.NET is the hosting environment that enables developers to use the .NET Framework to target Web-based applications. However, ASP.NET is more than just a runtime host; it is a complete architecture for developing Web sites and Internet-distributed objects using managed code. Both Web Forms and XML Web services use IIS and ASP.NET as the publishing mechanism for applications, and both have a collection of supporting classes in the .NET Framework.&lt;br /&gt;&lt;br /&gt;XML Web services, an important evolution in Web-based technology, are distributed, server-side application components similar to common Web sites. However, unlike Web-based applications, XML Web services components have no UI and are not targeted for browsers such as Internet Explorer and Netscape Navigator. Instead, XML Web services consist of reusable software components designed to be consumed by other applications, such as traditional client applications, Web-based applications, or even other XML Web services. As a result, XML Web services technology is rapidly moving application development and deployment into the highly distributed environment of the Internet.&lt;br /&gt;&lt;br /&gt;If you have used earlier versions of ASP technology, you will immediately notice the improvements that ASP.NET and Web Forms offer. For example, you can develop Web Forms pages in any language that supports the .NET Framework. In addition, your code no longer needs to share the same file with your HTTP text (although it can continue to do so if you prefer). Web Forms pages execute in native machine language because, like any other managed application, they take full advantage of the runtime. In contrast, unmanaged ASP pages are always scripted and interpreted. ASP.NET pages are faster, more functional, and easier to develop than unmanaged ASP pages because they interact with the runtime like any managed application.&lt;br /&gt;&lt;br /&gt;The .NET Framework also provides a collection of classes and tools to aid in development and consumption of XML Web services applications. XML Web services are built on standards such as SOAP (a remote procedure-call protocol), XML (an extensible data format), and WSDL ( the Web Services Description Language). The .NET Framework is built on these standards to promote interoperability with non-Microsoft solutions.&lt;br /&gt;&lt;br /&gt;For example, the Web Services Description Language tool included with the .NET Framework SDK can query an XML Web service published on the Web, parse its WSDL description, and produce C# or Visual Basic source code that your application can use to become a client of the XML Web service. The source code can create classes derived from classes in the class library that handle all the underlying communication using SOAP and XML parsing. Although you can use the class library to consume XML Web services directly, the Web Services Description Language tool and the other tools contained in the SDK facilitate your development efforts with the .NET Framework.&lt;br /&gt;&lt;br /&gt;If you develop and publish your own XML Web service, the .NET Framework provides a set of classes that conform to all the underlying communication standards, such as SOAP, WSDL, and XML. Using those classes enables you to focus on the logic of your service, without concerning yourself with the communications infrastructure required by distributed software development.&lt;br /&gt;&lt;br /&gt;Finally, like Web Forms pages in the managed environment, your XML Web service will run with the speed of native machine language using the scalable communication of IIS.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;5.    What are the mobile devices supported by .net platform? &lt;br /&gt;&lt;br /&gt;The Microsoft .NET Compact Framework is designed to run on mobile devices such as mobile phones, Personal Digital Assistants (PDAs), and embedded devices. The easiest way to develop and test a Smart Device Application is to use an emulator.&lt;br /&gt;These devices are divided into two main divisions: &lt;br /&gt;&lt;br /&gt;1. Those that are directly supported by .NET (Pocket PCs, i-Mode phones, and WAP devices) &lt;br /&gt;2. Those that are not (Palm OS and J2ME-powered devices). &lt;br /&gt;&lt;br /&gt;6.    What is the CLR? &lt;br /&gt;&lt;br /&gt;Common Language Runtime (CLR) is a run-time environment that manages the execution of .NET code and provides services like memory management, debugging, security, etc. The CLR is also known as Virtual Execution System (VES). The CLR is a multi-language execution environment. There are currently over 15 compilers being built by Microsoft and other companies that produce code that will execute in the CLR.&lt;br /&gt;&lt;br /&gt;The Common Language Runtime (CLR) provides a solid foundation for developers to build various types of applications. Whether you're writing an ASP.Net application , a Windows Forms application, a Web Service, a mobile code application, a distributed application, or an application that combines several of these application models, the CLR provides the following benefits for application developers:&lt;br /&gt;&lt;br /&gt;• Vastly simplified development &lt;br /&gt;• Seamless integration of code written in various languages &lt;br /&gt;• Evidence-based security with code identity &lt;br /&gt;• Assembly-based deployment that eliminates DLL Hell &lt;br /&gt;• Side-by-side versioning of reusable components &lt;br /&gt;• Code reuse through implementation inheritance &lt;br /&gt;• Automatic object lifetime management &lt;br /&gt;• Self describing objects &lt;br /&gt; &lt;br /&gt;All Languages have runtime and its the responsibility of the runtime to take care of the code execution of the program. For example VC + + has MSCRT40.DLL,VB6 has MSVBVM60.DLL, Java has Java Virtual Machine etc. Similarly .NET has CLR. &lt;br /&gt;Following are the responsibilities of CLR&lt;br /&gt;&lt;br /&gt;• Garbage Collection :- CLR automatically manages memory thus eliminating memory leakage. When objects are not referred GC automatically releases those memory thus providing efficient memory management. &lt;br /&gt;• Code Access  Security :- CAS grants  rights to program depending on the security configuration of the machine. Example the program has rights to edit or create a new file but the security configuration of machine does not allow the program to delete a file. CAS will take care that the code runs under the environment of machines security configuration. &lt;br /&gt;• Code Verification :- This ensures proper code execution and type safety while the code runs. It prevents the source code to perform illegal operation such as accessing invalid memory locations etc. &lt;br /&gt;• IL( Intermediate language )-to-native translators and optimizer's :- CLR uses JIT and compiles the IL code to machine code and then executes. CLR also determines depending on platform what is optimized way of running the IL code. &lt;br /&gt; &lt;br /&gt;7.    What is BCL? &lt;br /&gt;&lt;br /&gt;The Base Class Library (BCL) is a library of types and functionalities available to all languages using the .NET Framework. In order to make the programmer's job easier, .NET includes the BCL in order to encapsulate a large number of common functions, such as file reading and writing, graphic rendering, database interaction, and XML document manipulation. It is much larger in scope than standard libraries for most other languages, including C++, and would be comparable in scope to the standard libraries of Java. The BCL is sometimes incorrectly referred to as the Framework Class Library (FCL), which is a superset including the Microsoft namespaces. &lt;br /&gt;&lt;br /&gt;The Base Class Libraries (BCL) provides the fundamental building blocks for any application you develop, be it an ASP.NET application, a Windows Forms application, or a Web Service. The BCL generally serves as your main point of interaction with the runtime. BCL classes include:&lt;br /&gt;&lt;br /&gt;• System &lt;br /&gt;• System.CodeDom &lt;br /&gt;• System.Collections &lt;br /&gt;• System.Diagnostics &lt;br /&gt;• System.Globalization &lt;br /&gt;• System.IO &lt;br /&gt;• System.Resources &lt;br /&gt;• System.Text &lt;br /&gt;• System.Text.RegularExpressions &lt;br /&gt;&lt;br /&gt;8.    What is the CLS? &lt;br /&gt;&lt;br /&gt;Common Language Specification. This is a subset of the CTS which all .NET languages are expected to support. The idea is that any program which uses CLS-compliant types can interoperate with any .NET program written in any language.In theory this allows very tight interop between different .NET languages - for example allowing a C# class to inherit from a VB class. &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9.   What is a CTS? &lt;br /&gt;&lt;br /&gt;Common Type System. This is the range of types that the .NET runtime understands, and therefore that .NET applications can use. However note that not all .NET languages will support all the types in the CTS. The CTS is a superset of the CLS. &lt;br /&gt; &lt;br /&gt;10.   What is a lL? ( MSIL, CIL ) &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Intermediate Language. Also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code (of any language) is compiled to MSIL. When compiling the source code to managed code, the compiler translates the source into Microsoft intermediate language (MSIL). This is a CPU-independent set of instructions that can efficiently be converted to native code. Microsoft intermediate language (MSIL) is a translation used as the output of a number of compilers. It is the input to a just-in-time (JIT) compiler. The Common Language Runtime includes a JIT compiler for the conversion of MSIL to native code. &lt;br /&gt;&lt;br /&gt;Before Microsoft Intermediate Language (MSIL) can be executed it, must be converted by the .NET Framework just-in-time (JIT) compiler to native code. This is CPU-specific code that runs on the same computer architecture as the JIT compiler. Rather than using time and memory to convert all of the MSIL in a portable executable (PE) file to native code. It converts the MSIL as needed whilst executing, then caches the resulting native code so its accessible for any subsequent calls.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;11.    What is MSIL Assembler (Ilasm.exe) &lt;br /&gt;&lt;br /&gt;The MSIL Assembler generates a portable executable (PE) file from MSIL assembly language. You can run the resulting executable, which contains MSIL and the required metadata, to determine whether the MSIL performs as expected. &lt;br /&gt; &lt;br /&gt;12.    What is MSIL Disassembler (Ilasm.exe) ?&lt;br /&gt;&lt;br /&gt;The MSIL Disassembler is a companion tool to the MSIL Assembler (Ilasm.exe). Ildasm.exe takes a portable executable (PE) file that contains Microsoft intermediate language (MSIL) code and creates a text file suitable as input to Ilasm.exe.&lt;br /&gt;  &lt;br /&gt;13.    Can I look at the IL for an assembly?&lt;br /&gt;&lt;br /&gt;Yes. MS supply a tool called Ildasm that can be used to view the metadata and IL for an assembly. &lt;br /&gt; &lt;br /&gt;14.    Can source code be reverse-engineered from IL?&lt;br /&gt;&lt;br /&gt;Yes, it is often relatively straightforward to regenerate high-level source from IL. Lutz Roeder's Reflector does a very good job of turning IL into C# or VB.NET. &lt;br /&gt; &lt;br /&gt;15.    How can I stop my code being reverse-engineered from IL?&lt;br /&gt;&lt;br /&gt;You can buy an IL obfuscation tool. These tools work by 'optimising' the IL in such a way that reverse-engineering becomes much more difficult. Of course if you are writing web services then reverse-engineering is not a problem as clients do not have access to your IL. &lt;br /&gt;&lt;br /&gt;16.    Can I write IL programs directly?&lt;br /&gt;&lt;br /&gt;Yes &lt;br /&gt;    .assembly MyAssembly {}&lt;br /&gt;    .class MyApp {&lt;br /&gt;      .method static void Main() {&lt;br /&gt;        .entrypoint&lt;br /&gt;        ldstr      "Hello, IL!"&lt;br /&gt;        call       void System.Console::WriteLine(class System.Object)&lt;br /&gt;        ret&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;Just put this into a file called hello.il, and then run ilasm hello.il. An exe assembly will be generated. &lt;br /&gt; &lt;br /&gt;17.    Can I do things in IL that I can't do in C#?&lt;br /&gt;&lt;br /&gt;Yes. A couple of simple examples are that you can throw exceptions that are not derived from System.Exception, and you can have non-zero-based arrays. &lt;br /&gt; &lt;br /&gt;18.    What is JIT?&lt;br /&gt;&lt;br /&gt;Just-In-Time compiler- it converts the language that you write in .Net into machine language that a computer can understand. there are tqo types of JITs one  is memory optimized &amp; other  is performace optimized.&lt;br /&gt;&lt;br /&gt;JIT (Just - In - Time) is a compiler which converts MSIL code to Native Code (ie.. CPU-specific code that runs on the same computer architecture).&lt;br /&gt;&lt;br /&gt;Because the common language runtime supplies a JIT compiler for each supported CPU architecture, developers can write a set of MSIL that can be JIT-compiled and run on computers with different architectures. However, your managed code will run only on a specific operating system if it calls platform-specific native APIs, or a platform-specific class library.&lt;br /&gt;&lt;br /&gt;JIT compilation takes into account the fact that some code might never get called during execution. Rather than using time and memory to convert all the MSIL in a portable executable (PE) file to native code, it converts the MSIL as needed during execution and stores the resulting native code so that it is accessible for subsequent calls. The loader creates and attaches a stub to each of a type's methods when the type is loaded. On the initial call to the method, the stub passes control to the JIT compiler, which converts the MSIL for that method into native code and modifies the stub to direct execution to the location of the native code. Subsequent calls of the JIT-compiled method proceed directly to the native code that was previously generated, reducing the time it takes to JIT-compile and run the code.&lt;br /&gt; &lt;br /&gt;19.    What is a Managed Code?&lt;br /&gt;&lt;br /&gt;Managed code is code that has its execution managed by the .NET Framework Common Language Runtime. It refers to a contract of cooperation between natively executing code and the runtime. This contract specifies that at any point of execution, the runtime may stop an executing CPU and retrieve information specific to the current CPU instruction address. Information that must be query-able generally pertains to runtime state, such as register or stack memory contents. &lt;br /&gt;&lt;br /&gt;The necessary information is encoded in an Intermediate Language (IL) and associated metadata, or symbolic information that describes all of the entry points and the constructs exposed in the IL (e.g., methods, properties) and their characteristics. The Common Language Infrastructure (CLI) Standard (which the CLR is the primary commercial implementation) describes how the information is to be encoded, and programming languages that target the runtime emit the correct encoding.&lt;br /&gt;&lt;br /&gt;Managed code runs in the Common Language Runtime. The runtime offers a wide variety of services to your running code. In the usual course of events, it first loads and verifies the assembly to make sure the IL is okay. Then, just in time, as methods are called, the runtime arranges for them to be compiled to machine code suitable for the machine the assembly is running on, and caches this machine code to be used the next time the method is called. (This is called Just In Time, or JIT compiling, or often just Jitting.) &lt;br /&gt;&lt;br /&gt;As the assembly runs, the runtime continues to provide services such as security, memory management, threading, and the like. The application is managed by the runtime.&lt;br /&gt; &lt;br /&gt;20.    What is a Unmanaged Code?&lt;br /&gt;&lt;br /&gt;Unmanaged code is what you use to make before Visual Studio .NET 2002 was released. Visual Basic 6, Visual C++ 6. It compiled directly to machine code that ran on the machine where you compiled it—and on other machines as long as they had the same chip, or nearly the same. It didn't get services such as security or memory management from an invisible runtime; it got them from the operating system. And importantly, it got them from the operating system explicitly, by asking for them, usually by calling an API provided in the Windows SDK. More recent unmanaged applications got operating system services through COM calls.&lt;br /&gt;&lt;br /&gt;Unlike the other Microsoft languages in Visual Studio, Visual C++ can create unmanaged applications. When you create a project and select an application type whose name starts with MFC, ATL, or Win32, you're creating an unmanaged application.&lt;br /&gt;&lt;br /&gt;This can lead to some confusion: When you create a .Managed C++ application., the build product is an assembly of IL with an .exe extension. When you create an MFC application, the build product is a Windows executable file of native code, also with an .exe extension. The internal layout of the two files is utterly different. You can use the Intermediate Language Disassembler, ildasm, to look inside an assembly and see the metadata and IL. Try pointing ildasm at an unmanaged exe and you'll be told it has no valid CLR (Common Language Runtime) header and can't be disassembled Same extension, completely different files.&lt;br /&gt;&lt;br /&gt;21.    What is portable executable (PE)?&lt;br /&gt;&lt;br /&gt;The file format defining the structure that all executable files (EXE) and Dynamic Link Libraries (DLL) must use to allow them to be loaded and executed by Windows. PE is derived from the Microsoft Common Object File Format (COFF). The EXE and DLL files created using the .NET Framework obey the PE/COFF formats and also add additional header and data sections to the files that are only used by the CLR. &lt;br /&gt; &lt;br /&gt;22.    What is a Assembly ?&lt;br /&gt;&lt;br /&gt;An assembly consists of one or more files (dlls, exe's, html files etc.), and represents a group of resources, type definitions, and implementations of those types. An assembly may also contain references to other assemblies. These resources, types and references are described in a block of data called a manifest. The manifest is part of the assembly, thus making the assembly self-describing.&lt;br /&gt;&lt;br /&gt;An assembly is completely self-describing.An assembly contains metadata information, Which is used by the CLR for everything from type checking and security to actually invoking the components methods.As all information is in assembly itself it is independent of registry. This is the basic advantage as compared to COM where the version was stored in registry.&lt;br /&gt;&lt;br /&gt;In the Microsoft .NET framework an assembly is a partially compiled code library for use in deployment, versioning and security. In the Microsoft Windows implementation of .NET, an assembly is a PE (portable executable) file. There are two types, process assemblies (EXE) and library assemblies (DLL). A process assembly represents a process which will use classes defined in library assemblies. In version 1.1 of the CLR classes can only be exported from library assemblies; in version 2.0 this restriction is relaxed. The compiler will have a switch to determine if the assembly is a process or library and will set a flag in the PE file. .NET does not use the extension to determine if the file is a process or library. This means that a library may have either .dll or .exe as its extension.&lt;br /&gt;&lt;br /&gt;The code in an assembly is compiled into MSIL, which is then compiled into machine language at runtime by the CLR.&lt;br /&gt;&lt;br /&gt;An assembly can consist of one or more files. Code files are called modules. An assembly can contain more than one code module and since it is possible to use different languages to create code modules this means that it is technically possible to use several different languages to create an assembly. In practice this rarely happens, principally because Visual Studio only allows developers to create assemblies that consist of a single code module.&lt;br /&gt; &lt;br /&gt;23.    What is GAC? &lt;br /&gt;&lt;br /&gt;Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer.  You should share assemblies by installing them into the global assembly cache only when you need to.&lt;br /&gt;&lt;br /&gt;There are three ways to add an assembly to the GAC: &lt;br /&gt;&lt;br /&gt;• Install them with the Windows Installer 2.0 &lt;br /&gt;• Use the Gacutil.exe tool &lt;br /&gt;• Drag and drop the assemblies to the cache with Windows Explorer &lt;br /&gt;  - Create a strong name using sn.exe tool&lt;br /&gt;eg: sn -k keyPair.snk&lt;br /&gt;- with in AssemblyInfo.cs add the generated file name &lt;br /&gt;eg: [assembly: AssemblyKeyFile("abc.snk")]&lt;br /&gt;- recompile project, then install it to GAC by either&lt;br /&gt;drag &amp; drop it to assembly folder (C:\WINDOWS\assembly OR C:\WINNT\assembly) (shfusion.dll tool)&lt;br /&gt;or&lt;br /&gt;gacutil -i abc.dll&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;24.    What are different types of Assembly?&lt;br /&gt;&lt;br /&gt;Private assemblies : &lt;br /&gt;When a developer compiles code the compiler will put the name of every library assembly it uses in the compiled assembly's .NET metadata. When the CLR executes the code in the assembly it will use this metadata to locate the assembly using a technology called Fusion. If the called assembly does not have a strong name, then Fusion will only use the short name (the PE file name) to locate the library. In effect this means that the assembly can only exist in the application folder, or in a subfolder, and hence it is called a private assembly because it can only be used by a specific application. Versioning is switched off for assemblies that do not have strong names, and so this means that it is possible for a different version of an assembly to be loaded than the one that was used to create the calling assembly.&lt;br /&gt;&lt;br /&gt;The compiler will store the complete name (including version) of strongly named assembly in the metadata of the calling assembly. When the called assembly is loaded, Fusion will ensure that only an assembly with the exact name, including the version, is loaded. Fusion is configurable, and so you can provide an application configuration file to tell Fusion to use a specific version of a library when another version is requested.&lt;br /&gt;&lt;br /&gt;Shared assemblies : &lt;br /&gt;&lt;br /&gt;Shared assemblies are stored in the GAC. This is a system-wide cache and all applications on the machine can use any assembly in the cache. To the casual user it appears that the GAC is a single folder, however, it is actually implemented using FAT32 or NTFS nested folders which means that there can be multiple versions (or cultures) of the same assembly.&lt;br /&gt;&lt;br /&gt; 25.    What is Fusion ?&lt;br /&gt;&lt;br /&gt;Filesystems in common use by Windows (FAT32, NTFS, CDFS, etc.) are restrictive because the names of files do not include information like versioning or localization. This means that two different versions of a file cannot exist in the same folder unless their names have versioning information. Fusion is the Windows loader technology that allows versioning and culture information to be used in the name of a .NET assembly that is stored on these filesystems. Despite being the exlusive system for loading a managed assembly into a process, Fusion is also currently used to load Win32 assemblies independent of managed assembly loading.&lt;br /&gt;&lt;br /&gt;Fusion uses a specific search order when it looks for an assembly.&lt;br /&gt;&lt;br /&gt;1. If the assembly is strongly named it will first look in the GAC. &lt;br /&gt;2. Fusion will then look for redirection information in the application's configuration file. If the library is strongly named then this can specify that another version should be loaded, or it can specify an absolute address of a folder on the local hard disk, or the URL of a file on a web server. If the library is not strongly named, then the configuration file can specify a subfolder beneath the application folder to be used in the search path. &lt;br /&gt;3. Fusion will then look for the assembly in the application folder with either the extension .exe or .dll. &lt;br /&gt;4. Fusion will look for a subfolder with the same name as the short name (PE file name) of the folder and look for the assembly in that folder with either the extension .exe or &lt;br /&gt;5. .dll. &lt;br /&gt;&lt;br /&gt;If Fusion cannot find the assembly, the assembly image is bad, or if the reference to the assembly doesn't match the version of the assembly found, it will throw an exception. In addition, information about the name of the assembly, and the paths that it checked, will be stored. This information may be viewed by using the Fusion log viewer (fuslogvw), or if a custom location is configured, directly from the HTML log files generated.&lt;br /&gt;&lt;br /&gt;26.   What is a satellite assembly?&lt;br /&gt;&lt;br /&gt;In multilingual application in .NET to support multilingual functionality you can have modules which are customized for localization.These assemblies are called as satellite assemblies. You can distribute these assemblies separately than the core modules. &lt;br /&gt;&lt;br /&gt;A definition from MSDN says something like this: "A .NET Framework assembly containing resources specific to a given language. Using satellite assemblies, you can place the resources for different languages in different assemblies, and the correct assembly is loaded into memory only if the user elects to view the application in that language."&lt;br /&gt;&lt;br /&gt;This means that you develop your application in a default language and add flexibility to react with change in the locale. Say, for example, you developed your application in an en-US locale. Now, your application has multilingual support. When you deploy your code in, say, India, you want to show labels, messages shown in the national language which is other than English.&lt;br /&gt;&lt;br /&gt;Satellite assemblies give this flexibility. You create any simple text file with translated strings, create resources, and put them into the bin\debug folder. That's it. The next time, your code will read the CurrentCulture property of the current thread and accordingly load the appropriate resource.&lt;br /&gt;&lt;br /&gt;This is called the hub and spoke model. It requires that you place resources in specific locations so that they can be located and used easily. If you do not compile and name resources as expected, or if you do not place them in the correct locations, the common language runtime will not be able to locate them. As a result, the runtime uses the default resource set.&lt;br /&gt;&lt;br /&gt;Every assembly contains an assembly manifest, a set of metadata with information about the assembly. The assembly manifest contains these items: &lt;br /&gt;&lt;br /&gt;• The assembly name and version &lt;br /&gt;• The culture or language the assembly supports (not required in all assemblies) &lt;br /&gt;• The public key for any strong name assigned to the assembly (not required in all assemblies) &lt;br /&gt;• A list of files in the assembly with hash information &lt;br /&gt;• Information on exported types &lt;br /&gt;• Information on referenced assemblies &lt;br /&gt;In addition, you can add other information to the manifest by using assembly attributes. Assembly attributes are declared inside of a file in an assembly, and are text strings that describe the assembly. For example, you can set a friendly name for an assembly with the AssemblyTitle attribute:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;27.    How to create satellite assembly?&lt;br /&gt;&lt;br /&gt;• Create a folder with a specific culture name (for example, en-US) in the application's bin\debug folder. &lt;br /&gt;• Create a .resx file in that folder. Place all translated strings into it. &lt;br /&gt;• Create a .resources file by using the following command from the .NET command prompt. (localizationsample is the name of the application namespace. If your application uses a nested namespace structure like MyApp.YourApp.MyName.YourName as the type of namespace, just use the uppermost namespace for creating resources files—MyApp.) &lt;br /&gt;  &lt;br /&gt;resgen Strings.en-US.resx LocalizationSample.&lt;br /&gt;   Strings.en-US.resources&lt;br /&gt;al /embed:LocalizationSample.Strings.en-US.resources&lt;br /&gt;   /out:LocalizationSample.resources.dll /c:en-US&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above step will create two files, LocalizationSample.Strings.en-US.resources and LocalizationSample.resources.dll. Here, LocalizationSample is the name space of the application.&lt;br /&gt;&lt;br /&gt;• In the code, find the user's language; for example, en-US. This is culture specific. &lt;br /&gt;• Give the assembly name as the name of .resx file. In this case, it is Strings. &lt;br /&gt;&lt;br /&gt;Using a Satellite Assembly &lt;br /&gt;&lt;br /&gt;Follow these steps:&lt;br /&gt;  &lt;br /&gt;Thread.CurrentThread.CurrentCulture =&lt;br /&gt;   CultureInfo.CreateSpecificCulture(specCult);&lt;br /&gt;Thread.CurrentThread.CurrentUICulture =&lt;br /&gt;   new CultureInfo(specCult);&lt;br /&gt;ResourceManager resMgr =&lt;br /&gt;   new ResourceManager(typeof(Form1).Namespace + "." +&lt;br /&gt;                       asmName, this.GetType().Assembly);&lt;br /&gt;btnTest.Text = resMgr.GetString("Jayant");&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;28.    What is Shadow Copy?&lt;br /&gt;&lt;br /&gt;In order to replace a COM component on a live web server, it was necessary to stop the entire website, copy the new files and then restart the website. This is not feasible for the web servers that need to be always running. .NET components are different. They can be overwritten at any time using a mechanism called Shadow Copy. It prevents the Portable Executable (PE) files like DLLs and EXEs from being locked. Whenever new versions of the PEs are released, they are automatically detected by the CLR and the changed components will be automatically loaded. They will be used to process all new requests not currently executing, while the older version still runs the currently executing requests. By bleeding out the older version, the update is completed.&lt;br /&gt; &lt;br /&gt;29.    What is DLL Hell? &lt;br /&gt;&lt;br /&gt;DLL hell is the problem that occurs when an installation of a newer application might break or hinder other applications as newer DLLs are copied into the system and the older applications do not support or are not compatible with them. .NET overcomes this problem by supporting multiple versions of an assembly at any given time. This is also called side-by-side component versioning. &lt;br /&gt; &lt;br /&gt;30.    What is GUID , why we use it and where?&lt;br /&gt;&lt;br /&gt;GUID is Short form of Globally Unique Identifier, a unique 128-bit number that is produced by the Windows OS or by some Windows applications to identify a particular component, application, file, database entry, and/or user. For instance, a Web site may generate a GUID and assign it to a user's browser to record and track the session. A GUID is also used in a Windows registry to identify COM DLLs. Knowing where to look in the registry and having the correct GUID yields a lot information about a COM object (i.e., information in the type library, its physical location, etc.). Windows also identifies user accounts by a username (computer/domain and username) and assigns it a GUID. Some database administrators even will use GUIDs as primary key values in databases. &lt;br /&gt;&lt;br /&gt;GUIDs can be created in a number of ways, but usually they are a combination of a few unique settings based on specific point in time (e.g., an IP address, network MAC address, clock date/time, etc.).&lt;br /&gt;&lt;br /&gt;31.    How to create GUID?&lt;br /&gt;&lt;br /&gt;Start guidgen.exe, or when you click the New GUID button in the Create GUID dialog box, guidgen.exe generates a GUID.&lt;br /&gt;&lt;br /&gt;To run guidgen.exe from the IDE&lt;br /&gt;&lt;br /&gt;• On the Tools menu, click Create GUID. The Create GUID tool appears with a GUID in the Result box. &lt;br /&gt;• Select the format you want for the GUID. &lt;br /&gt;• Click Copy. &lt;br /&gt;• The GUID is copied to the Clipboard so that you can paste it into your source code. &lt;br /&gt;• If you want to generate another GUID, click New GUID. &lt;br /&gt; &lt;br /&gt;32.    What is NameSpace?&lt;br /&gt;&lt;br /&gt;Namespace is a logical naming scheme for group related types. Some class types that logically belong together they can be put into a common namespace. They prevent namespace collisions and they provide scoping. They are imported as "using" in C# or "Imports" in Visual Basic. It seems as if these directives specify a particular assembly, but they don't. A namespace can span multiple assemblies, and an assembly can define multiple namespaces. When the compiler needs the definition for a class type, it tracks through each of the different imported namespaces to the type name and searches each referenced assembly until it is found. Namespaces can be nested. This is very similar to packages in Java as far as scoping is concerned. &lt;br /&gt; &lt;br /&gt;33.    What is Difference between NameSpace and Assembly ? &lt;br /&gt;&lt;br /&gt;The concept of a namespace is not related to that of an assembly. A single assembly may contain many types whose hierarchical names have different namespace roots, and a logical namespace root may span multiple assemblies. In the .NET Framework, a namespace is a logical design-time naming convention, whereas an assembly establishes the name scope for types at run time. &lt;br /&gt;Namespace:&lt;br /&gt;• Namespace is logical grouping unit. &lt;br /&gt;• It is a Collection of names wherein each name is Unique. &lt;br /&gt;• They form the logical boundary for a Group of classes. &lt;br /&gt;• Namespace must be specified in Project-Properties. &lt;br /&gt;&lt;br /&gt;Assembly: &lt;br /&gt;• Assembly is physical grouping unit. &lt;br /&gt;• It is an Output Unit. It is a unit of Deployment &amp; a unit of versioning. Assemblies contain MSIL code. &lt;br /&gt;• Assemblies are Self-Describing. [e.g. metadata,manifest] &lt;br /&gt;• An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or by code outside that unit. &lt;br /&gt; &lt;br /&gt;34.    How can you view Assembly? &lt;br /&gt;&lt;br /&gt;Using ILDAM tool.&lt;br /&gt; &lt;br /&gt;35.    What is Manifest? &lt;br /&gt;&lt;br /&gt;Every assembly, whether static or dynamic, contains a collection of data that describes how the elements in the assembly relate to each other. The assembly manifest contains this assembly metadata. An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE file that contains only assembly manifest information.&lt;br /&gt;&lt;br /&gt;For an assembly with one associated file, the manifest is incorporated into the PE file to form a single-file assembly. You can create a multifile assembly with a standalone manifest file or with the manifest incorporated into one of the PE files in the assembly.&lt;br /&gt;&lt;br /&gt;Each assembly's manifest performs the following functions: &lt;br /&gt;• Enumerates the files that make up the assembly. &lt;br /&gt;• Governs how references to the assembly's types and resources map to the files that contain their declarations and implementations. &lt;br /&gt;• Enumerates other assemblies on which the assembly depends. &lt;br /&gt;• Provides a level of indirection between consumers of the assembly and the assembly's implementation details. &lt;br /&gt;• Renders the assembly self-describing. &lt;br /&gt;Assembly Manifest Contents&lt;br /&gt;The following table shows the information contained in the assembly manifest. The first four items — the assembly name, version number, culture, and strong name information — make up the assembly's identity.&lt;br /&gt;&lt;br /&gt;Information  Description&lt;br /&gt;Assembly name A text string specifying the assembly's name.&lt;br /&gt;Version number A major and minor version number, and a revision and build number. The common language runtime uses these numbers to enforce version policy.&lt;br /&gt;Culture Information on the culture or language the assembly supports. This information should be used only to designate an assembly as a satellite assembly containing culture- or language-specific information. (An assembly with culture information is automatically assumed to be a satellite assembly.)&lt;br /&gt;Strong name information The public key from the publisher if the assembly has been given a strong name.&lt;br /&gt;List of all files in the assembly A hash of each file contained in the assembly and a file name. Note that all files that make up the assembly must be in the same directory as the file containing the assembly manifest.&lt;br /&gt;Type reference information Information used by the runtime to map a type reference to the file that contains its declaration and implementation. This is used for types that are exported from the assembly.&lt;br /&gt;Information on referenced assemblies A list of other assemblies that are statically referenced by the assembly. Each reference includes the dependent assembly's name, assembly metadata (version, culture, operating system, and so on), and public key, if the assembly is strong named.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;36.    Where is version information stored of a assembly ? &lt;br /&gt;&lt;br /&gt;Manifest contains the version details. &lt;br /&gt; &lt;br /&gt;37.    Is versioning applicable to private assemblies?&lt;br /&gt;&lt;br /&gt;Versioning concepts apply only to public assembly. &lt;br /&gt; &lt;br /&gt;38.    What is strong names?&lt;br /&gt;&lt;br /&gt;Strong Name is a technology introduced with the .NET platform and it brings many possibilities into .NET applications. But many .NET developers still see Strong Names as security enablers (which is very wrong!) and not as a technology uniquely identifying assemblies.&lt;br /&gt;&lt;br /&gt;Assemblies can be assigned a cryptographic signature, called a strong name, which provides name uniqueness for the assembly and prevents someone from taking over the name of your assembly (name spoofing). If you are deploying an assembly that will be shared among many applications on the same machine, it must have a strong name. Even if you only use the assembly within your application, using a strong name ensures that the correct version of the assembly gets loaded&lt;br /&gt;&lt;br /&gt;Strong Names are not any security enhancement; they enable unique identification and side-by-side code execution.&lt;br /&gt;Strong Namesare used for :&lt;br /&gt;• Versioning &lt;br /&gt;• Authentication &lt;br /&gt;&lt;br /&gt;Versioning solves known problem called as "DLL hell". Signed assemblies are unique and Strong Names solves problem with namespace collisions (developers can distribute their assemblies even with the same file names as shown of figure below). Assemblies signed with Strong Names are uniquely identified and are protected and stored in different spaces. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Versioning solves known problem called as "DLL hell". Signed assemblies are unique and Strong Names solves problem with namespace collisions (developers can distribute their assemblies even with the same file names as shown of figure below). Assemblies signed with Strong Names are uniquely identified and are protected and stored in different spaces.&lt;br /&gt; &lt;br /&gt;39.   31) What is the difference between C# Boolean and C++ Boolean? &lt;br /&gt;&lt;br /&gt;In C# Boolean values (true, false) do not equate to integer variables. &lt;br /&gt; &lt;br /&gt;40.   What is Delay signing ? &lt;br /&gt;&lt;br /&gt;An organization can have a closely guarded key pair that developers do not have access to on a daily basis. The public key is often available, but access to the private key is restricted to only a few individuals. When developing assemblies with strong names, each assembly that references the strong-named target assembly contains the token of the public key used to give the target assembly a strong name. This requires that the public key be available during the development process.&lt;br /&gt;&lt;br /&gt;You can use delayed or partial signing at build time to reserve space in the portable executable (PE) file for the strong name signature, but defer the actual signing until some later stage (typically just before shipping the assembly).&lt;br /&gt;&lt;br /&gt;The following steps outline the process to delay sign an assembly: &lt;br /&gt;&lt;br /&gt;1.   Obtain the public key portion of the key pair from the organization that will do the eventual signing. Typically this key is in the form of an .snk file, which can be created using the Strong Name tool (Sn.exe) provided by the .NET Framework SDK. &lt;br /&gt;&lt;br /&gt;2.   Annotate the source code for the assembly with two custom attributes from System.Reflection: &lt;br /&gt;&lt;br /&gt;• AssemblyKeyFileAttribute, which passes the name of the file containing the public key as a parameter to its constructor. &lt;br /&gt;• AssemblyDelaySignAttribute, which indicates that delay signing is being used by passing true as a parameter to its constructor. &lt;br /&gt;For example: &lt;br /&gt;&lt;br /&gt;[Visual Basic] &lt;br /&gt;                   &lt;Assembly:AssemblyKeyFileAttribute("myKey.snk")&gt;&lt;br /&gt;                  &lt;Assembly:AssemblyDelaySignAttribute(true)&gt;&lt;br /&gt;&lt;br /&gt;[C#]&lt;br /&gt;                  [assembly:AssemblyKeyFileAttribute("myKey.snk")]&lt;br /&gt;                  [assembly:AssemblyDelaySignAttribute(true)]&lt;br /&gt;&lt;br /&gt;3.   The compiler inserts the public key into the assembly manifest and reserves space in the PE file for the full strong name signature. The real public key must be stored while the assembly is built so that other assemblies that reference this assembly can obtain the key to store in their own assembly reference. &lt;br /&gt;4.   Because the assembly does not have a valid strong name signature, the verification of that signature must be turned off. You can do this by using the –Vr option with the Strong Name tool. &lt;br /&gt;The following example turns off verification for an assembly called myAssembly.dll. &lt;br /&gt;&lt;br /&gt;sn –Vr myAssembly.dll&lt;br /&gt;&lt;br /&gt;5.   Later, usually just before shipping, you submit the assembly to your organization's signing authority for the actual strong name signing using the –R option with the Strong Name tool. &lt;br /&gt;The following example signs an assembly called myAssembly.dll with a strong name using the sgKey.snk key pair. &lt;br /&gt;&lt;br /&gt;sn -R myAssembly.dll sgKey.snk&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;41.    What is garbage collection? &lt;br /&gt;&lt;br /&gt;Short :&lt;br /&gt;Garbage collection is a CLR feature which automatically manages memory. Programmers forget&lt;br /&gt;to release the objects while coding. CLR automatically releases objects when they are no longer referenced and in use. CLR runs on non-deterministic to see the unused objects and cleans them. One side effect of this non-deterministic feature is that we cannot assume an object is destroyed when it goes out of the scope of a function. Therefore, we should not put code into a class destructor to release resources.&lt;br /&gt;Detailed :&lt;br /&gt;Every program uses resources of one sort or another -- memory buffers, network connections, database resources and so on. In fact, in an object-oriented environment, every type identifies some resource available for a program's use. To use any of these resources, memory must be allocated to represent the type. &lt;br /&gt;The steps required to access a resource are as follows: &lt;br /&gt;1. Allocate memory for the type that represents the resource. &lt;br /&gt;2. Initialize the memory to set the initial state of the resource and to make the resource usable. &lt;br /&gt;3. Use the resource by accessing the instance members of the type (repeat as necessary). &lt;br /&gt;4. Tear down the state of the resource to clean up. &lt;br /&gt;5. Free the memory. &lt;br /&gt;The garbage collector (GC) of .NET completely absolves the developer from tracking memory usage and knowing when to free memory. &lt;br /&gt;The Microsoft .NET CLR (common language runtime) requires that all resources be allocated from the managed heap. You never free objects from the managed heap -- objects are automatically freed when they are no longer needed by the application. &lt;br /&gt;&lt;br /&gt;Memory is not infinite. The garbage collector must perform a collection in order to free some memory. The garbage collector's optimizing engine determines the best time to perform a collection, (the exact criteria is guarded by Microsoft) based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory. &lt;br /&gt;&lt;br /&gt;However, for automatic memory management, the garbage collector has to know the location of the roots -- i.e. it should know when an object is no longer in use by the application. This knowledge is made available to the GC in .NET by the inclusion of a concept know as metadata. Every data type used in .NET software includes metadata that describes it. With the help of metadata, the CLR knows the layout of each of the objects in memory, which helps the garbage collector in the compaction phase of Garbage collection. Without this knowledge the garbage collector wouldn't know where one object instance ends and the next begins. &lt;br /&gt;&lt;br /&gt;Garbage collection algorithm &lt;br /&gt;&lt;br /&gt;Application roots &lt;br /&gt;Every application has a set of roots. Roots identify storage locations, which refer to objects on the managed heap or to objects that are set to null. &lt;br /&gt;For example: &lt;br /&gt;• All the global and static object pointers in an application. &lt;br /&gt;• Any local variable/parameter object pointers on a thread's stack. &lt;br /&gt;• Any CPU registers containing pointers to objects in the managed heap. &lt;br /&gt;• Pointers to the objects from Freachable queue &lt;br /&gt;&lt;br /&gt;The list of active roots is maintained by the just-in-time (JIT) compiler and common language runtime, and is made accessible to the garbage collector's algorithm. &lt;br /&gt;&lt;br /&gt;Implementation &lt;br /&gt;&lt;br /&gt;Garbage collection in .NET is done using tracing collection and specifically the CLR implements the mark/compact collector. This method consists of two phases as described below. &lt;br /&gt;Phase 1: Mark &lt;br /&gt;&lt;br /&gt;Find memory that can be reclaimed. &lt;br /&gt;When the garbage collector starts running, it makes the assumption that all objects in the heap are garbage. In other words, it assumes that none of the application's roots refer to any objects in the heap. &lt;br /&gt;&lt;br /&gt;The following steps are included in phase one: &lt;br /&gt;1. The GC identifies live object references or application roots. &lt;br /&gt;2. It starts walking the roots and building a graph of all objects reachable from the roots. &lt;br /&gt;3. If the GC attempts to add an object already present in the graph, then it stops walking down that path. This serves two purposes. First, it helps performance significantly, since it doesn't walk through a set of objects more than once. Second, it prevents infinite loops should you have any circular linked lists of objects. Thus cycles are handles properly. &lt;br /&gt;&lt;br /&gt;Once all the roots have been checked, the garbage collector's graph contains the set of all objects that are somehow reachable from the application's roots; any objects that are not in the graph are not accessible by the application, and are therefore considered garbage. &lt;br /&gt;&lt;br /&gt;Finalization &lt;br /&gt;&lt;br /&gt;The .NET Framework's garbage collection implicitly keeps track of the lifetime of the objects that an application creates, but fails when it comes to the unmanaged resources (i.e. a file, a window or a network connection) that objects encapsulate. &lt;br /&gt;&lt;br /&gt;The unmanaged resources must be explicitly released once the application has finished using them. The .NET Framework provides the Object.Finalize method, a method that the garbage collector must run on the object to clean up its unmanaged resources, prior to reclaiming the memory used up by the object. Since finalize method does nothing, by default, this method must be overridden if explicit cleanup is required. &lt;br /&gt;&lt;br /&gt;It would not be surprising if you will consider finalize just another name for destructors in C++. Though, both have been assigned the responsibility of freeing the resources used by the objects, they have very different semantics. In C++, destructors are executed immediately when the object goes out of scope, whereas a finalize method is called once garbage collection gets around to cleaning up an object. &lt;br /&gt;&lt;br /&gt;The potential existence of finalizers complicates the job of garbage collection in .NET by adding some extra steps before freeing an object. &lt;br /&gt;&lt;br /&gt;Whenever a new object with a finalize method is allocated on the heap, a pointer to the object is placed in an internal data structure called the finalization queue. When an object is not reachable, the garbage collector considers the object garbage. The garbage collector scans the finalization queue looking for pointers to these objects. When a pointer is found, the pointer is removed from the finalization queue and appended to another internal data structure called Freachable queue, making the object no longer a part of the garbage. At this point, the garbage collector has finished identifying garbage. The garbage collector compacts the reclaimable memory and the special runtime thread empties the freachable queue, executing each object's finalize method. &lt;br /&gt;&lt;br /&gt;The next time the garbage collector is invoked, it sees that the finalized objects are truly garbage and the memory for those objects is then, simply freed. &lt;br /&gt;&lt;br /&gt;Thus when an object requires finalization, it dies, then lives (resurrects) and finally dies again. It is recommended to avoid using finalize method, unless required. Finalize methods increase memory pressure by not letting the memory and the resources used by that object to be released, until two garbage collections. Since you do not have control on the order in which the finalize methods are executed, it may lead to unpredictable results. &lt;br /&gt;&lt;br /&gt;Weak references &lt;br /&gt;&lt;br /&gt;Weak references are a means of performance enhancement, used to reduce the pressure placed on the managed heap by large objects. &lt;br /&gt;&lt;br /&gt;When a root points to an object, it's called a strong reference to the object, and the object cannot be collected because the application's code can reach the object. &lt;br /&gt;&lt;br /&gt;When an object has a weak reference to it, it basically means that if there is a memory requirement and the garbage collector runs, the object can be collected; and when the application later attempts to access the object, the access will fail. On the other hand, to access a weakly referenced object, the application must obtain a strong reference to the object. If the application obtains this strong reference before the garbage collector collects the object, then the GC cannot collect the object because a strong reference to the object exists. &lt;br /&gt;&lt;br /&gt;The managed heap contains two internal data structures whose sole purpose is to manage weak references: the short weak reference table and the long weak reference table. &lt;br /&gt;&lt;br /&gt;Weak references are of two types: &lt;br /&gt;&lt;br /&gt;1. A short weak reference doesn't track resurrection -- i.e. the object which has a short weak reference to itself is collected immediately without running its finalization method. &lt;br /&gt;2. A long weak reference tracks resurrection -- i.e. the garbage collector collects object pointed to by the long weak reference table only after determining that the object's storage is reclaimable. If the object has a finalize method, the finalize method has been called and the object was not resurrected. &lt;br /&gt;&lt;br /&gt;These two tables simply contain pointers to objects allocated within the managed heap. Initially, both tables are empty. When you create a WeakReference object, an object is not allocated from the managed heap. Instead, an empty slot in one of the weak reference tables is located; short weak references use the short weak reference table and long weak references use the long weak reference table. &lt;br /&gt;&lt;br /&gt;Consider an example of what happens when the garbage collector runs. The diagrams (Figure 1 &amp; 2) below show the state of all the internal data structures before and after the GC runs. &lt;br /&gt; &lt;br /&gt;Now here's what happens when a garbage collection (GC) runs: &lt;br /&gt;1. The garbage collector builds a graph of all the reachable objects. In the above example, the graph will include objects B, C, E, G. &lt;br /&gt;2. The garbage collector scans the short weak reference table. If a pointer in the table refers to an object that is not part of the graph, then the pointer identifies an unreachable object and the slot in the short weak reference table is set to null. In the above example, slot of object D is set to null since it is not a part of the graph. &lt;br /&gt;3. The garbage collector scans the finalization queue. If a pointer in the queue refers to an object that is not part of the graph, then the pointer identifies an unreachable object and the pointer is moved from the finalization queue to the freachable queue. At this point, the object is added to the graph, since the object is now considered reachable. In the above example, though objects A, D, F are not included in the graph, they are treated as reachable objects because they are part of the finalization queue. Finalization queue thus gets emptied. &lt;br /&gt;4. The garbage collector scans the long weak reference table. If a pointer in the table refers to an object that is not part of the graph (which now contains the objects pointed to by entries in the freachable queue), then the pointer identifies an unreachable object and the slot is set to null. Since both the objects C and F are a part of the graph (of the previous step), none of them are set to null in the long reference table. &lt;br /&gt;5. The garbage collector compacts the memory, squeezing out the holes left by the unreachable objects. In the above example, object H is the only object that gets removed from the heap and it's memory is reclaimed. &lt;br /&gt; &lt;br /&gt;Generations &lt;br /&gt;&lt;br /&gt;Since garbage collection cannot complete without stopping the entire program, it can cause arbitrarily long pauses at arbitrary times during the execution of the program. Garbage collection pauses can also prevent programs from responding to events quickly enough to satisfy the requirements of real-time systems. &lt;br /&gt;&lt;br /&gt;One feature of the garbage collector that exists purely to improve performance is called generations. A generational garbage collector takes into account two facts that have been empirically observed in most programs in a variety of languages: &lt;br /&gt;1. Newly created objects tend to have short lives. &lt;br /&gt;2. The older an object is, the longer it will survive. &lt;br /&gt;&lt;br /&gt;Generational collectors group objects by age and collect younger objects more often than older objects. When initialized, the managed heap contains no objects. All new objects added to the heap can be said to be in generation 0, until the heap gets filled up which invokes garbage collection. As most objects are short-lived, only a small percentage of young objects are likely to survive their first collection. Once an object survives the first garbage collection, it gets promoted to generation 1.Newer objects after GC can then be said to be in generation 0. The garbage collector gets invoked next only when the sub-heap of generation 0 gets filled up. All objects in generation 1 that survive get compacted and promoted to generation 2. All survivors in generation 0 also get compacted and promoted to generation 1. Generation 0 then contains no objects, but all newer objects after GC go into generation 0. &lt;br /&gt;&lt;br /&gt;Thus, as objects "mature" (survive multiple garbage collections) in their current generation, they are moved to the next older generation. Generation 2 is the maximum generation supported by the runtime's garbage collector. When future collections occur, any surviving objects currently in generation 2 simply stay in generation 2. &lt;br /&gt;Therefore, dividing the heap into generations of objects and collecting and compacting younger generation objects improves the efficiency of the basic underlying garbage collection algorithm by reclaiming a significant amount of space from the heap, and also being faster than if the collector had examined the objects in all generations. &lt;br /&gt;&lt;br /&gt;A garbage collector that can perform generational collections, each of which is guaranteed (or at least very likely) to require less than a certain maximum amount of time, can help make runtime suitable for real-time environment and also prevent pauses that are noticeable to the user. &lt;br /&gt;&lt;br /&gt;Myths related to garbage collection &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;GC is necessarily slower than manual memory management. &lt;br /&gt;&lt;br /&gt;Counter explanation: Not necessarily. Modern garbage collectors appear to run as quickly as manual storage allocators (malloc/free or new/delete). Garbage collection probably will not run as quickly as customized memory allocator designed for use in a specific program. On the other hand, the extra code required to make manual memory management work properly (for example, explicit reference counting) is often more expensive than a garbage collector would be. &lt;br /&gt;&lt;br /&gt;GC will necessarily make my program pause. &lt;br /&gt;&lt;br /&gt;Counter explanation: Since garbage collectors usually stop the entire program while seeking and collecting garbage objects, they cause pauses long enough to be noticed by the users. But with the advent of modern optimization techniques, these noticeable pauses can be eliminated. &lt;br /&gt;&lt;br /&gt;Manual memory management won't cause pauses. &lt;br /&gt;&lt;br /&gt;Counter explanation: Manual memory management does not guarantee performance. It may cause pauses for considerable periods either on allocation or deallocation. &lt;br /&gt;&lt;br /&gt;Programs with GC are huge and bloated; GC isn't suitable for small programs or systems. &lt;br /&gt;&lt;br /&gt;Counter explanation: Though using garbage collection is advantageous in complex systems, there is no reason for garbage collection to introduce any significant overhead at any scale. &lt;br /&gt;&lt;br /&gt;I've heard that GC uses twice as much memory. &lt;br /&gt;&lt;br /&gt;Counter explanation: This may be true of primitive GCs, but this is not generally true of .NET garbage collection. The data structures used for GC need be no larger than those for manual memory management. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;42.    Is it true that objects don't always get destroyed immediately when the last reference goes away?&lt;br /&gt;&lt;br /&gt;Yes. The garbage collector offers no guarantees about the time when an object will be destroyed and its memory reclaimed. &lt;br /&gt; &lt;br /&gt;43.    Why doesn't the .NET runtime offer deterministic destruction? &lt;br /&gt;&lt;br /&gt;Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are ready to be destroyed and the memory reclaimed. The implication of this algorithm is that the runtime doesn't get notified immediately when the final reference on an object goes away - it only finds out during the next 'sweep' of the heap.&lt;br /&gt;&lt;br /&gt;Futhermore, this type of algorithm works best by performing the garbage collection sweep as rarely as possible. Normally heap exhaustion is the trigger for a collection sweep.&lt;br /&gt; &lt;br /&gt;44.    Is the lack of deterministic destruction in .NET a problem? &lt;br /&gt;&lt;br /&gt;It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way to tell the object to release the resource when it is done. Microsoft recommend that you provide a method called Dispose() for this purpose. However, this causes problems for distributed objects - in a distributed system who calls the Dispose() method? Some form of reference-counting or ownership-management mechanism is needed to handle distributed objects - unfortunately the runtime offers no help with this. &lt;br /&gt; &lt;br /&gt;45.    Should I implement Finalize on my class? Should I implement IDisposable? &lt;br /&gt;&lt;br /&gt;This issue is a little more complex than it first appears. There are really two categories of class that require deterministic destruction - the first category manipulate unmanaged types directly, whereas the second category manipulate managed types that require deterministic destruction. An example of the first category is a class with an IntPtr member representing an OS file handle. An example of the second category is a class with a System.IO.FileStream member.&lt;br /&gt;&lt;br /&gt;For the first category, it makes sense to implement IDisposable and override Finalize. This allows the object user to 'do the right thing' by calling Dispose, but also provides a fallback of freeing the unmanaged resource in the Finalizer, should the calling code fail in its duty. However this logic does not apply to the second category of class, with only managed resources. In this case implementing Finalize is pointless, as managed member objects cannot be accessed in the Finalizer. This is because there is no guarantee about the ordering of Finalizer execution. So only the Dispose method should be implemented. (If you think about it, it doesn't really make sense to call Dispose on member objects from a Finalizer anyway, as the member object's Finalizer will do the required cleanup.)&lt;br /&gt;&lt;br /&gt;Note that some developers argue that implementing a Finalizer is always a bad idea, as it hides a bug in your code (i.e. the lack of a Dispose call). A less radical approach is to implement Finalize but include a Debug.Assert at the start, thus signalling the problem in developer builds but allowing the cleanup to occur in release builds.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;46.    Do I have any control over the garbage collection algorithm? &lt;br /&gt;&lt;br /&gt;A little. For example the System.GC class exposes a Collect method, which forces the garbage collector to collect all unreferenced objects immediately.&lt;br /&gt;&lt;br /&gt;Also there is a gcConcurrent setting that can be specified via the application configuration file. This specifies whether or not the garbage collector performs some of its collection activities on a separate thread. The setting only applies on multi-processor machines, and defaults to true.&lt;br /&gt; &lt;br /&gt;47.    How can I find out what the garbage collector is doing? &lt;br /&gt;&lt;br /&gt;Lots of interesting statistics are exported from the .NET runtime via the '.NET CLR xxx' performance counters. Use Performance Monitor to view them.&lt;br /&gt; &lt;br /&gt;48.    What is the lapsed listener problem? &lt;br /&gt;&lt;br /&gt;The lapsed listener problem is one of the primary causes of leaks in .NET applications. It occurs when a subscriber (or 'listener') signs up for a publisher's event, but fails to unsubscribe. The failure to unsubscribe means that the publisher maintains a reference to the subscriber as long as the publisher is alive. For some publishers, this may be the duration of the application.&lt;br /&gt;&lt;br /&gt;This situation causes two problems. The obvious problem is the leakage of the subscriber object. The other problem is the performance degredation due to the publisher sending redundant notifications to 'zombie' subscribers. &lt;br /&gt;&lt;br /&gt;There are at least a couple of solutions to the problem. The simplest is to make sure the subscriber is unsubscribed from the publisher, typically by adding an Unsubscribe() method to the subscriber. &lt;br /&gt; &lt;br /&gt;49.    What is the difference between Finalize and Dispose (Garbage collection) ? &lt;br /&gt;&lt;br /&gt;Class instances often encapsulate control over resources that are not managed by the runtime, such as window handles (HWND), database connections, and so on. Therefore, you should provide both an explicit and an implicit way to free those resources. Provide implicit control by implementing the protected Finalize Method on an object (destructor syntax in C# and the Managed Extensions for C++). The garbage collector calls this method at some point after there are no longer any valid references to the object. In some cases, you might want to provide programmers using an object with the ability to explicitly release these external resources before the garbage collector frees the object. If an external resource is scarce or expensive, better performance can be achieved if the programmer explicitly releases resources when they are no longer being used. To provide explicit control, implement the Dispose method provided by the IDisposable Interface. The consumer of the object should call this method when it is done using the object. &lt;br /&gt;&lt;br /&gt;Dispose can be called even if other references to the object are alive. Note that even when you provide explicit control by way of Dispose, you should provide implicit cleanup using the Finalize method. Finalize provides a backup to prevent resources from permanently leaking if the programmer fails to call Dispose.&lt;br /&gt; &lt;br /&gt;50.    What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly? &lt;br /&gt;&lt;br /&gt;All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly.&lt;br /&gt;&lt;br /&gt;Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data across context/process/machine boundaries.&lt;br /&gt;&lt;br /&gt;Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember), or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder).&lt;br /&gt;&lt;br /&gt;Reflection generally means that a program can gain knowledge about its own structure. With .NET, Reflection describes the possibility - depending on security features - to detect mega data of a .NET-application and of the data types and functions contained therein.&lt;br /&gt;&lt;br /&gt;During the runtime, it is therefore possible that an application can determine its own functionality. For example, an application could be developed, which can be extended by functionality through the adding of the respective Assemblies - without changing the main program.&lt;br /&gt;&lt;br /&gt;51.    When do I need to use GC.KeepAlive? &lt;br /&gt;&lt;br /&gt;It's very unintuitive, but the runtime can decide that an object is garbage much sooner than you expect. More specifically, an object can become garbage while a method is executing on the object, which is contrary to most developers' expectations. &lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;      using System;&lt;br /&gt;    using System.Runtime.InteropServices;&lt;br /&gt;    class Win32&lt;br /&gt;    {&lt;br /&gt;        [DllImport("kernel32.dll")] &lt;br /&gt;        public static extern IntPtr CreateEvent( IntPtr lpEventAttributes, &lt;br /&gt;            bool bManualReset,bool bInitialState, string lpName);&lt;br /&gt;        [DllImport("kernel32.dll", SetLastError=true)] &lt;br /&gt;        public static extern bool CloseHandle(IntPtr hObject);&lt;br /&gt;        [DllImport("kernel32.dll")] &lt;br /&gt;        public static extern bool SetEvent(IntPtr hEvent);&lt;br /&gt;    }&lt;br /&gt;    class EventUser&lt;br /&gt;    {&lt;br /&gt;        public EventUser() &lt;br /&gt;        { &lt;br /&gt;            hEvent = Win32.CreateEvent( IntPtr.Zero, false, false, null ); &lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        ~EventUser() &lt;br /&gt;        { &lt;br /&gt;            Win32.CloseHandle( hEvent ); &lt;br /&gt;            Console.WriteLine("EventUser finalized");&lt;br /&gt;        }&lt;br /&gt;        public void UseEvent() &lt;br /&gt;        { &lt;br /&gt;            UseEventInStatic( this.hEvent ); &lt;br /&gt;        }&lt;br /&gt;        static void UseEventInStatic( IntPtr hEvent )&lt;br /&gt;        {&lt;br /&gt;            //GC.Collect();&lt;br /&gt;            bool bSuccess = Win32.SetEvent( hEvent );&lt;br /&gt;            Console.WriteLine( "SetEvent " + (bSuccess ? "succeeded" : "FAILED!") );&lt;br /&gt;        }&lt;br /&gt;        IntPtr hEvent;&lt;br /&gt;    }&lt;br /&gt;    class App&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            EventUser eventUser = new EventUser();&lt;br /&gt;            eventUser.UseEvent();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;If you run this code, it'll probably work fine, and you'll get the following output:&lt;br /&gt;      SetEvent succeeded&lt;br /&gt;    EventDemo finalized&lt;br /&gt;However, if you uncomment the GC.Collect() call in the UseEventInStatic() method, you'll get this output:&lt;br /&gt;&lt;br /&gt;      EventDemo finalized&lt;br /&gt;    SetEvent FAILED!&lt;br /&gt;(Note that you need to use a release build to reproduce this problem.)&lt;br /&gt;&lt;br /&gt;So what's happening here? Well, at the point where UseEvent() calls UseEventInStatic(), a copy is taken of the hEvent field, and there are no further references to the EventUser object anywhere in the code. So as far as the runtime is concerned, the EventUser object is garbage and can be collected. Normally of course the collection won't happen immediately, so you'll get away with it, but sooner or later a collection will occur at the wrong time, and your app will fail. &lt;br /&gt;&lt;br /&gt;A solution to this problem is to add a call to GC.KeepAlive(this) to the end of the UseEvent method &lt;br /&gt; &lt;br /&gt;52.    Explain how the objects are created and destroyed ? or Explain object life time? &lt;br /&gt;&lt;br /&gt;An instance of a class, an object, is created by using the New keyword. Initialization tasks often must be performed on new objects before they are used. Common initialization tasks include opening files, connecting to databases, and reading values of registry keys. Microsoft Visual Basic 2005 controls the initialization of new objects using procedures called constructors (special methods that allow control over initialization).&lt;br /&gt;&lt;br /&gt;After an object leaves scope, it is released by the common language runtime (CLR). Visual Basic 2005 controls the release of system resources using procedures called destructors. Together, constructors and destructors support the creation of robust and predictable class libraries.&lt;br /&gt; &lt;br /&gt;Sub New and Sub Finalize&lt;br /&gt; &lt;br /&gt;The Sub New and Sub Finalize procedures in Visual Basic 2005 initialize and destroy objects; they replace the Class_Initialize and Class_Terminate methods used in Visual Basic 6.0 and earlier versions. Unlike Class_Initialize, the Sub New constructor can run only once when a class is created. It cannot be called explicitly anywhere other than in the first line of code of another constructor from either the same class or from a derived class. Furthermore, the code in the Sub New method always runs before any other code in a class. Visual Basic 2005 implicitly creates a Sub New constructor at run time if you do not explicitly define a Sub New procedure for a class.&lt;br /&gt;&lt;br /&gt;Before releasing objects, the CLR automatically calls the Finalize method for objects that define a Sub Finalize procedure. The Finalize method can contain code that needs to execute just before an object is destroyed, such as code for closing files and saving state information. There is a slight performance penalty for executing Sub Finalize, so you should define a Sub Finalize method only when you need to release objects explicitly.&lt;br /&gt;&lt;br /&gt;The garbage collector in the CLR does not (and cannot) dispose of unmanaged objects, objects that the operating system executes directly, outside the CLR environment. This is because different unmanaged objects must be disposed of in different ways. That information is not directly associated with the unmanaged object; it must be found in the documentation for the object. A class that uses unmanaged objects must dispose of them in its Finalize method.&lt;br /&gt;&lt;br /&gt;The Finalize destructor is a protected method that can be called only from the class it belongs to, or from derived classes. The system calls Finalize automatically when an object is destroyed, so you should not explicitly call Finalize from outside of a derived class's Finalize implementation. &lt;br /&gt;&lt;br /&gt;Unlike Class_Terminate, which executes as soon as an object is set to nothing, there is usually a delay between when an object loses scope and when Visual Basic 2005 calls the Finalize destructor. Visual Basic 2005 allows for a second kind of destructor, Dispose, which can be explicitly called at any time to immediately release resources.&lt;br /&gt;&lt;br /&gt;A Finalize destructor should not throw exceptions, because they cannot be handled by the application and can cause the application to terminate.&lt;br /&gt; &lt;br /&gt;IDisposable Interface&lt;br /&gt; &lt;br /&gt;Class instances often control resources not managed by the CLR, such as Windows handles and database connections. These resources must be disposed of in the Finalize method of the class, so that they will be released when the object is destroyed by the garbage collector. However, the garbage collector destroys objects only when the CLR requires more free memory. This means that the resources may not be released until long after the object goes out of scope.&lt;br /&gt;To supplement garbage collection, your classes can provide a mechanism to actively manage system resources if they implement the IDisposable interface. IDisposable has one method, Dispose, which clients should call when they finish using an object. You can use the Dispose method to immediately release resources and perform tasks such as closing files and database connections. Unlike the Finalize destructor, the Dispose method is not called automatically. Clients of a class must explicitly call Dispose when you want to immediately release resources. &lt;br /&gt;Implementing IDisposable&lt;br /&gt;A class that implements the IDisposable interface should include these sections of code:&lt;br /&gt; &lt;br /&gt;• A field for keeping track of whether the object has been disposed: &lt;br /&gt;  Protected disposed As Boolean = False&lt;br /&gt;• An overload of the Dispose that frees the class's resources. This method should be called by the Dispose and Finalize methods of the base class: &lt;br /&gt;  Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not Me.disposed Then If disposing Then ' Insert code to free unmanaged resources. End If ' Insert code to free shared resources. End If Me.disposed = True End Sub&lt;br /&gt;• An implementation of Dispose that contains only the following code: &lt;br /&gt;  Public Sub Dispose() Implements IDisposable.Dispose Dispose(True) GC.SuppressFinalize(Me) End Sub&lt;br /&gt;o An override of the Finalize method that contains only the following code: &lt;br /&gt;  Protected Overrides Sub Finalize() Dispose(False) MyBase.Finalize() End Sub&lt;br /&gt;Deriving from a Class that Implements IDisposable&lt;br /&gt; &lt;br /&gt;A class that derives from a base class that implements the IDisposable interface does not need to override any of the base methods unless it uses additional resources that need to be disposed. In that situation, the derived class should override the base class's Dispose(disposing) method to dispose of the derived class's resources. This override must call the base class's Dispose(disposing) method.&lt;br /&gt; &lt;br /&gt;  Protected Overrides Sub Dispose(ByVal disposing As Boolean) If Not Me.disposed Then If disposing Then ' Insert code to free unmanaged resources. End If ' Insert code to free shared resources. End If MyBase.Dispose(disposing) End Sub&lt;br /&gt;A derived class should not override the base class's Dispose and Finalize methods. When those methods are called from an instance of the derived class, the base class's implementation of those methods call the derived class's override of the Dispose(disposing) method.&lt;br /&gt; &lt;br /&gt;Visualization&lt;br /&gt; &lt;br /&gt;The following diagram shows which methods are inherited and which methods are overridden in the derived class.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;When this Dispose Finalize pattern is followed, the resources of the derived class and base class are correctly disposed. The following diagram shows which methods get called when the classes are disposed and finalized.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Garbage Collection and the Finalize Destructor&lt;br /&gt; &lt;br /&gt;The .NET Framework uses the reference-tracing garbage collection system to periodically release unused resources. Visual Basic 6.0 and earlier versions used a different system called reference counting to manage resources. Although both systems perform the same function automatically, there are a few important differences.&lt;br /&gt;&lt;br /&gt;The CLR periodically destroys objects when the system determines that such objects are no longer needed. Objects are released more quickly when system resources are in short supply, and less frequently otherwise. The delay between when an object loses scope and when the CLR releases it means that, unlike with objects in Visual Basic 6.0 and earlier versions, you cannot determine exactly when the object will be destroyed. In such a situation, objects are said to have non-deterministic lifetime. In most cases, non-deterministic lifetime does not change how you write applications, as long as you remember that the Finalize destructor may not immediately execute when an object loses scope.&lt;br /&gt;&lt;br /&gt;Another difference between the garbage-collection systems involves the use of Nothing. To take advantage of reference counting in Visual Basic 6.0 and earlier versions, programmers sometimes assigned Nothing to object variables to release the references those variables held. If the variable held the last reference to the object, the object's resources were released immediately. In Visual Basic 2005, while there may be cases in which this procedure is still valuable, performing it never causes the referenced object to release its resources immediately. To release resources immediately, use the object's Dispose method, if available. The only time you should set a variable to Nothing is when its lifetime is long relative to the time the garbage collector takes to detect orphaned objects.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;53.    What are different type of JIT ? &lt;br /&gt;&lt;br /&gt;In Microsoft .NET there are three types of JIT compilers:&lt;br /&gt;• Pre-JIT. Pre-JIT compiles complete source code into native code in a single compilation cycle. This is done at the time of deployment of the application. &lt;br /&gt;• Kcono-JIT. Econo-JIT compiles only those methods that are called at runtime. However, these compiled methods are removed when they arc not required. &lt;br /&gt;• Normal-JIT. Normal-JIT compiles only those methods that are called at runtime. These methods are compiled the first time they are called, and then they are stored in cache. When the same methods are called again, the compiled code from cache is used for execution. &lt;br /&gt; &lt;br /&gt;54.    What are Value types and Reference types ? &lt;br /&gt;&lt;br /&gt;Reference Type:&lt;br /&gt;Reference types are allocated on the managed CLR heap, just like object types.&lt;br /&gt;A data type that is stored as a reference to the value's location. The value of a reference type is the location of the sequence of bits &lt;br /&gt;that represent the type's data. Reference types can be self-describing types, pointer types, or interface types&lt;br /&gt; &lt;br /&gt;Value Type:&lt;br /&gt;&lt;br /&gt;Value types are allocated on the stack just like primitive types in VBScript, VB6 and C/C++. Value types are not instantiated using new go out of scope when the function they are defined within returns.&lt;br /&gt;Value types in the CLR are defined as types that derive from  system.valueType.&lt;br /&gt; &lt;br /&gt;A data type that fully describes a value by specifying the sequence of bits that constitutes the value's representation. Type information for a value type instance is not stored with the instance at run time, but it is available in metadata. Value type instances can be treated as objects using boxing. &lt;br /&gt; &lt;br /&gt;55.    What is concept of Boxing and Unboxing ? &lt;br /&gt;&lt;br /&gt;Boxing:&lt;br /&gt;&lt;br /&gt;The conversion of a value type instance to an object, which implies that the instance will carry full type information at run time and will be allocated in the heap. The Microsoft intermediate language (MSIL) instruction set's box instruction converts a value type to an object by making a copy of the value type and embedding it in a newly allocated object.&lt;br /&gt; &lt;br /&gt;Un-Boxing:&lt;br /&gt;&lt;br /&gt;The conversion of an object instance to a value type. &lt;br /&gt;  Dim x As Integer &lt;br /&gt;Dim y As Object&lt;br /&gt; x = 10&lt;br /&gt; boxing process &lt;br /&gt;y = x&lt;br /&gt;unboxing process &lt;br /&gt;x = y&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;56.    What is difference between constants, readonly and, static ? &lt;br /&gt;&lt;br /&gt;Constants :  The value can’t be changed &lt;br /&gt;Read-only  :  The value will be initialized only once from the constructor of the class.&lt;br /&gt;Static   : Value can be initialized once.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;57.  What's difference between VB.NET and C# ? &lt;br /&gt;&lt;br /&gt;Advantages VB.NET &lt;br /&gt; &lt;br /&gt;• Has support for optional parameters which makes COM interoperability much easy. &lt;br /&gt;• With Option Strict off late .binding is supported.Legacy VB functionalities can be used by using Microsoft.VisualBasic namespace. &lt;br /&gt;• Has the WITH construct which is not in C#. &lt;br /&gt;• The VB.NET part of Visual Studio .NET compiles your code in the background. While this is considered an advantage for small projects, people creating very large projects have found that the IDE slows down considerably as the project gets larger. &lt;br /&gt;Advantages ofC# &lt;br /&gt; &lt;br /&gt;• XMI. documentation is generated from source code but this is now been incorporated in Whidbey. &lt;br /&gt;• Operator overloading which is not in current VB.NET but is been introduced in hidbey. &lt;br /&gt;• The using statement, which makes unmanaged resource disposal simple. &lt;br /&gt;• Access to Unsafe code. This allows pointer arithmetic etc, and can improve performance in some situations. However, it is not to be used lightly, as a lot of the normal safety of C# is lost (as the name implies).This is the major difference that you can access unmanaged code in C# and not in VB.NET. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;58.    What's difference between System exceptions and Application exceptions?&lt;br /&gt;&lt;br /&gt;The difference between ApplicationException and SystemException is that SystemExceptions are thrown by the CLR, and ApplicationExceptions are thrown by Applications. For example, SqlException inherits from SystemException. Included here to make this list complete, there should not be any circumstances where one would need to inherit from SystemException.&lt;br /&gt; &lt;br /&gt;System.Exception&lt;br /&gt; &lt;br /&gt;If extending the base exception class with additional members, inherit from System.Exception. The name of such inherited classes should end with “Exception.”  &lt;br /&gt;&lt;br /&gt;Properly, System.Exception should have been declared as abstract with a recommendation to be inherited only by concrete exception classes. Doing so would have avoided the question of which to use right from the start, and would have also helped MS with versioning. However, since things are what they are, in this situation it makes sense to inherit and extend System.Exception. The rule to tend towards a flat hierarchy wins. Inherit from System.Exception when creating a class which adds members.&lt;br /&gt;  &lt;br /&gt;System.ApplicationException&lt;br /&gt; &lt;br /&gt;Applications often provide their own custom exception types (e.g. CmsException, SharePointException) which do not add properties or methods, but simply subclass System.ApplicationException with a new name. If more detailed expections are required for the application, they will then inherit from this base class. This makes it convenient to throw application-specific exceptions that can be identified distinctly inside a try-catch block. When doing the same for your own applications, inherit from System.ApplicationException. &lt;br /&gt;For both System.Exception and System.Application, the rules are consistent in this way: they work with the Framework as it is, not as we would like it to be. Since ApplicationException exists and is in common use, it would be a deviation to derive application-specific exceptions directly from System.Exception. So while you still won't catch ApplicationException directly, you should certainly catch its descendants.&lt;br /&gt; &lt;br /&gt;59.    What is namespace used for loading assemblies at run time and name the methods? &lt;br /&gt;&lt;br /&gt;System.Reflection &lt;br /&gt; &lt;br /&gt;60.    What is Code Access security &lt;br /&gt;&lt;br /&gt;CAS is the part of the .NET security model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk. &lt;br /&gt;&lt;br /&gt;61.    How does CAS work? &lt;br /&gt;&lt;br /&gt;The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set.&lt;br /&gt;&lt;br /&gt;For example, using the default security policy, a control downloaded from a web site belongs to the 'Zone - Internet' code group, which adheres to the permissions defined by the 'Internet' named permission set. (Naturally the 'Internet' named permission set represents a very restrictive range of permissions.)&lt;br /&gt; &lt;br /&gt;62.    Who defines the CAS code groups? &lt;br /&gt;&lt;br /&gt;Microsoft defines some default ones, but you can modify these and even create your own. To see the code groups defined on your system, run 'caspol -lg' from the command-line. On my system it looks like this: &lt;br /&gt;  &lt;br /&gt;     Level = Machine&lt;br /&gt;   Code Groups:&lt;br /&gt;   1.  All code: Nothing&lt;br /&gt;   1.1.  Zone - MyComputer: FullTrust&lt;br /&gt;      1.1.1.  Honor SkipVerification requests: SkipVerification&lt;br /&gt;   1.2.  Zone - Intranet: LocalIntranet&lt;br /&gt;   1.3.  Zone - Internet: Internet&lt;br /&gt;   1.4.  Zone - Untrusted: Nothing&lt;br /&gt;   1.5.  Zone - Trusted: Internet&lt;br /&gt;   1.6.  StrongName -&lt;br /&gt; 0024000004800000940000000602000000240000525341310004000003&lt;br /&gt; 000000CFCB3291AA715FE99D40D49040336F9056D7886FED46775BC7BB5430BA4444FEF8348EBD06&lt;br /&gt; F962F39776AE4DC3B7B04A7FE6F49F25F740423EBF2C0B89698D8D08AC48D69CED0FC8F83B465E08&lt;br /&gt; 07AC11EC1DCC7D054E807A43336DDE408A5393A48556123272CEEEE72F1660B71927D38561AABF5C&lt;br /&gt; AC1DF1734633C602F8F2D5: Everything&lt;br /&gt;Note the hierarchy of code groups - the top of the hierarchy is the most general ('All code'), which is then sub-divided into several groups, each of which in turn can be sub-divided. Also note that (somewhat counter-intuitively) a sub-group can be associated with a more permissive permission set than its parent. &lt;br /&gt; &lt;br /&gt;63.    How do I define my own code group? &lt;br /&gt;&lt;br /&gt;Use caspol. For example, suppose you trust code from www.mydomain.com and you want it have full access to your system, but you want to keep the default restrictions for all other internet sites. To achieve this, you would add a new code group as a sub-group of the 'Zone - Internet' group, like this:&lt;br /&gt;   caspol -ag 1.3 -site www.mydomain.com FullTrust &lt;br /&gt;Now if you run caspol -lg you will see that the new group has been added as group 1.3.1:&lt;br /&gt;   ...&lt;br /&gt;    1.3.  Zone - Internet: Internet&lt;br /&gt;       1.3.1.  Site - www.mydomain.com: FullTrust&lt;br /&gt; ...&lt;br /&gt;Note that the numeric label (1.3.1) is just a caspol invention to make the code groups easy to manipulate from the command-line. The underlying runtime never sees it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-5214436758176690237?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/5214436758176690237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/net-framework-interview-questions.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/5214436758176690237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/5214436758176690237'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/net-framework-interview-questions.html' title='.Net Framework Interview Questions'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-2601480145722829696</id><published>2009-10-20T03:46:00.000-07:00</published><updated>2009-10-20T03:48:19.680-07:00</updated><title type='text'>Difference between shadowing and overriden</title><content type='html'>Shadowing :- This is a VB.Net Concept by which you can provide a new implementation for the base class member without overriding the member. You can shadow a base class member in the derived class by using the keyword Shadows . The method signature access level and return type of the shadowed member can be completely different than the base class member.&lt;br /&gt;&lt;br /&gt;Hiding : - This is a C# Concept by which you can provide a new implementation for the base class member without overriding the member. You can hide a base class member in the derived class by using the keyword new . The method signature access level and return type of the hidden member has to be same as the base class member.Comparing the three :-&lt;br /&gt;&lt;br /&gt;1) The access level signature and the return type can only be changed when you are shadowing with VB.NET. Hiding and overriding demands the these parameters as same.&lt;br /&gt;&lt;br /&gt;2) The difference lies when you call the derived class object with a base class variable.In class of overriding although you assign a derived class object to base class variable it will call the derived class function. In case of shadowing or hiding the base class function will be called.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-2601480145722829696?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/2601480145722829696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/difference-between-shadowing-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2601480145722829696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2601480145722829696'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/difference-between-shadowing-and.html' title='Difference between shadowing and overriden'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-749132427031576521</id><published>2009-10-20T02:55:00.000-07:00</published><updated>2009-10-20T02:57:25.711-07:00</updated><title type='text'>Difference between Constant and Readonly</title><content type='html'>&lt;strong&gt; Constant : &lt;/strong&gt;The constants are the one whose value remain same at all the time.&lt;br /&gt;it will be used if u want to define something at compile time.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Read only:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;if you don't know value at compile time but u can find that at runtime that time u can use readonly ..&lt;br /&gt;&lt;br /&gt;Read only are the things which are not to allowed to alter by the user but it can be altered by itself. Readonly is generally use in Constructor of the classes.&lt;br /&gt;&lt;br /&gt;Like the path of the application exe is read only. If you copy exe to some other directory the path will change. But still it is read only&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-749132427031576521?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/749132427031576521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/difference-between-constant-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/749132427031576521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/749132427031576521'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/difference-between-constant-and.html' title='Difference between Constant and Readonly'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-7320779322280947850</id><published>2009-10-20T02:46:00.000-07:00</published><updated>2009-10-20T02:47:03.197-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interface Vs Delegate'/><title type='text'>Interface Vs Delegate</title><content type='html'>Interfaces allow us to extend some object's functionality, it's a contract&lt;br /&gt;between the interface and the object that implements it. It is used to&lt;br /&gt;simulate multiple inheritance in C#. In the other hand, we have delegates...&lt;br /&gt;They're just safe callbacks or function pointers. They allow us to notify&lt;br /&gt;that something has happened (Events). As you can see they're different as&lt;br /&gt;well as their use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-7320779322280947850?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/7320779322280947850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/interface-vs-delegate.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/7320779322280947850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/7320779322280947850'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/interface-vs-delegate.html' title='Interface Vs Delegate'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6693730820264290736</id><published>2009-10-19T04:05:00.000-07:00</published><updated>2009-10-19T04:10:21.792-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Questions on UML'/><title type='text'>Interview Questions on UML</title><content type='html'>What is UML? &lt;br /&gt;&lt;br /&gt;UML is Unified Modeling Language. It is a graphical language for visualizing specifying constructing and documenting the artifacts of the system. It allows you to create a blue print of all the aspects of the system, before actually physically implementing the system.&lt;br /&gt;&lt;br /&gt;What is modeling? What are the advantages of creating a model? &lt;br /&gt;&lt;br /&gt;Modeling is a proven and well-accepted engineering technique which helps build a model. Model is a simplification of reality; it is a blueprint of the actual system that needs to be built. Model helps to visualize the system. Model helps to specify the structural and behavior of the system. Model helps make templates for constructing the system. Model helps document the system.&lt;br /&gt;&lt;br /&gt;What are the different views that are considered when building an object-oriented software system? &lt;br /&gt;&lt;br /&gt;Normally there are 5 views. Use Case view - This view exposes the requirements of a system. Design View - Capturing the vocabulary. Process View - modeling the distribution of the systems processes and threads. Implementation view - addressing the physical implementation of the system. Deployment view - focus on the modeling the components required for deploying the system.&lt;br /&gt;What are diagrams? Diagrams are graphical representation of a set of elements most often shown made of things and associations.&lt;br /&gt;&lt;br /&gt;What are the major three types of modeling used? &lt;br /&gt;Major three types of modeling are structural, behavioral, and architectural.&lt;br /&gt;&lt;br /&gt;Mention the different kinds of modeling diagrams used? &lt;br /&gt;Modeling diagrams that are commonly used are, there are 9 of them. Use case diagram, Class Diagram, Object Diagram, Sequence Diagram, statechart Diagram, Collaboration Diagram, Activity Diagram, Component diagram, Deployment Diagram.&lt;br /&gt;&lt;br /&gt;What is Architecture? &lt;br /&gt;Architecture is not only taking care of the structural and behavioral aspect of a software system but also taking into account the software usage, functionality, performance, reuse, economic and technology constraints.&lt;br /&gt;&lt;br /&gt;What is SDLC? &lt;br /&gt;SDLC is Software Development Life Cycle. SDLC of a system included processes that are Use case driven, Architecture centric and Iterative and Incremental. This Life cycle is divided into phases. Phase is a time span between two milestones. The milestones are Inception, Elaboration, Construction, and Transition. Process Workflows that evolve through these phase are Business Modeling, Requirement gathering, Analysis and Design, Implementation, Testing, Deployment. Supporting Workflows are Configuration and change management, Project management.&lt;br /&gt;&lt;br /&gt;What are Relationships? &lt;br /&gt;There are different kinds of relationships: Dependencies, Generalization, and Association. Dependencies are relations ships between two entities that that a change in specification of one thing may affect another thing. Most commonly it is used to show that one class uses another class as an argument in the signature of the operation. Generalization is relationships specified in the class subclass scenario, it is shown when one entity inherits from other. Associations are structural relationships that are: a room has walls, Person works for a company. Aggregation is a type of association where there is a has a relation ship, That is a room has walls, Ã±o if there are two classes room and walls then the relation ship is called a association and further defined as an aggregation.&lt;br /&gt;&lt;br /&gt;How are the diagrams divided? &lt;br /&gt;The nine diagrams are divided into static diagrams and dynamic diagrams.&lt;br /&gt;Static Diagrams (Also called Structural Diagram): Class diagram, Object diagram, Component Diagram, Deployment diagram.&lt;br /&gt;Dynamic Diagrams (Also called Behavioral Diagrams): Use Case Diagram, Sequence Diagram, Collaboration Diagram, Activity diagram, Statechart diagram.&lt;br /&gt;&lt;br /&gt;What are Messages? A message is the specification of a communication, when a message is passed that results in action that is in turn an executable statement.&lt;br /&gt;&lt;br /&gt;What is an Use Case? &lt;br /&gt;A use case specifies the behavior of a system or a part of a system, Ã³se cases are used to capture the behavior that need to be developed. It involves the interaction of actors and the system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6693730820264290736?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6693730820264290736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/interview-questions-on-uml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6693730820264290736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6693730820264290736'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/10/interview-questions-on-uml.html' title='Interview Questions on UML'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-8226142315040297716</id><published>2009-09-28T21:52:00.000-07:00</published><updated>2009-09-28T21:53:28.063-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><title type='text'>What is observableCollection in WPF</title><content type='html'>In many cases the data that you work with is a collection of objects. For example, a common scenario in data binding is to use anItemsControl such as a ListBox, ListView, or TreeView to display a collection of records.&lt;br /&gt;You can enumerate over any collection that implements the IEnumerable interface. However, to set up dynamic bindings so that insertions or deletions in the collection update the UI automatically, the collection must implement the INotifyCollectionChanged interface. This interface exposes the CollectionChanged event, an event that should be raised whenever the underlying collection changes.&lt;br /&gt;WPF provides the ObservableCollection(T) class, which is a built-in implementation of a data collection that implements theINotifyCollectionChanged interface.&lt;br /&gt;Before implementing your own collection, consider using ObservableCollection(T) or one of the existing collection classes, such as List(T),Collection(T), and BindingList(T), among many others. If you have an advanced scenario and want to implement your own collection, consider using IList, which provides a non-generic collection of objects that can be individually accessed by index. Implementing IList provides the best performance with the data binding engine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-8226142315040297716?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/8226142315040297716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/09/what-is-observablecollection-in-wpf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/8226142315040297716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/8226142315040297716'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/09/what-is-observablecollection-in-wpf.html' title='What is observableCollection in WPF'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-2365908049468185228</id><published>2009-09-17T23:08:00.000-07:00</published><updated>2009-09-17T23:09:37.097-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SaaS'/><title type='text'>What is SaaS</title><content type='html'>Software as a service (or SaaS) is a way of delivering applications over the Internet—as a service. Instead of installing and maintaining software, you simply access it via the Internet, freeing yourself from complex software and hardware management.&lt;br /&gt;&lt;br /&gt;SaaS applications are sometimes called Web-based software, on-demand software, or hosted software. Whatever the name, SaaS applications run on a SaaS provider’s servers. The provider manages access to the application, including security, availability, and performance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-2365908049468185228?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/2365908049468185228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/09/what-is-saas.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2365908049468185228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2365908049468185228'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/09/what-is-saas.html' title='What is SaaS'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-358724796977565331</id><published>2009-09-12T04:53:00.001-07:00</published><updated>2009-09-12T04:53:54.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><title type='text'>What are the three kinds of routed events in WPF and how do they differ?</title><content type='html'>Routed events in WPF are direct, tunneling a bubbling. A direct event can be raised only by the element in which it originated. A bubbling event is raised first by the element in which it originates and then is raised by each successive container in the visual tree. A tunneling event is raised first by the topmost container in the visual tree and then down through each successive container until it is finally raised by the element in which it originated. Tunneling and bubbling events allow elements of the user interface to respond to events raised by their contained elements.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-358724796977565331?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/358724796977565331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/09/what-are-three-kinds-of-routed-events.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/358724796977565331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/358724796977565331'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/09/what-are-three-kinds-of-routed-events.html' title='What are the three kinds of routed events in WPF and how do they differ?'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6394178538935188649</id><published>2009-09-10T23:57:00.000-07:00</published><updated>2009-09-11T00:02:49.796-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><title type='text'>What is the difference between Navigation applicaton and XBAPs in WPF?</title><content type='html'>While both are page-based applications. Navigation Page application are used for navigation applicated hosted with full trust policy that makes them ideal for deployment in secure environment. XBAPs are generally design for Window Explorer and are not locally installed. They are partial trust application restricted to use local file system, Database, registries and other sensitive resources and this makes them ideal for wide distribution&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6394178538935188649?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6394178538935188649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/09/what-is-difference-between-navigation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6394178538935188649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6394178538935188649'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/09/what-is-difference-between-navigation.html' title='What is the difference between Navigation applicaton and XBAPs in WPF?'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6353488950787772970</id><published>2009-08-03T04:23:00.000-07:00</published><updated>2009-08-03T04:24:24.679-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.net Interview Questions'/><title type='text'>What is Code Replacement in ASP.Net 2.0</title><content type='html'>.NET Framework assemblies are typically compiled and deployed into a Windows DLL-based PE format. When the common language runtime's loader resolves a class implemented within this type of assembly, it calls the Windows LoadLibrary routine on the file (which locks its access on disk), and then maps the appropriate code data into memory for run-time execution. Once loaded, the DLL file will remain locked on disk until the application domain referencing it is either torn down or manually recycled. &lt;br /&gt;&lt;br /&gt;Although ASP.NET cannot prevent the common language runtime from locking a loaded assembly DLL on disk, it can support you by ensuring that the physical DLLs in a Web application's private assembly cache are never actually loaded by the runtime. Instead, shadow copies of the assembly DLLs are made immediately prior to their use. These shadow assemblies--not the original files--are then locked and loaded by the runtime. &lt;br /&gt;&lt;br /&gt;Because the original assembly files always remain unlocked, you are free to delete, replace, or rename them without cycling the Web server or having to use a registration utility. FTP and similar methods work just fine. ASP.NET maintains an active list of all assemblies loaded within a particular application's application domain and uses file-change monitoring code to watch for any updates to the original files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6353488950787772970?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6353488950787772970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/08/what-is-code-replacement-in-aspnet-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6353488950787772970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6353488950787772970'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/08/what-is-code-replacement-in-aspnet-20.html' title='What is Code Replacement in ASP.Net 2.0'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-3940301269395626951</id><published>2009-07-24T02:44:00.001-07:00</published><updated>2009-07-24T02:44:42.277-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Difference between Overriding and Overloading</title><content type='html'>Difference between Overriding and Overloading&lt;br /&gt;&lt;br /&gt;Overriding is the example of run-time polymorphism and&lt;br /&gt;Overloading is the example of compile-time polymorphism.&lt;br /&gt;&lt;br /&gt;Overriding&lt;br /&gt;■The return type must exactly match that of the overridden method.&lt;br /&gt;■The access level must not be more restrictive than that of the overridden method.&lt;br /&gt;■The access level can be less restrictive than that of the overridden method.&lt;br /&gt;■The overriding method must not throw new or broader checked exceptions than those declared by the overridden method. &lt;br /&gt;■The overriding method can throw narrower or fewer exceptions. Just because an overridden method “takes risks” doesn’t mean that the overriding subclass’ exception takes the same risks. Bottom line: An overriding method doesn’t have to declare any exceptions that it will never throw, regardless of what the overridden method declares.&lt;br /&gt;■You cannot override a method marked final.&lt;br /&gt;■If a method can’t be inherited, you cannot override it. &lt;br /&gt;Overloaded method &lt;br /&gt;■Overloaded methods must change the argument list.&lt;br /&gt;■Overloaded methods can change the return type.&lt;br /&gt;■Overloaded methods can change the access modifier.&lt;br /&gt;■Overloaded methods can declare new or broader checked exceptions.&lt;br /&gt;■A method can be overloaded in the same class or in a subclass.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-3940301269395626951?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/3940301269395626951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/difference-between-overriding-and.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3940301269395626951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3940301269395626951'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/difference-between-overriding-and.html' title='Difference between Overriding and Overloading'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-3103322549621888569</id><published>2009-07-17T04:04:00.000-07:00</published><updated>2009-07-17T04:05:29.871-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is the difference between DELETE and TRUNCATE? Is one faster than the other?'/><title type='text'>What is the difference between DELETE and TRUNCATE? Is one faster than the other?</title><content type='html'>DELETE logs the data for each row affected by the statement in the transaction log and physically removes the row from the file, one row at a time. The recording of each affected row can cause your transaction log grow massively if you are deleting huge numbers of rows. However, when you run your databases in full recovery mode, detailed logging is necessary for SQL Server to be able to recover the database to the most recent state, should a problem arise. The fact that each row is logged explains why DELETE statements can be slow.&lt;br /&gt;&lt;br /&gt;TRUNCATE is faster than DELETE due to the way TRUNCATE "removes" rows. Actually, TRUNCATE does not remove data, but rather deallocates whole data pages and removes pointers to indexes. The data still exists until it is overwritten or the database is shrunk. This action does not require a lot of resources and is therefore very fast. It is a common mistake to think that TRUNCATE is not logged. This is wrong. The deallocation of the data pages is recorded in the log file. Therefore, BOL refers to TRUNCATE operations as "minimally logged" operations. You can use TRUNCATE within a transaction, and when this transaction is rolled-back, the data pages are reallocated again and the database is again in its original, consistent state.&lt;br /&gt;&lt;br /&gt;Some limitations do exist for using TRUNCATE.&lt;br /&gt;&lt;br /&gt;·      You need to be db_owner, ddl_admin, or owner of the table to be able to fire a TRUNCATE statement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;·      TRUNCATE will not work on tables, which are referenced by one or more FOREIGN KEY constraints.&lt;br /&gt;&lt;br /&gt;So if TRUNCATE is so much faster than DELETE, should one use DELETE at all? Well, TRUNCATE is an all-or-nothing approach. You can't specify just to truncate those rows that match a certain criteria. It's either all rows or none.&lt;br /&gt;&lt;br /&gt;You can, however, use a workaround here. Suppose you want to delete more rows from a table than will remain. In this case you can export the rows that you want to keep to a temporary table, run the TRUNCATE statement, and finally reimport the remaining rows from the temporary table. If your table contains a column with the IDENTITY property defined on it, and you want to keep the original IDENTITY values, be sure to enabled IDENTITY_INSERT on the table before you reimport from the temporary table. Chances are good that this workaround is still faster than a DELETE operation.&lt;br /&gt;&lt;br /&gt;You can also set the recovery mode to "Simple" before you start this workaround, and then back to "Full" one it is done. However, keep in mind that is this case, you might only be able to recover to the last full backup.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-3103322549621888569?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/3103322549621888569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-difference-between-delete-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3103322549621888569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3103322549621888569'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-difference-between-delete-and.html' title='What is the difference between DELETE and TRUNCATE? Is one faster than the other?'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-2940006247336719445</id><published>2009-07-16T23:15:00.001-07:00</published><updated>2009-07-16T23:15:50.593-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What are triggers? How to invoke a trigger on demand?'/><title type='text'>What are triggers? How to invoke a trigger on demand?</title><content type='html'>Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table. &lt;br /&gt;&lt;br /&gt;Triggers can't be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined.&lt;br /&gt;&lt;br /&gt;Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-2940006247336719445?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/2940006247336719445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-are-triggers-how-to-invoke-trigger.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2940006247336719445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2940006247336719445'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-are-triggers-how-to-invoke-trigger.html' title='What are triggers? How to invoke a trigger on demand?'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6348984198426154949</id><published>2009-07-16T04:05:00.000-07:00</published><updated>2009-07-16T04:06:03.570-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is AJAX in ASP.Net'/><title type='text'>What is AJAX in ASP.Net</title><content type='html'>Ajax stands for Asynchronous Javascript &amp; XML. It is a web technology through which a postback from a client (browser) to the server goes partially, which means that instead of a complete postback, a partial postback is triggered by the Javascript XmlHttpRequest object. In such a scenario, web-application users won't be able to view the complete postback progress bar shown by the browser. In an AJAX environment, it is Javascript that starts the communication with the web server. &lt;br /&gt;&lt;br /&gt;Ajax technology in a website may be implemented by using plain Javascript and XML. Code in such a scenario may tend to look little complex, for which the AJAX Framework in .NET can be embedded in ASP.NET web applications. &lt;br /&gt;&lt;br /&gt;In addition to XML &amp; Javascript, AJAX is also based on DOM - the Document Object Model technology of browsers through which objects of the browser can be accessed through the memory heap using their address.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6348984198426154949?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6348984198426154949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-ajax-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6348984198426154949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6348984198426154949'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-ajax-in-aspnet.html' title='What is AJAX in ASP.Net'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6144847429691909603</id><published>2009-07-16T04:03:00.000-07:00</published><updated>2009-07-16T04:04:16.267-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is WPF in .Net'/><title type='text'>What is WPF in .Net</title><content type='html'>Windows Presentation Foundation (WPF) is Microsoft's development tool for Web applications and rich client applications.With WPF, developers can use XAML, the Extensible Application Markup Language, to create custom controls, graphics, 3D images and animations that are not available in traditional HTML implementations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6144847429691909603?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6144847429691909603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-wpf-in-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6144847429691909603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6144847429691909603'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-wpf-in-net.html' title='What is WPF in .Net'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-8246951643581665808</id><published>2009-07-16T03:55:00.000-07:00</published><updated>2009-07-16T03:59:38.918-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is WCF in .Net 3.5'/><title type='text'>What is WCF in .Net 3.5</title><content type='html'>Windows Communication Foundation (WCF) &lt;br /&gt;is Microsoft's programming model for using managed code to build unified Web services and other distributed systems that can talk to each other. &lt;br /&gt;WCF focuses on connecting XML to programs that are built using development languages supported by Microsoft, such as VB.NET and C#. &lt;br /&gt;To support this cross-language communication, WCF uses the extensible Simple Object Access Protocol (SOAP).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-8246951643581665808?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/8246951643581665808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-wcf-in-net-35.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/8246951643581665808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/8246951643581665808'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-wcf-in-net-35.html' title='What is WCF in .Net 3.5'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-3349238032894142996</id><published>2009-07-16T03:39:00.000-07:00</published><updated>2009-07-16T03:47:40.682-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is Web Services in .Net'/><title type='text'>What is Web Services in .Net</title><content type='html'>In ASP.NET, a web service is essentially a listener that monitors a particular URL exposed via HTTP, looking for requests packaged as SOAP messages. When a request arrives, the ASP.NET runtime unpackages the request and calls the method for which the request is intended, passing in any parameters included with the request. If the request has a return value (which is not required), the ASP.NET runtime packages up the return value (based on the XML schema datatype specifications) and sends it to the client as a SOAP message. What this means to developers is that your application doesn't need to know anything about the client that will consume it, other than the fact that it can understand XML and SOAP. Thus, developers can essentially write methods that will be called as web services just as though they were writing methods that would be called locally.&lt;br /&gt;&lt;br /&gt;This functionality is provided by the runtime largely for free. Developers expose their functionality as web services by marking their methods with a specific metadata attribute, the WebService attribute. The Common Language Runtime (CLR) takes care of the rest—from packaging and unpackaging SOAP requests to automatically providing HTML documentation of the web service—if it is called from a web browser (rather than by a SOAP request).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-3349238032894142996?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/3349238032894142996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-web-services-in-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3349238032894142996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/3349238032894142996'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-web-services-in-net.html' title='What is Web Services in .Net'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6484458066832944810</id><published>2009-07-13T23:08:00.001-07:00</published><updated>2009-07-14T22:21:54.445-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advantages of Stored Procedures'/><title type='text'>Advantages of Stored Procedures</title><content type='html'>Using stored procedures provides many advantages over executing large and complex SQL&lt;br /&gt;batches from client applications. The following are some of them:&lt;br /&gt;. Modular programming—Subroutines and functions are often used in ordinary 3GL&lt;br /&gt;and 4GL languages (such as C, C++, and Microsoft Visual Basic) to break code into&lt;br /&gt;smaller, more manageable pieces. The same advantages are achieved when using&lt;br /&gt;stored procedures, with the difference that the stored procedure is stored in SQL&lt;br /&gt;Server and can be called by any client application.&lt;br /&gt;. Restricted, function-based access to tables—Someone can have access to execute a&lt;br /&gt;stored procedure without having permissions to operate directly on the underlying&lt;br /&gt;tables.&lt;br /&gt;. Reduced network traffic—Stored procedures can consist of many individual SQL&lt;br /&gt;statements but can be executed with a single statement. This allows you to reduce&lt;br /&gt;the number and size of calls from the client to the server.&lt;br /&gt;. Faster execution—Stored procedures’ query plans are kept in memory after the first&lt;br /&gt;execution. The code doesn’t have to be reparsed and reoptimized on subsequent&lt;br /&gt;executions.&lt;br /&gt;. Enforced consistency—If users modify data only through stored procedures, problems&lt;br /&gt;that often result from ad hoc modifications (such as omitting a crucial WHERE&lt;br /&gt;clause) are eliminated.&lt;br /&gt;. Reduced operator and programmer errors—Because less information is being&lt;br /&gt;passed, complex tasks can be executed more easily, with less likelihood of&lt;br /&gt;SQL errors.&lt;br /&gt;. Automating complex or sensitive transactions—If all modifications of certain&lt;br /&gt;tables take place in stored procedures, you can guarantee the data integrity on those&lt;br /&gt;tables.&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Stored procedures are compiled and are the fastest possible&lt;br /&gt;means of executing a batch or query.&lt;br /&gt;&lt;br /&gt;Executing the processing at the server instead of the desktop&lt;br /&gt;greatly reduces network traffic.&lt;br /&gt;&lt;br /&gt;Stored procedures offer modularity and are an easy means of deploying features and&lt;br /&gt;code changes. If the front-end application calls a stored procedure to perform some&lt;br /&gt;processing, modifying a stored procedure in a single location upgrades all users.&lt;br /&gt;&lt;br /&gt;Stored procedures can be an important component in database security. If all user&lt;br /&gt;access goes through stored procedures, direct access to the tables can be denied and&lt;br /&gt;all access to the data can be controlled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6484458066832944810?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6484458066832944810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/advantages-of-stored-procedures.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6484458066832944810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6484458066832944810'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/advantages-of-stored-procedures.html' title='Advantages of Stored Procedures'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-7143163632867952509</id><published>2009-07-07T22:24:00.000-07:00</published><updated>2009-07-07T22:25:12.454-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS Interview Question'/><title type='text'>OOPS Interview Question</title><content type='html'>1. You have one base class virtual function how will call that function from derived class?&lt;br /&gt;Answer :&lt;br /&gt;class a&lt;br /&gt;{&lt;br /&gt;public virtual int m()&lt;br /&gt;{&lt;br /&gt;return 1;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;class b:a&lt;br /&gt;{&lt;br /&gt;public int j()&lt;br /&gt;{&lt;br /&gt;return m();&lt;br /&gt;}&lt;br /&gt;} &lt;br /&gt;2. Can we call a base class method without creating instance?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Its possible If its a static method.&lt;br /&gt;Its possible by inheriting from that class also.&lt;br /&gt;Its possible from derived classes using base keyword. &lt;br /&gt;3. What is Method Overriding? How to override a function in C#?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Use the override modifier to modify a method, a property, an indexer, or an event. An override method provides a new implementation of a member inherited from a base class. The method overridden by an override declaration is known as the overridden base method. The overridden base method must have the same signature as the override method.&lt;br /&gt;You cannot override a non-virtual or static method. The overridden base method must be virtual, abstract, or override &lt;br /&gt;4. What’s an abstract class?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;A class that cannot be instantiated. An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class without any implementation. &lt;br /&gt;5. When do you absolutely have to declare a class as abstract?&lt;br /&gt;Answer :&lt;br /&gt;1. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden.&lt;br /&gt;2. When at least one of the methods in the class is abstract. &lt;br /&gt;6. What is an interface class?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes. &lt;br /&gt;7. What happens if you inherit multiple interfaces and they have conflicting method names?&lt;br /&gt;Answer :&lt;br /&gt;It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares it is okay. &lt;br /&gt;8. What’s the difference between an interface and abstract class?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;In an interface class, all methods are abstract - there is no implementation. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers. &lt;br /&gt;9. How is method overriding different from method overloading?&lt;br /&gt;Answer :&lt;br /&gt;When overriding a method, you change the behavior of the method for the derived class. Overloading a method simply involves having another method with the same name within the class. &lt;br /&gt;10. If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class. &lt;br /&gt;11. What are the different ways a method can be overloaded?&lt;br /&gt;Answer :&lt;br /&gt;Different parameter data types, different number of parameters, different order of parameters. &lt;br /&gt;12. Can you prevent your class from being inherited by another class?&lt;br /&gt;Answer :&lt;br /&gt;Yes.  The keyword “sealed” will prevent the class from being inherited. &lt;br /&gt;13. What’s the C# syntax to catch any possible exception?&lt;br /&gt;Answer :&lt;br /&gt;A catch block that catches the exception of type System.Exception.  You can also omit the parameter data type in this case and just write catch {} &lt;br /&gt;14. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?&lt;br /&gt;Answer :&lt;br /&gt;The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array.  The CopyTo() method copies the elements into another existing array.  Both perform a shallow copy.  A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array.  A deep copy (which neither of these methods performs) would create a new instance of each element’s object, resulting in a different, yet identacle object. &lt;br /&gt;15. What’s the advantage of using System.Text.StringBuilder over System.String?&lt;br /&gt;Answer :&lt;br /&gt;StringBuilder is more efficient in cases where there is a large amount of string manipulation.  Strings are immutable, so each time a string is changed, a new instance in memory is created. &lt;br /&gt;16. What’s the difference between System.String and System.Text.StringBuilder classes?&lt;br /&gt;Answer :&lt;br /&gt;System.String is immutable.  System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed. &lt;br /&gt;17. What does the term immutable mean?&lt;br /&gt;Answer :&lt;br /&gt;The data value may not be changed.  Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory. &lt;br /&gt;18. List out some of the exception classes in C#?&lt;br /&gt;Answer :&lt;br /&gt;Common Exception Classes :&lt;br /&gt;The following exceptions are thrown by certain C# operations.&lt;br /&gt;System.OutOfMemoryException Thrown when an attempt to allocate memory (via new) fails.&lt;br /&gt;System.StackOverflowException Thrown when the execution stack is exhausted by having too many pending method calls; typically indicative of very deep or unbounded recursion.&lt;br /&gt;System.NullReferenceException Thrown when a null reference is used in a way that causes the referenced object to be required.&lt;br /&gt;System.TypeInitializationException Thrown when a static constructor throws an exception, and no catch clauses exists to catch in.&lt;br /&gt;System.InvalidCastException Thrown when an explicit conversion from a base type or interface to a derived types fails at run time.&lt;br /&gt;System.ArrayTypeMismatchException Thrown when a store into an array fails because the actual type of the stored element is incompatible with the actual type of the array.&lt;br /&gt;System.IndexOutOfRangeException Thrown when an attempt to index an array via an index that is less than zero or outside the bounds of the array.&lt;br /&gt;System.MulticastNotSupportedException Thrown when an attempt to combine two non-null delegates fails, because the delegate type does not have a void return type.&lt;br /&gt;System.ArithmeticException A base class for exceptions that occur during arithmetic operations, such as DivideByZeroException and OverflowException.&lt;br /&gt;System.DivideByZeroException Thrown when an attempt to divide an integral value by zero occurs.&lt;br /&gt;System.OverflowException Thrown when an arithmetic operation in a checked context overflows.&lt;br /&gt;&lt;br /&gt;19. Can you tell me about Array Covariance?&lt;br /&gt;Answer :&lt;br /&gt;For any two reference-types A and B, if an implicit reference conversion or explicit reference conversion exists from A to B, then the same reference conversion also exists from the array type A[R] to the array type B[R], where R is any given rank-specifier (but the same for both array types). This relationship is known as array covariance. Array covariance in particular means that a value of an array type A[R] may actually be a reference to an instance of an array type B[R], provided an implicit reference conversion exists from B to A.&lt;br /&gt;Because of array covariance, assignments to elements of reference type arrays include a run-time check which ensures that the value being assigned to the array element is actually of a permitted type&lt;br /&gt;20. What are Labeled statements?&lt;br /&gt;Answer :&lt;br /&gt;A labeled-statement permits a statement to be prefixed by a label. Labeled statements are permitted blocks, but are not permitted as embedded statements.&lt;br /&gt;labeled-statement:&lt;br /&gt;identifier   :   statement&lt;br /&gt;A labeled statement declares a label with the name given by the identifier. The scope of a label is the block in which the label is declared, including any nested blocks. It is an error for two labels with the same name to have overlapping scopes.&lt;br /&gt;A label can be referenced from goto statements within the scope of the label. This means that goto statements can transfer control inside blocks and out of blocks, but never into blocks&lt;br /&gt;21. Do you Know about Versioning?&lt;br /&gt;Answer :&lt;br /&gt;Versioning is the process of evolving a component over time in a compatible manner. A new version of a component is source compatible with a previous version if code that depends on the previous version can, when recompiled, work with the new version. In contrast, a new version of a component is binary compatible if a program that depended on the old version can, without recompilation, work with the new version.Most languages do not support binary compatibility at all, and many do little to facilitate source compatibility. In fact, some languages contain flaws that make it impossible, in general, to evolve a class over time without breaking at least some client code.&lt;br /&gt;22. What are Deligates ?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Delegates enable scenarios that C++ and some other languages have addressed with function pointers. Unlike function pointers, delegates are object-oriented, type-safe, and secure.&lt;br /&gt;Delegates are reference types that derive from a common base class: System.Delegate. A delegate instance encapsulates a method—a callable entity. For instance methods, a callable entity consists of an instance and a method on the instance. For static methods, a callable entity consists of a class and a static method on the class.&lt;br /&gt;An interesting and useful property of a delegate is that it does not know or care about the type of the object that it references. Any object will do; all that matters is that the method’s signature matches the delegate’s. This makes delegates perfectly suited for “anonymous” invocation. This is a powerful capability.&lt;br /&gt;There are three steps in defining and using delegates: declaration, instantiation, and invocation. Delegates are declared using delegate declaration syntax.&lt;br /&gt;delegate void SimpleDelegate();&lt;br /&gt;declares a delegate named SimpleDelegate that takes no arguments and returns void.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-7143163632867952509?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/7143163632867952509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/oops-interview-question.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/7143163632867952509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/7143163632867952509'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/oops-interview-question.html' title='OOPS Interview Question'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-7354511017047614502</id><published>2009-07-07T22:23:00.001-07:00</published><updated>2009-07-07T22:23:43.135-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Csharp Interveiw Questions'/><title type='text'>Csharp Interveiw Questions</title><content type='html'>1. Why is it a bad idea to throw your own exceptions?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project. &lt;br /&gt;2. Why can’t you specify the accessibility modifier for methods inside the interface?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default. &lt;br /&gt;3. What’s an interface class?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;It’s an abstract class with public abstract methods all of which must be implemented in the inherited classes. &lt;br /&gt;4. Can you allow class to be inherited, but prevent the method from being over-ridden?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Yes, just leave the class public and make the method sealed. &lt;br /&gt;5. Can you prevent your class from being inherited and becoming a base class for some other classes?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java. &lt;br /&gt;6. Can you override private virtual methods?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access. &lt;br /&gt;7. Can you declare the override method static while the original method is non-static?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override. &lt;br /&gt;8. How’s method overriding different from overloading?&lt;br /&gt;Answer :&lt;br /&gt;When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class. &lt;br /&gt;9. Does C# support multiple inheritance?&lt;br /&gt;Answer :&lt;br /&gt;No, use interfaces instead.&lt;br /&gt;10. Is goto statement supported in C#? How about Java?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Gotos are supported in C# to the fullest. In Java goto is a reserved keyword that provides absolutely no functionality. &lt;br /&gt;11. What happens when you encounter a continue statement inside the for loop?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop. &lt;br /&gt;12. What’s the difference between const and readonly?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;You can initialize readonly variables to some runtime values. Let’s say your program uses current date and time as one of the values that won’t change. This way you declare&lt;br /&gt;public readonly string DateT = new DateTime().ToString(). &lt;br /&gt;13. What’s different about namespace declaration when comparing that to package declaration in Java?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;No semicolon. Package declarations also have to be the first thing within the file, can’t be nested, and affect all classes within the file. &lt;br /&gt;14. Can you declare a C++ type destructor in C# like ~MyClass()?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Yes, but what’s the point, since it will call Finalize(), and Finalize() has no guarantees when the memory will be cleaned up, plus, it introduces additional load on the garbage collector. The only time the finalizer should be implemented, is when you’re dealing with unmanaged code. &lt;br /&gt;15. What’s different about switch statements in C#?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;No fall-throughs allowed. Unlike the C++ switch statement, C# does not support an explicit fall through from one case label to another. If you want, you can use goto a switch-case, or goto default.&lt;br /&gt;case 1:&lt;br /&gt;cost += 25;&lt;br /&gt;break;&lt;br /&gt;case 2:&lt;br /&gt;cost += 25;&lt;br /&gt;goto case 1; &lt;br /&gt;16. What is the difference between Finalize and Dispose (Garbage collection)&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Class instances often encapsulate control over resources that are not managed by the runtime, such as window handles (HWND), database connections, and so on. Therefore, you should provide both an explicit and an implicit way to free those resources. Provide implicit control by implementing the protected Finalize Method on an object (destructor syntax in C# and the Managed Extensions for C++). The garbage collector calls this method at some point after there are no longer any valid references to the object.&lt;br /&gt;In some cases, you might want to provide programmers using an object with the ability to explicitly release these external resources before the garbage collector frees the object. If an external resource is scarce or expensive, better performance can be achieved if the programmer explicitly releases resources when they are no longer being used. To provide explicit control, implement the Dispose method provided by the IDisposable Interface. The consumer of the object should call this method when it is done using the object. Dispose can be called even if other references to the object are alive.&lt;br /&gt;Note that even when you provide explicit control by way of Dispose, you should provide implicit cleanup using the Finalize method. Finalize provides a backup to prevent resources from permanently leaking if the programmer fails to call Dispose. &lt;br /&gt;17. Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;(Class constructor method is also known as type constructor or type initializer)&lt;br /&gt;Instance constructor is executed when a new instance of type is created and the class constructor is executed after the type is loaded and before any one of the type members is accessed. (It will get executed only 1st time, when we call any static methods/fields in the same class.) Class constructors are used for static field initialization. Only one class constructor per type is permitted, and it cannot use the vararg (variable argument) calling convention.&lt;br /&gt;A static constructor is used to initialize a class. It is called automatically to initialize the class before the first instance is created or any static members are referenced. &lt;br /&gt;18. Write one code example for compile time binding and one for run time binding? What is early/late binding?&lt;br /&gt;Answer :&lt;br /&gt;An object is early bound when it is assigned to a variable declared to be of a specific object type. Early bound objects allow the compiler to allocate memory and perform other optimizations before an application executes.&lt;br /&gt;‘ Create a variable to hold a new object.&lt;br /&gt;Dim FS As FileStream&lt;br /&gt;‘ Assign a new object to the variable.&lt;br /&gt;FS = New FileStream(”C:\tmp.txt”, FileMode.Open)&lt;br /&gt;By contrast, an object is late bound when it is assigned to a variable declared to be of type Object. Objects of this type can hold references to any object, but lack many of the advantages of early-bound objects.&lt;br /&gt;Dim xlApp As Object&lt;br /&gt;xlApp = CreateObject(”Excel.Application”) &lt;br /&gt;19. What are Sealed Classes in C#?&lt;br /&gt;Answer :&lt;br /&gt;The sealed modifier is used to prevent derivation from a class. A compile-time error occurs if a sealed class is specified as the base class of another class. (A sealed class cannot also be an abstract class) &lt;br /&gt;20. In which cases you use override and new base?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Use the new modifier to explicitly hide a member inherited from a base class. To hide an inherited member, declare it in the derived class using the same name, and modify it with the new modifier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-7354511017047614502?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/7354511017047614502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/csharp-interveiw-questions_8837.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/7354511017047614502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/7354511017047614502'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/csharp-interveiw-questions_8837.html' title='Csharp Interveiw Questions'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6456544254333910214</id><published>2009-07-07T22:21:00.001-07:00</published><updated>2009-07-07T22:21:58.017-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Csharp Interveiw Questions'/><title type='text'>Csharp Interveiw Questions</title><content type='html'>1. Does C# support a variable number of arguments?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Yes, using the params keyword. The arguments are specified as a list of arguments of a specific type, e.g. int. For ultimate flexibility, the type can be object. The standard example of a method which uses this approach is System.Console.WriteLine(). &lt;br /&gt;2. When should I throw an exception?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;This is the subject of some debate, and is partly a matter of taste. However, it is accepted by many that exceptions should be thrown only when an ‘unexpected’ error occurs. How do you decide if an error is expected or unexpected? This is a judgement call, but a straightforward example of an expected error is failing to read from a file because the seek pointer is at the end of the file, whereas an example of an unexpected error is failing to allocate memory from the heap. &lt;br /&gt;3. What types of object can I throw as exceptions?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Only instances of the System.Exception classes, or classes derived from System.Exception. This is in sharp contrast with C++ where instances of almost any type can be thrown &lt;br /&gt;4. Can I use exceptions in C#?&lt;br /&gt;Answer :&lt;br /&gt;Yes, in fact exceptions are the recommended error-handling mechanism in C# (and in .NET in general). Most of the .NET framework classes use exceptions to signal errors. &lt;br /&gt;5. Should I make my destructor virtual?&lt;br /&gt;Answer :&lt;br /&gt;A C# destructor is really just an override of the System.Object Finalize method, and so is virtual by definition. &lt;br /&gt;6. Can I call a virtual method from a constructor/destructor?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Yes, but it’s generally not a good idea. The mechanics of object construction in .NET are quite different from C++, and this affects virtual method calls in constructors.&lt;br /&gt;C++ constructs objects from base to derived, so when the base constructor is executing the object is effectively a base object, and virtual method calls are routed to the base class implementation. By contrast, in .NET the derived constructor is executed first, which means the object is always a derived object and virtual method calls are always routed to the derived implementation. (Note that the C# compiler inserts a call to the base class constructor at the start of the derived constructor, thus preserving standard OO semantics by creating the illusion that the base constructor is executed first.)&lt;br /&gt;The same issue arises when calling virtual methods from C# destructors. A virtual method call in a base destructor will be routed to the derived implementation. &lt;br /&gt;7. How do I declare a pure virtual function in C#?&lt;br /&gt;Answer :&lt;br /&gt;Use the abstract modifier on the method. The class must also be marked as abstract (naturally). Note that abstract methods cannot have an implementation (unlike pure virtual C++ methods). &lt;br /&gt;8. Are all methods virtual in C#?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;No. Like C++, methods are non-virtual by default, but can be marked as virtual. &lt;br /&gt;9. Are C# destructors the same as C++ destructors?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;No. They look the same but they are very different. The C# destructor syntax (with the familiar ~ character) is just syntactic sugar for an override of the System.Object Finalize method. This Finalize method is called by the garbage collector when it determines that an object is no longer referenced, before it frees the memory associated with the object. So far this sounds like a C++ destructor. The difference is that the garbage collector makes no guarantees about when this procedure happens. Indeed, the algorithm employed by the CLR garbage collector means that it may be a long time after the application has finished with the object. This lack of certainty is often termed ‘non-deterministic finalization’, and it means that C# destructors are not suitable for releasing scarce resources such as database connections, file handles etc.&lt;br /&gt;To achieve deterministic destruction, a class must offer a method to be used for the purpose. The standard approach is for the class to implement the IDisposable interface. The user of the object must call the Dispose() method when it has finished with the object. C# offers the ‘using’ construct to make this easier. &lt;br /&gt;10. Are C# constructors the same as C++ constructors?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Very similar, but there are some significant differences. First, C# supports constructor chaining. This means one constructor can call another:&lt;br /&gt;class Person&lt;br /&gt;{&lt;br /&gt;public Person( string name, int age ) { … }&lt;br /&gt;public Person( string name ) : this( name, 0 ) {}&lt;br /&gt;public Person() : this( “”, 0 ) {}&lt;br /&gt;}&lt;br /&gt;Another difference is that virtual method calls within a constructor are routed to the most derived implementation&lt;br /&gt;Error handling is also somewhat different. If an exception occurs during construction of a C# object, the destuctor (finalizer) will still be called. This is unlike C++ where the destructor is not called if construction is not completed.&lt;br /&gt;Finally, C# has static constructors. The static constructor for a class runs before the first instance of the class is created.&lt;br /&gt;Also note that (like C++) some C# developers prefer the factory method pattern over constructors. &lt;br /&gt;11. Structs are largely redundant in C++. Why does C# have them?&lt;br /&gt;Answer :&lt;br /&gt;In C++, a struct and a class are pretty much the same thing. The only difference is the default visibility level (public for structs, private for classes). However, in C# structs and classes are very different. In C#, structs are value types (instances stored directly on the stack, or inline within heap-based objects), whereas classes are reference types (instances stored on the heap, accessed indirectly via a reference). Also structs cannot inherit from structs or classes, though they can implement interfaces. Structs cannot have destructors. A C# struct is much more like a C struct than a C++ struct. &lt;br /&gt;12. What are the fundamental differences between value types and reference types?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;C# divides types into two categories - value types and reference types. Most of the intrinsic types (e.g. int, char) are value types. Structs are also value types. Reference types include classes, arrays and strings. The basic idea is straightforward - an instance of a value type represents the actual data, whereas an instance of a reference type represents a pointer or reference to the data.&lt;br /&gt;The most confusing aspect of this for C++ developers is that C# has predetermined which types are represented as values, and which are represented as references. A C++ developer expects to take responsibility for this decision.&lt;br /&gt;For example, in C++ we can do this:&lt;br /&gt;int x1 = 3;        // x1 is a value on the stack&lt;br /&gt;int *x2 = new int(3)    // x2 is a pointer to a value on the heap&lt;br /&gt;but in C# there is no control:&lt;br /&gt;int x1 = 3;        // x1 is a value on the stack&lt;br /&gt;int x2 = new int();&lt;br /&gt;x2 = 3;        // x2 is also a value on the stack! &lt;br /&gt;13. What standard types does C# use?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;C# supports a very similar range of basic types to C++, including int, long, float, double, char, string, arrays, structs and classes. However, don’t assume too much. The names may be familiar, but many of the details are different. For example, a long is 64 bits in C#, whereas in C++ the size of a long depends on the platform (typically 32 bits on a 32-bit platform, 64 bits on a 64-bit platform). Also classes and structs are almost the same in C++ - this is not true for C#. Finally, chars and strings in .NET are 16-bit (Unicode/UTF-16), not 8-bit like C++. &lt;br /&gt;14. Does C# have its own class library?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Not exactly. The .NET Framework has a comprehensive class library, which C# can make use of. C# does not have its own class library. &lt;br /&gt;15. How do you mark a method obsolete?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;[Obsolete] public int Foo() {…}&lt;br /&gt;or&lt;br /&gt;[Obsolete(\”This is a message describing why this method is obsolete\”)] public int Foo() {…}&lt;br /&gt;Note: The O in Obsolete is always capitalized. &lt;br /&gt;16. How does one compare strings in C#?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;In the past, you had to call .ToString() on the strings when using the == or != operators to compare the strings’ values. That will still work, but the C# compiler now automatically compares the values instead of the references when the == or != operators are used on string types. If you actually do want to compare references, it can be done as follows: if ((object) str1 == (object) str2) { … } Here’s an example showing how string compares work:&lt;br /&gt;using System;&lt;br /&gt;public class StringTest&lt;br /&gt;{&lt;br /&gt;public static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;Object nullObj = null; Object realObj = new StringTest();&lt;br /&gt;int i = 10;&lt;br /&gt;Console.WriteLine(\”Null Object is [\” + nullObj + \”]\n\”&lt;br /&gt;+ \”Real Object is [\” + realObj + \”]\n\”&lt;br /&gt;+ \”i is [\” + i + \”]\n\”);&lt;br /&gt;// Show string equality operators&lt;br /&gt;string str1 = \”foo\”;&lt;br /&gt;string str2 = \”bar\”;&lt;br /&gt;string str3 = \”bar\”;&lt;br /&gt;Console.WriteLine(\”{0} == {1} ? {2}\”, str1, str2, str1 == str2 );&lt;br /&gt;Console.WriteLine(\”{0} == {1} ? {2}\”, str2, str3, str2 == str3 );&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;Output:&lt;br /&gt;Null Object is []&lt;br /&gt;Real Object is [StringTest]&lt;br /&gt;i is [10]&lt;br /&gt;foo == bar ? False&lt;br /&gt;bar == bar ? True &lt;br /&gt;17. Is it possible to have different access modifiers on the get/set methods of a property?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;No. The access modifier on a property applies to both its get and set accessors. What you need to do if you want them to be different is make the property read-only (by only providing a get accessor) and create a private/internal set method that is separate from the property. &lt;br /&gt;18. Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?&lt;br /&gt;Answer :&lt;br /&gt;There is no way to restrict to a namespace. Namespaces are never units of protection. But if you’re using assemblies, you can use the ‘internal’ access modifier to restrict access to only within the assembly. &lt;br /&gt;19. Is there an equivalent of exit() for quitting a C# .NET application?&lt;br /&gt;Answer :&lt;br /&gt;&lt;br /&gt;Yes, you can use System.Environment.Exit(int exitCode) to exit the application or Application.Exit() if it’s a Windows Forms app. &lt;br /&gt;20. What optimizations does the C# compiler perform when you use the /optimize+ compiler option?&lt;br /&gt;Answer :&lt;br /&gt;The following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch with an empty try. We get rid of try-finally with an empty try. We get rid of try-finally with an empty finally. We optimize branches over branches: gotoif A, lab1 goto lab2: lab1: turns into: gotoif !A, lab2 lab1: We optimize branches to ret, branches to next instruction, and branches to branches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6456544254333910214?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6456544254333910214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/csharp-interveiw-questions_07.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6456544254333910214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6456544254333910214'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/csharp-interveiw-questions_07.html' title='Csharp Interveiw Questions'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-2514638598275749904</id><published>2009-07-07T22:13:00.000-07:00</published><updated>2009-07-31T22:42:52.368-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Questions'/><title type='text'>.Net Interview Questions</title><content type='html'>1. If A.equals(B) is true then A.getHashcode &amp; B.getHashCode must always return same hash code.&lt;br /&gt;The answer is False because it is given that A.equals(B) returns true i.e. objects are equal and now its hashCode is asked which is always independent of the fact that whether objects are equal or not. So, GetHashCode for both of the objects returns different value. &lt;br /&gt;2. What is an indexer in C#?&lt;br /&gt;&lt;br /&gt;Indexer is a special syntax for overloading [] operator for a class. After defining an indexer, array syntaxes can be used for the class objects. &lt;br /&gt;3. What is the use of fixed statement?&lt;br /&gt;&lt;br /&gt;The fixed statement sets a pointer to a managed variable and “pins” that variable during the execution of statement.&lt;br /&gt;Without fixed, pointers to managed variables would be of little use since garbage collection could relocate the variables unpredictably. (In fact, the C# compiler will not allow you to set a pointer to a managed variable except in a fixed statement.)&lt;br /&gt;Eg:&lt;br /&gt;Class A { public int i; }&lt;br /&gt;A objA = new A; // A is a .net managed type&lt;br /&gt;fixed(int *pt = &amp;objA.i) // use fixed while using pointers with managed&lt;br /&gt;// variables&lt;br /&gt;{&lt;br /&gt;*pt=45; // in this block use the pointer the way u want&lt;br /&gt;} &lt;br /&gt;4. What is the order of destructors called in a polymorphism hierarchy?&lt;br /&gt;&lt;br /&gt;Destructors are called in reverse order of constructors. First destructor of most derived class is called followed by its parent’s destructor and so on till the topmost class in the hierarchy.&lt;br /&gt;You don’t have control over when the first destructor will be called, since it is determined by the garbage collector. Sometime after the object goes out of scope GC calls the destructor, then its parent’s destructor and so on.&lt;br /&gt;When a program terminates definitely all object’s destructors are called. &lt;br /&gt;5. How can you sort the elements of the array in descending order?&lt;br /&gt;&lt;br /&gt;int[] arr = new int[3];&lt;br /&gt;arr[0] = 4;&lt;br /&gt;arr[1] = 1;&lt;br /&gt;arr[2] = 5;&lt;br /&gt;Array.Sort(arr);&lt;br /&gt;Array.Reverse(arr); &lt;br /&gt;6. Is it possible to Override Private Virtual methods.&lt;br /&gt;&lt;br /&gt;No, First of all you cannot declare a method as ‘private virtual’. &lt;br /&gt;7. What is the difference between shadow and override?&lt;br /&gt;Overriding is used to redefines only the methods, but shadowing redefines the entire element. &lt;br /&gt;8. Is it possible to debug the classes written in other .Net languages in a C# project.&lt;br /&gt;It is definitely possible to debug other .Net languages code in a C# project. As everyone knows .net can combine code written in several .net languages into one single assembly. Same is true with debugging. &lt;br /&gt;9. What is the syntax to inherit from a class in C#?&lt;br /&gt;Place a colon and then the name of the base class.&lt;br /&gt;Example: class NewClassName : BaseClassName &lt;br /&gt;10. Describe the accessibility modifier “protected internal”.&lt;br /&gt;It is available to classes that are within the same assembly and derived from the specified base class. &lt;br /&gt;11. What is a satellite Assembly?&lt;br /&gt;An assembly containing localized resources for another assembly. &lt;br /&gt;12. How to declares a two-dimensional array in C#?&lt;br /&gt;&lt;br /&gt;Syntax for Two Dimensional Array in C Sharp is int[,] ArrayName; &lt;br /&gt;13. What does it meant to say “the canonical” form of XML?&lt;br /&gt;&lt;br /&gt;The purpose of Canonical XML is to define a standard format for an XML document. Canonical XML is a very strict XML syntax, which lets documents in canonical XML be compared directly.&lt;br /&gt;Using this strict syntax makes it easier to see whether two XML documents are the same. For example, a section of text in one document might read Black &amp; White, whereas the same section of text might read Black &amp; White in another document, and even in another. If you compare those three documents byte by byte, they’ll be different. But if you write them all in canonical XML, which specifies every aspect of the syntax you can use, these three documents would all have the same version of this text (which would be Black &amp; White) and could be compared without problem. This Comparison is especially critical when xml documents are digitally signed. The digital signal may be interpreted in different way and the document may be rejected. &lt;br /&gt;14. What are Delegates?&lt;br /&gt;&lt;br /&gt;Delegates are just like function pointers in C++, except that they are much safer to use due to their type safety. A delegate defines a function without implementing it and another class then provides the implementation. Events in C# are based on delegates, with the originator defining one or more callback functions. &lt;br /&gt;15. What is C#?&lt;br /&gt;&lt;br /&gt;C# ( pronounced as C-sharp ) is a new Java like language from Microsoft. Microsoft says that C# is a language with the power of C++ and simplicity of Visual Basic. C# supposed to be the best language for Microsoft’s .NET programming. &lt;br /&gt;16. What is the difference between Java and .NET garbage collectors?&lt;br /&gt;&lt;br /&gt;Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using. Microsoft standardized on their garbage collection. &lt;br /&gt;17. Why do one get a syntax error when trying to declare a variable called checked?&lt;br /&gt;Syntax Error is thrown because the word checked is a keyword in C#. &lt;br /&gt;18. If a method is marked as protected internal how can it be accessed?&lt;br /&gt;Method marked as Protected internally can be accessed by the Classes within the same assembly, and classes derived from the declaring class. &lt;br /&gt;19. What is boxing?&lt;br /&gt;&lt;br /&gt;Encapsulating a copy of a value type in an object. &lt;br /&gt;20. How can I make sure my C# classes will interoperate with other .NET languages?&lt;br /&gt;&lt;br /&gt;Make sure your C# code conforms to the Common Language Subset (CLS). To help with this, add the [assembly:CLSCompliant(true)] global attribute to your C# source files. The compiler will emit an error if you use a C# feature which is not CLS-compliant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-2514638598275749904?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/2514638598275749904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/csharp-interveiw-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2514638598275749904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2514638598275749904'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/csharp-interveiw-questions.html' title='.Net Interview Questions'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-249757262230305051</id><published>2009-07-02T05:25:00.001-07:00</published><updated>2009-07-04T04:30:55.083-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interface'/><title type='text'>What is the Use of IComponent Interface</title><content type='html'>The functionality that IComponent adds to your class is that it can be used in component designer. It can be added to the Visual Studio's Toolbox area and it can be manipulated in design time. Without IComponent interface you cannot do this. Look at the items in your toolbox they all support IComponent which tells that they are components.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-249757262230305051?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/249757262230305051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-use-icomponent-interface.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/249757262230305051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/249757262230305051'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-use-icomponent-interface.html' title='What is the Use of IComponent Interface'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6902319418173090423</id><published>2009-07-02T02:05:00.000-07:00</published><updated>2009-07-02T02:07:17.024-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Name and describe Access modifiers in C#</title><content type='html'>public &lt;br /&gt;Access is not restricted. &lt;br /&gt;&lt;br /&gt;protected &lt;br /&gt;Access is limited to the containing class or types derived from the containing class. &lt;br /&gt;&lt;br /&gt;internal &lt;br /&gt;Access is limited to the current assembly. &lt;br /&gt;&lt;br /&gt;protected internal &lt;br /&gt;Access is limited to the current assembly or types derived from the containing class. &lt;br /&gt;&lt;br /&gt;private &lt;br /&gt;Access is limited to the containing type.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6902319418173090423?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6902319418173090423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/name-and-describe-access-modifiers-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6902319418173090423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6902319418173090423'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/name-and-describe-access-modifiers-in-c.html' title='Name and describe Access modifiers in C#'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-6625976217636316041</id><published>2009-07-01T02:53:00.000-07:00</published><updated>2009-07-01T02:54:51.713-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>What is the difference between static and class method</title><content type='html'>static objects or members of a class that can be accessed directly from the class, while non-static members can only be accessed from the instance it belongs to.&lt;br /&gt;&lt;br /&gt;C# follows a similar principle for the methods. The static methods can by accessed directly from the class, while non-static methods (or instance methods as I like to call them) have to be accessed from an instance. That is why instatiating needs to be done for instance methods, while for static methods it's just not needed, and furthermore impractical (see below).&lt;br /&gt;&lt;br /&gt;In OOP, static variables are used for values which cannot be stored by an instance variable. Example: supposed you wanted to keep a count of how many instances of a class exists? How would you store that in a single instance?&lt;br /&gt;&lt;br /&gt;The methods use a similar principle. They should be used for procedures for which it is impractical to do within an instance of a class. I tend to use them for broad procedures (not a technical term), meaning those that do not require me to instantiate an object. Example, adding two parameters. (This usage may or may not be correct, but I believe it is)&lt;br /&gt;&lt;br /&gt;However, if you wanted to add two properties of an object, the method cannot be static, because as you would soon realize, static methods cannot access instance methods or variables within a class. Of course that makes sense because that static method would not know which instance of the class the get these from unless it were told, since it is not part of an instance itself)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-6625976217636316041?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/6625976217636316041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-difference-between-static-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6625976217636316041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/6625976217636316041'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/07/what-is-difference-between-static-and.html' title='What is the difference between static and class method'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-2287654244697339612</id><published>2009-06-25T03:04:00.000-07:00</published><updated>2009-06-25T03:05:12.296-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Interview Questions with Answers'/><title type='text'>SQL Interview Questions with Answers</title><content type='html'>What is RDBMS?&lt;br /&gt;&lt;br /&gt;Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained across and among the data and tables. In a relational database, relationships between data items are expressed by means of&lt;br /&gt;tables. Interdependencies among these tables are expressed by data values rather than by pointers. This allows a high degree of data independence. An RDBMS has the capability to recombine the data items from different files, providing powerful tools for data usage.&lt;br /&gt;&lt;br /&gt;What is normalization?&lt;br /&gt;&lt;br /&gt;Database normalization is a data design and organization process applied to data structures based on rules that help build relational databases. In relational database design, the process of organizing data to minimize redundancy. Normalization usually involves dividing a database into two or more tables and&lt;br /&gt;defining relationships between the tables. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.&lt;br /&gt;&lt;br /&gt;What are different normalization forms?&lt;br /&gt;&lt;br /&gt;1NF: Eliminate Repeating Groups&lt;br /&gt;&lt;br /&gt;Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain.&lt;br /&gt;&lt;br /&gt;2NF: Eliminate Redundant Data&lt;br /&gt;&lt;br /&gt;If an attribute depends on only part of a multi-valued key, remove it to a separate table.&lt;br /&gt;&lt;br /&gt;3NF: Eliminate Columns Not Dependent On Key&lt;br /&gt;&lt;br /&gt;If attributes do not contribute to a description of the key, remove them to a separate table. All attributes must be directly dependent on the primary key&lt;br /&gt;&lt;br /&gt;BCNF: Boyce-Codd Normal Form&lt;br /&gt;&lt;br /&gt;If there are non-trivial dependencies between candidate key attributes, separate them out into distincttables.&lt;br /&gt;&lt;br /&gt;4NF: Isolate Independent Multiple Relationships&lt;br /&gt;&lt;br /&gt;No table may contain two or more 1:n or n:m relationships that are not directly related.&lt;br /&gt;&lt;br /&gt;5NF: Isolate Semantically Related Multiple Relationships&lt;br /&gt;&lt;br /&gt;There may be practical constrains on information that justify separating logically related many-to-many relationships.&lt;br /&gt;&lt;br /&gt;ONF: Optimal Normal Form&lt;br /&gt;&lt;br /&gt;A model limited to only simple (elemental) facts, as expressed in Object Role Model notation.&lt;br /&gt;&lt;br /&gt;DKNF: Domain-Key Normal Form&lt;br /&gt;&lt;br /&gt;A model free from all modification anomalies.&lt;br /&gt;Remember, these normalization guidelines are cumulative. For a database to be in &lt;br /&gt;3NF, it must first fulfill all the criteria of a 2NF and 1NF database.&lt;br /&gt;&lt;br /&gt;What is Stored Procedure?&lt;br /&gt;&lt;br /&gt;A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by several clients using different input data. And when the procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and&lt;br /&gt;improve performance. Stored procedures can be used to help ensure the integrity of the database.&lt;br /&gt;e.g. sp_helpdb, sp_renamedb, sp_depends etc.&lt;br /&gt;&lt;br /&gt;What is Trigger?&lt;br /&gt;&lt;br /&gt;A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are stored in and managed by the DBMS.Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or executed;&lt;br /&gt;the DBMS automatically fires the trigger as a result of a data modification to the associated table.&lt;br /&gt;Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at the database level. Stored procedures, however, are not event-drive and are not attached to a specific table as triggers are. Stored procedures are explicitly executed by invoking a CALL to the&lt;br /&gt;procedure while triggers are implicitly executed. In addition, triggers can also execute stored procedures.&lt;br /&gt;&lt;br /&gt;Nested Trigger: A trigger can also contain INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause another data modification, thereby firing another trigger. A trigger that contains data modification logic within itself is called a nested trigger.&lt;br /&gt;&lt;br /&gt;What is View?&lt;br /&gt;&lt;br /&gt;A simple view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data&lt;br /&gt;in the view, as views are the way to look at part of the original table. The results of using a view are not permanently stored in the database. The data accessed through a view is actually constructed using&lt;br /&gt;standard T-SQL select command and can come from one to many different base tables or even other views.&lt;br /&gt;&lt;br /&gt;What is Index?&lt;br /&gt;&lt;br /&gt;An index is a physical structure containing pointers to the data. Indices are created in an existing table&lt;br /&gt;to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of&lt;br /&gt;a table, and each index is given a name. The users cannot see the indexes, they are just used to speed&lt;br /&gt;up queries. Effective indexes are one of the best ways to improve performance in a database&lt;br /&gt;application. A table scan happens when there is no index available to help a query. In a table scan SQL&lt;br /&gt;Server examines every row in the table to satisfy the query results. Table scans are sometimes&lt;br /&gt;unavoidable, but on large tables, scans have a terrific impact on performance.&lt;br /&gt;Clustered indexes define the physical sorting of a database table’s rows in the storage media. For this&lt;br /&gt;reason, each database table may have only one clustered index.&lt;br /&gt;Non-clustered indexes are created outside of the database table and contain a sorted list of references&lt;br /&gt;to the table itself.&lt;br /&gt;What is the difference between clustered and a non-clustered index?&lt;br /&gt;A clustered index is a special type of index that reorders the way records in the table are physically&lt;br /&gt;stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain&lt;br /&gt;the data pages.&lt;br /&gt;A nonclustered index is a special type of index in which the logical order of the index does not match&lt;br /&gt;the physical stored order of the rows on disk. The leaf node of a nonclustered index does not consist of&lt;br /&gt;the data pages. Instead, the leaf nodes contain index rows.&lt;br /&gt;What are the different index configurations a table can have?&lt;br /&gt;A table can have one of the following index configurations:&lt;br /&gt;No indexes&lt;br /&gt;A clustered index&lt;br /&gt;A clustered index and many nonclustered indexes&lt;br /&gt;A nonclustered index&lt;br /&gt;Many nonclustered indexes&lt;br /&gt;What is cursors?&lt;br /&gt;Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis,&lt;br /&gt;instead of the typical SQL commands that operate on all the rows in the set at one time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In order to work with a cursor we need to perform some steps in the following order:&lt;br /&gt;Declare cursor&lt;br /&gt;Open cursor&lt;br /&gt;Fetch row from the cursor&lt;br /&gt;Process fetched row&lt;br /&gt;Close cursor&lt;br /&gt;Deallocate cursor&lt;br /&gt;What is the use of DBCC commands?&lt;br /&gt;DBCC stands for database consistency checker. We use these commands to check the consistency of&lt;br /&gt;the databases, i.e., maintenance, validation task and status checks.&lt;br /&gt;E.g. DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.&lt;br /&gt;DBCC CHECKALLOC - To check that all pages in a db are correctly allocated.&lt;br /&gt;DBCC CHECKFILEGROUP - Checks all tables file group for any damage.&lt;br /&gt;What is a Linked Server?&lt;br /&gt;Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query&lt;br /&gt;both the SQL Server dbs using T-SQL Statements. With a linked server, you can create very clean, easy&lt;br /&gt;to follow, SQL statements that allow remote data to be retrieved, joined and combined with local data.&lt;br /&gt;Storped Procedure sp_addlinkedserver, sp_addlinkedsrvlogin will be used add new Linked Server.&lt;br /&gt;&lt;br /&gt;What is Collation?&lt;br /&gt;&lt;br /&gt;Collation refers to a set of rules that determine how data is sorted and compared. Character data is&lt;br /&gt;sorted using rules that define the correct character sequence, with options for specifying casesensitivity,&lt;br /&gt;accent marks, kana character types and character width.&lt;br /&gt;What are different type of Collation Sensitivity?&lt;br /&gt;Case sensitivity&lt;br /&gt;A and a, B and b, etc.&lt;br /&gt;Accent sensitivity&lt;br /&gt;a and á, o and ó, etc.&lt;br /&gt;Kana Sensitivity&lt;br /&gt;When Japanese kana characters Hiragana and Katakana are treated differently, it is called Kana&lt;br /&gt;sensitive.&lt;br /&gt;Width sensitivity&lt;br /&gt;When a single-byte character (half-width) and the same character when represented as a double-byte&lt;br /&gt;character (full-width) are treated differently then it is width sensitive.&lt;br /&gt;What's the difference between a primary key and a unique key?&lt;br /&gt;Both primary key and unique enforce uniqueness of the column on which they are defined. But by&lt;br /&gt;default primary key creates a clustered index on the column, where are unique creates a nonclustered&lt;br /&gt;index by default. Another major difference is that, primary key doesn't allow NULLs, but unique key&lt;br /&gt;allows one NULL only.&lt;br /&gt;How to implement one-to-one, one-to-many and many-to-many relationships while&lt;br /&gt;designing tables?&lt;br /&gt;One-to-One relationship can be implemented as a single table and rarely as two tables with primary&lt;br /&gt;and foreign key relationships.&lt;br /&gt;One-to-Many relationships are implemented by splitting the data into two tables with primary key and&lt;br /&gt;foreign key relationships.&lt;br /&gt;Many-to-Many relationships are implemented using a junction table with the keys from both the tables&lt;br /&gt;forming the composite primary key of the junction table.&lt;br /&gt;What is a NOLOCK?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using the NOLOCK query optimiser hint is generally considered good practice in order to improve&lt;br /&gt;concurrency on a busy system. When the NOLOCK hint is included in a SELECT statement, no locks are&lt;br /&gt;taken when data is read. The result is a Dirty Read, which means that another process could be&lt;br /&gt;updating the data at the exact time you are reading it. There are no guarantees that your query will&lt;br /&gt;retrieve the most recent data. The advantage to performance is that your reading of data will not block&lt;br /&gt;updates from taking place, and updates will not block your reading of data. SELECT statements take&lt;br /&gt;Shared (Read) locks. This means that multiple SELECT statements are allowed simultaneous access, but&lt;br /&gt;other processes are blocked from modifying the data. The updates will queue until all the reads have&lt;br /&gt;completed, and reads requested after the update will wait for the updates to complete. The result to&lt;br /&gt;your system is delay(blocking).&lt;br /&gt;What is difference between DELETE &amp; TRUNCATE commands?&lt;br /&gt;Delete command removes the rows from a table based on the condition that we provide with a WHERE&lt;br /&gt;clause. Truncate will actually remove all the rows from a table and there will be no data in the table&lt;br /&gt;after we run the truncate command.&lt;br /&gt;TRUNCATE&lt;br /&gt;TRUNCATE is faster and uses fewer system and transaction log resources than DELETE.&lt;br /&gt;TRUNCATE removes the data by deallocating the data pages used to store the table’s data, and only the&lt;br /&gt;page deallocations are recorded in the transaction log.&lt;br /&gt;TRUNCATE removes all rows from a table, but the table structure and its columns, constraints, indexes&lt;br /&gt;and so on remain. The counter used by an identity for new rows is reset to the seed for the column.&lt;br /&gt;You cannot use TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint.&lt;br /&gt;Because TRUNCATE TABLE is not logged, it cannot activate a trigger.&lt;br /&gt;TRUNCATE can not be Rolled back.&lt;br /&gt;TRUNCATE is DDL Command.&lt;br /&gt;TRUNCATE Resets identity of the table.&lt;br /&gt;DELETE&lt;br /&gt;DELETE removes rows one at a time and records an entry in the transaction log for each deleted row.&lt;br /&gt;If you want to retain the identity counter, use DELETE instead. If you want to remove table definition&lt;br /&gt;and its data, use the DROP TABLE statement.&lt;br /&gt;DELETE Can be used with or without a WHERE clause&lt;br /&gt;DELETE Activates Triggers.&lt;br /&gt;DELETE Can be Rolled back.&lt;br /&gt;DELETE is DML Command.&lt;br /&gt;DELETE does not reset identity of the table.&lt;br /&gt;Difference between Function and Stored Procedure?&lt;br /&gt;UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as&lt;br /&gt;Stored procedures cannot be.&lt;br /&gt;UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables.&lt;br /&gt;Inline UDF's can be though of as views that take parameters and can be used in JOINs and other&lt;br /&gt;Rowset operations.&lt;br /&gt;When is the use of UPDATE_STATISTICS command?&lt;br /&gt;This command is basically used when a large processing of data has occurred. If a large amount of&lt;br /&gt;deletions any modification or Bulk Copy into the tables has occurred, it has to update the indexes to&lt;br /&gt;take these changes into account. UPDATE_STATISTICS updates the indexes on these tables&lt;br /&gt;accordingly.&lt;br /&gt;What types of Joins are possible with Sql Server?&lt;br /&gt;Joins are used in queries to explain how different tables are related. Joins also let you select data from&lt;br /&gt;a table depending upon data from another table.&lt;br /&gt;Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are further classified as LEFT&lt;br /&gt;OUTER JOINS, RIGHT OUTER JOINS and FULL OUTER JOINS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?&lt;br /&gt;&lt;br /&gt;Specifies a search condition for a group or an aggregate. HAVING can be used only with the SELECT&lt;br /&gt;statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING&lt;br /&gt;behaves like a WHERE clause. Having Clause is basically used only with the GROUP BY function in a&lt;br /&gt;query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.&lt;br /&gt;What is sub-query? Explain properties of sub-query.&lt;br /&gt;Sub-queries are often referred to as sub-selects, as they allow a SELECT statement to be executed&lt;br /&gt;arbitrarily within the body of another SQL statement. A sub-query is executed by enclosing it in a set of&lt;br /&gt;parentheses. Sub-queries are generally used to return a single row as an atomic value, though they&lt;br /&gt;may be used to compare values against multiple rows with the IN keyword.&lt;br /&gt;A subquery is a SELECT statement that is nested within another T-SQL statement. A subquery SELECT&lt;br /&gt;statement if executed independently of the T-SQL statement, in which it is nested, will return a result&lt;br /&gt;set. Meaning a subquery SELECT statement can standalone and is not depended on the statement in&lt;br /&gt;which it is nested. A subquery SELECT statement can return any number of values, and can be found&lt;br /&gt;in, the column list of a SELECT statement, a FROM, GROUP BY, HAVING, and/or ORDER BY clauses of a&lt;br /&gt;T-SQL statement. A Subquery can also be used as a parameter to a function call. Basically a subquery&lt;br /&gt;can be used anywhere an expression can be used.&lt;br /&gt;Properties of Sub-Query&lt;br /&gt;A subquery must be enclosed in the parenthesis.&lt;br /&gt;A subquery must be put in the right hand of the comparison operator, and&lt;br /&gt;A subquery cannot contain a ORDER-BY clause.&lt;br /&gt;A query can contain more than one sub-queries.&lt;br /&gt;What are types of sub-queries?&lt;br /&gt;Single-row subquery, where the subquery returns only one row.&lt;br /&gt;Multiple-row subquery, where the subquery returns multiple rows,.and&lt;br /&gt;Multiple column subquery, where the subquery returns multiple columns.&lt;br /&gt;What is SQL Profiler?&lt;br /&gt;SQL Profiler is a graphical tool that allows system administrators to monitor events in an instance of&lt;br /&gt;Microsoft SQL Server. You can capture and save data about each event to a file or SQL Server table to&lt;br /&gt;analyze later. For example, you can monitor a production environment to see which stored procedures&lt;br /&gt;are hampering performance by executing too slowly.&lt;br /&gt;Use SQL Profiler to monitor only the events in which you are interested. If traces are becoming too&lt;br /&gt;large, you can filter them based on the information you want, so that only a subset of the event data is&lt;br /&gt;collected. Monitoring too many events adds overhead to the server and the monitoring process and can&lt;br /&gt;cause the trace file or trace table to grow very large, especially when the monitoring process takes&lt;br /&gt;place over a long period of time.&lt;br /&gt;What is User Defined Functions?&lt;br /&gt;User-Defined Functions allow to define its own T-SQL functions that can accept 0 or more parameters&lt;br /&gt;and return a single scalar data value or a table data type.&lt;br /&gt;What kind of User-Defined Functions can be created?&lt;br /&gt;There are three types of User-Defined functions in SQL Server 2000 and they are Scalar, Inline Table-&lt;br /&gt;Valued and Multi-statement Table-valued.&lt;br /&gt;Scalar User-Defined Function&lt;br /&gt;A Scalar user-defined function returns one of the scalar data types. Text, ntext, image and timestamp&lt;br /&gt;data types are not supported. These are the type of user-defined functions that most developers are&lt;br /&gt;used to in other programming languages. You pass in 0 to many parameters and you get a return&lt;br /&gt;value.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Inline Table-Value User-Defined Function&lt;br /&gt;An Inline Table-Value user-defined function returns a table data type and is an exceptional alternative&lt;br /&gt;to a view as the user-defined function can pass parameters into a T-SQL select command and in&lt;br /&gt;essence provide us with a parameterized, non-updateable view of the underlying tables.&lt;br /&gt;Multi-statement Table-Value User-Defined Function&lt;br /&gt;A Multi-Statement Table-Value user-defined function returns a table and is also an exceptional&lt;br /&gt;alternative to a view as the function can support multiple T-SQL statements to build the final result&lt;br /&gt;where the view is limited to a single SELECT statement. Also, the ability to pass parameters into a TSQL&lt;br /&gt;select command or a group of them gives us the capability to in essence create a parameterized,&lt;br /&gt;non-updateable view of the data in the underlying tables. Within the create function command you&lt;br /&gt;must define the table structure that is being returned. After creating this type of user-defined function,&lt;br /&gt;It can be used in the FROM clause of a T-SQL command unlike the behavior found when using a stored&lt;br /&gt;procedure which can also return record sets.&lt;br /&gt;Which TCP/IP port does SQL Server run on? How can it be changed?&lt;br /&gt;SQL Server runs on port 1433. It can be changed from the Network Utility TCP/IP properties –&gt; Port&lt;br /&gt;number.both on client and the server.&lt;br /&gt;What are the authentication modes in SQL Server? How can it be changed?&lt;br /&gt;Windows mode and mixed mode (SQL &amp; Windows).&lt;br /&gt;To change authentication mode in SQL Server click Start, Programs, Microsoft SQL Server and click SQL&lt;br /&gt;Enterprise Manager to run SQL Enterprise Manager from the Microsoft SQL Server program group.&lt;br /&gt;Select the server then from the Tools menu select SQL Server Configuration Properties, and choose the&lt;br /&gt;Security page.&lt;br /&gt;Where are SQL server users names and passwords are stored in sql server?&lt;br /&gt;They get stored in master db in the sysxlogins table.&lt;br /&gt;Which command using Query Analyzer will give you the version of SQL server and operating&lt;br /&gt;system?&lt;br /&gt;SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY&lt;br /&gt;('edition')&lt;br /&gt;What is SQL server agent?&lt;br /&gt;SQL Server agent plays an important role in the day-to-day tasks of a database administrator (DBA). It&lt;br /&gt;is often overlooked as one of the main tools for SQL Server management. Its purpose is to ease the&lt;br /&gt;implementation of tasks for the DBA, with its full-function scheduling engine, which allows you to&lt;br /&gt;schedule your own jobs and scripts.&lt;br /&gt;Can a stored procedure call itself or recursive stored procedure? How many level SP nesting&lt;br /&gt;possible?&lt;br /&gt;Yes. Because Transact-SQL supports recursion, you can write stored procedures that call themselves.&lt;br /&gt;Recursion can be defined as a method of problem solving wherein the solution is arrived at by&lt;br /&gt;repetitively applying it to subsets of the problem. A common application of recursive logic is to perform&lt;br /&gt;numeric computations that lend themselves to repetitive evaluation by the same processing steps.&lt;br /&gt;Stored procedures are nested when one stored procedure calls another or executes managed code by&lt;br /&gt;referencing a CLR routine, type, or aggregate. You can nest stored procedures and managed code&lt;br /&gt;references up to 32 levels.&lt;br /&gt;What is @@ERROR?&lt;br /&gt;The @@ERROR automatic variable returns the error code of the last Transact-SQL statement. If there&lt;br /&gt;was no error, @@ERROR returns zero. Because @@ERROR is reset after each Transact-SQL statement,&lt;br /&gt;it must be saved to a variable if it is needed to process it further after checking it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is Raiseerror?&lt;br /&gt;&lt;br /&gt;Stored procedures report errors to client applications via the RAISERROR command. RAISERROR&lt;br /&gt;doesn't change the flow of a procedure; it merely displays an error message, sets the @@ERROR&lt;br /&gt;automatic variable, and optionally writes the message to the SQL Server error log and the NT&lt;br /&gt;application event log.&lt;br /&gt;What is log shipping?&lt;br /&gt;Log shipping is the process of automating the backup of database and transaction log files on a&lt;br /&gt;production SQL server, and then restoring them onto a standby server. Enterprise Editions only&lt;br /&gt;supports log shipping. In log shipping the transactional log file from one server is automatically updated&lt;br /&gt;into the backup database on the other server. If one server fails, the other server will have the same db&lt;br /&gt;can be used this as the Disaster Recovery plan. The key feature of log shipping is that is will&lt;br /&gt;automatically backup transaction logs throughout the day and automatically restore them on the&lt;br /&gt;standby server at defined interval.&lt;br /&gt;What is the difference between a local and a global variable?&lt;br /&gt;A local temporary table exists only for the duration of a connection or, if defined inside a compound&lt;br /&gt;statement, for the duration of the compound statement.&lt;br /&gt;A global temporary table remains in the database permanently, but the rows exist only within a given&lt;br /&gt;connection. When connection are closed, the data in the global temporary table disappears. However,&lt;br /&gt;the table definition remains with the database for access when database is opened next time.&lt;br /&gt;What command do we use to rename a db?&lt;br /&gt;sp_renamedb ‘oldname’ , ‘newname’&lt;br /&gt;If someone is using db it will not accept sp_renmaedb. In that case first bring db to single user using&lt;br /&gt;sp_dboptions. Use sp_renamedb to rename database. Use sp_dboptions to bring database to multi user&lt;br /&gt;mode.&lt;br /&gt;What is sp_configure commands and set commands?&lt;br /&gt;Use sp_configure to display or change server-level settings. To change database-level settings, use&lt;br /&gt;ALTER DATABASE. To change settings that affect only the current user session, use the SET statement.&lt;br /&gt;What are the different types of replication? Explain.&lt;br /&gt;The SQL Server 2000-supported replication types are as follows:&lt;br /&gt;•Transactional&lt;br /&gt;•Snapshot&lt;br /&gt;•Merge&lt;br /&gt;Snapshot replication distributes data exactly as it appears at a specific moment in time and does not&lt;br /&gt;monitor for updates to the data. Snapshot replication is best used as a method for replicating data that&lt;br /&gt;changes infrequently or where the most up-to-date values (low latency) are not a requirement. When&lt;br /&gt;synchronization occurs, the entire snapshot is generated and sent to Subscribers.&lt;br /&gt;Transactional replication, an initial snapshot of data is applied at Subscribers, and then when data&lt;br /&gt;modifications are made at the Publisher, the individual transactions are captured and propagated to&lt;br /&gt;Subscribers.&lt;br /&gt;Merge replication is the process of distributing data from Publisher to Subscribers, allowing the&lt;br /&gt;Publisher and Subscribers to make updates while connected or disconnected, and then merging the&lt;br /&gt;updates between sites when they are connected.&lt;br /&gt;What are the OS services that the SQL Server installation adds?&lt;br /&gt;MS SQL SERVER SERVICE, SQL AGENT SERVICE, DTC (Distribution transac co-ordinator)&lt;br /&gt;What are three SQL keywords used to change or set someone’s permissions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;GRANT, DENY, and REVOKE.&lt;br /&gt;What does it mean to have quoted_identifier on? What are the implications of having it off?&lt;br /&gt;When SET QUOTED_IDENTIFIER is ON, identifiers can be delimited by double quotation marks, and&lt;br /&gt;literals must be delimited by single quotation marks. When SET QUOTED_IDENTIFIER is OFF, identifiers&lt;br /&gt;cannot be quoted and must follow all Transact-SQL rules for identifiers.&lt;br /&gt;What is the STUFF function and how does it differ from the REPLACE function?&lt;br /&gt;STUFF function to overwrite existing characters. Using this syntax, STUFF(string_expression, start,&lt;br /&gt;length, replacement_characters), string_expression is the string that will have characters substituted,&lt;br /&gt;start is the starting position, length is the number of characters in the string that are substituted, and&lt;br /&gt;replacement_characters are the new characters interjected into the string.&lt;br /&gt;REPLACE function to replace existing characters of all occurance. Using this syntax&lt;br /&gt;REPLACE(string_expression, search_string, replacement_string), where every incidence of&lt;br /&gt;search_string found in the string_expression will be replaced with replacement_string.&lt;br /&gt;Using query analyzer, name 3 ways to get an accurate count of the number of records in a&lt;br /&gt;table?&lt;br /&gt;SELECT * FROM table1&lt;br /&gt;SELECT COUNT(*) FROM table1&lt;br /&gt;SELECT rows FROM sysindexes WHERE id = OBJECT_ID(table1) AND indid &lt; 2&lt;br /&gt;How to rebuild Master Database?&lt;br /&gt;Shutdown Microsoft SQL Server 2000, and then run Rebuildm.exe. This is located in the Program&lt;br /&gt;Files\Microsoft SQL Server\80\Tools\Binn directory.&lt;br /&gt;In the Rebuild Master dialog box, click Browse.&lt;br /&gt;In the Browse for Folder dialog box, select the \Data folder on the SQL Server 2000 compact disc or in&lt;br /&gt;the shared network directory from which SQL Server 2000 was installed, and then click OK.&lt;br /&gt;Click Settings. In the Collation Settings dialog box, verify or change settings used for the master&lt;br /&gt;database and all other databases.&lt;br /&gt;Initially, the default collation settings are shown, but these may not match the collation selected during&lt;br /&gt;setup. You can select the same settings used during setup or select new collation settings. When done,&lt;br /&gt;click OK.&lt;br /&gt;In the Rebuild Master dialog box, click Rebuild to start the process.&lt;br /&gt;The Rebuild Master utility reinstalls the master database.&lt;br /&gt;To continue, you may need to stop a server that is running.&lt;br /&gt;Source: http://msdn2.microsoft.com/en-us/library/aa197950(SQL.80).aspx&lt;br /&gt;What is the basic functions for master, msdb, model, tempdb databases?&lt;br /&gt;The Master database holds information for all databases located on the SQL Server instance and is the&lt;br /&gt;glue that holds the engine together. Because SQL Server cannot start without a functioning master&lt;br /&gt;database, you must administer this database with care.&lt;br /&gt;The msdb database stores information regarding database backups, SQL Agent information, DTS&lt;br /&gt;packages, SQL Server jobs, and some replication information such as for log shipping.&lt;br /&gt;The tempdb holds temporary objects such as global and local temporary tables and stored procedures.&lt;br /&gt;The model is essentially a template database used in the creation of any new user database created in&lt;br /&gt;the instance.&lt;br /&gt;What are primary keys and foreign keys?&lt;br /&gt;Primary keys are the unique identifiers for each row. They must contain unique values and cannot be&lt;br /&gt;null. Due to their importance in relational databases, Primary keys are the most fundamental of all keys&lt;br /&gt;and constraints. A table can have only one Primary key.&lt;br /&gt;Foreign keys are both a method of ensuring data integrity and a manifestation of the relationship&lt;br /&gt;between tables.&lt;br /&gt;What is data integrity? Explain constraints?&lt;br /&gt;Data integrity is an important feature in SQL Server. When used properly, it ensures that data is&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;accurate, correct, and valid. It also acts as a trap for otherwise undetectable bugs within applications.&lt;br /&gt;A PRIMARY KEY constraint is a unique identifier for a row within a database table. Every table should&lt;br /&gt;have a primary key constraint to uniquely identify each row and only one primary key constraint can be&lt;br /&gt;created for each table. The primary key constraints are used to enforce entity integrity.&lt;br /&gt;A UNIQUE constraint enforces the uniqueness of the values in a set of columns, so no duplicate values&lt;br /&gt;are entered. The unique key constraints are used to enforce entity integrity as the primary key&lt;br /&gt;constraints.&lt;br /&gt;A FOREIGN KEY constraint prevents any actions that would destroy links between tables with the&lt;br /&gt;corresponding data values. A foreign key in one table points to a primary key in another table. Foreign&lt;br /&gt;keys prevent actions that would leave rows with foreign key values when there are no primary keys&lt;br /&gt;with that value. The foreign key constraints are used to enforce referential integrity.&lt;br /&gt;A CHECK constraint is used to limit the values that can be placed in a column. The check constraints&lt;br /&gt;are used to enforce domain integrity.&lt;br /&gt;A NOT NULL constraint enforces that the column will not accept null values. The not null constraints&lt;br /&gt;are used to enforce domain integrity, as the check constraints.&lt;br /&gt;What are the properties of the Relational tables?&lt;br /&gt;Relational tables have six properties:&lt;br /&gt;•Values are atomic.&lt;br /&gt;•Column values are of the same kind.&lt;br /&gt;•Each row is unique.&lt;br /&gt;•The sequence of columns is insignificant.&lt;br /&gt;•The sequence of rows is insignificant.&lt;br /&gt;•Each column must have a unique name.&lt;br /&gt;What is De-normalization?&lt;br /&gt;De-normalization is the process of attempting to optimize the performance of a database by adding&lt;br /&gt;redundant data. It is sometimes necessary because current DBMSs implement the relational model&lt;br /&gt;poorly. A true relational DBMS would allow for a fully normalized database at the logical level, while&lt;br /&gt;providing physical storage of data that is tuned for high performance. De-normalization is a technique&lt;br /&gt;to move from higher to lower normal forms of database modeling in order to speed up database access.&lt;br /&gt;How to get @@error and @@rowcount at the same time?&lt;br /&gt;If @@Rowcount is checked after Error checking statement then it will have 0 as the value of&lt;br /&gt;@@Recordcount as it would have been reset.&lt;br /&gt;And if @@Recordcount is checked before the error-checking statement then @@Error would get reset.&lt;br /&gt;To get @@error and @@rowcount at the same time do both in same statement and store them in local&lt;br /&gt;variable. SELECT @RC = @@ROWCOUNT, @ER = @@ERROR&lt;br /&gt;What is Identity?&lt;br /&gt;Identity (or AutoNumber) is a column that automatically generates numeric values. A start and&lt;br /&gt;increment value can be set, but most DBA leave these at 1. A GUID column also generates numbers,&lt;br /&gt;the value of this cannot be controled. Identity/GUID columns do not need to be indexed.&lt;br /&gt;What is a Scheduled Jobs or What is a Scheduled Tasks?&lt;br /&gt;Scheduled tasks let user automate processes that run on regular or predictable cycles. User can&lt;br /&gt;schedule administrative tasks, such as cube processing, to run during times of slow business activity.&lt;br /&gt;User can also determine the order in which tasks run by creating job steps within a SQL Server Agent&lt;br /&gt;job. E.g. Back up database, Update Stats of Tables. Job steps give user control over flow of execution.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If one job fails, user can configure SQL Server Agent to continue to run the remaining tasks or to stop&lt;br /&gt;execution.&lt;br /&gt;What is a table called, if it does not have neither Cluster nor Non-cluster Index? What is it&lt;br /&gt;used for?&lt;br /&gt;Unindexed table or Heap. Microsoft Press Books and Book On Line (BOL) refers it as Heap.&lt;br /&gt;A heap is a table that does not have a clustered index and, therefore, the pages are not linked by&lt;br /&gt;pointers. The IAM pages are the only structures that link the pages in a table together.&lt;br /&gt;Unindexed tables are good for fast storing of data. Many times it is better to drop all indexes from table&lt;br /&gt;and than do bulk of inserts and to restore those indexes after that.&lt;br /&gt;What is BCP? When does it used?&lt;br /&gt;BulkCopy is a tool used to copy huge amount of data from tables and views. BCP does not copy the&lt;br /&gt;structures same as source to destination.&lt;br /&gt;How do you load large data to the SQL server database?&lt;br /&gt;BulkCopy is a tool used to copy huge amount of data from tables. BULK INSERT command helps to&lt;br /&gt;Imports a data file into a database table or view in a user-specified format.&lt;br /&gt;Can we rewrite subqueries into simple select statements or with joins?&lt;br /&gt;Subqueries can often be re-written to use a standard outer join, resulting in faster performance. As we&lt;br /&gt;may know, an outer join uses the plus sign (+) operator to tell the database to return all non-matching&lt;br /&gt;rows with NULL values. Hence we combine the outer join with a NULL test in the WHERE clause to&lt;br /&gt;reproduce the result set without using a sub-query.&lt;br /&gt;Can SQL Servers linked to other servers like Oracle?&lt;br /&gt;SQL Server can be lined to any server provided it has OLE-DB provider from Microsoft to allow a link.&lt;br /&gt;E.g. Oracle has a OLE-DB provider for oracle that Microsoft provides to add it as linked server to SQL&lt;br /&gt;Server group.&lt;br /&gt;How to know which index a table is using?&lt;br /&gt;SELECT table_name,index_name FROM user_constraints&lt;br /&gt;How to copy the tables, schema and views from one SQL server to another?&lt;br /&gt;Microsoft SQL Server 2000 Data Transformation Services (DTS) is a set of graphical tools and&lt;br /&gt;programmable objects that lets user extract, transform, and consolidate data from disparate sources&lt;br /&gt;into single or multiple destinations.&lt;br /&gt;What is Self Join?&lt;br /&gt;This is a particular case when one table joins to itself, with one or two aliases to avoid confusion. A self&lt;br /&gt;join can be of any type, as long as the joined tables are the same. A self join is rather unique in that it&lt;br /&gt;involves a relationship with only one table. The common example is when company have a hierarchal&lt;br /&gt;reporting structure whereby one member of staff reports to another.&lt;br /&gt;What is Cross Join?&lt;br /&gt;A cross join that does not have a WHERE clause produces the Cartesian product of the tables involved&lt;br /&gt;in the join. The size of a Cartesian product result set is the number of rows in the first table multiplied&lt;br /&gt;by the number of rows in the second table. The common example is when company wants to combine&lt;br /&gt;each product with a pricing table to analyze each product at each price.&lt;br /&gt;Which virtual table does a trigger use?&lt;br /&gt;Inserted and Deleted.&lt;br /&gt;List few advantages of Stored Procedure.&lt;br /&gt;•Stored procedure can reduced network traffic and latency, boosting application performance.&lt;br /&gt;•Stored procedure execution plans can be reused, staying cached in SQL Server's memory,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;reducing server overhead.&lt;br /&gt;•Stored procedures help promote code reuse.&lt;br /&gt;•Stored procedures can encapsulate logic. You can change stored procedure code without&lt;br /&gt;affecting clients.&lt;br /&gt;•Stored procedures provide better security to your data.&lt;br /&gt;What is DataWarehousing?&lt;br /&gt;•Subject-oriented, meaning that the data in the database is organized so that all the data&lt;br /&gt;elements relating to the same real-world event or object are linked together;&lt;br /&gt;•Time-variant, meaning that the changes to the data in the database are tracked and recorded&lt;br /&gt;so that reports can be produced showing changes over time;&lt;br /&gt;•Non-volatile, meaning that data in the database is never over-written or deleted, once&lt;br /&gt;committed, the data is static, read-only, but retained for future reporting;&lt;br /&gt;•Integrated, meaning that the database contains data from most or all of an organization's&lt;br /&gt;operational applications, and that this data is made consistent.&lt;br /&gt;What is OLTP(OnLine Transaction Processing)?&lt;br /&gt;In OLTP - online transaction processing systems relational database design use the discipline of data&lt;br /&gt;modeling and generally follow the Codd rules of data normalization in order to ensure absolute data&lt;br /&gt;integrity. Using these rules complex information is broken down into its most simple structures (a table)&lt;br /&gt;where all of the individual atomic level elements relate to each other and satisfy the normalization&lt;br /&gt;rules.&lt;br /&gt;How do SQL server 2000 and XML linked? Can XML be used to access data?&lt;br /&gt;FOR XML (ROW, AUTO, EXPLICIT)&lt;br /&gt;You can execute SQL queries against existing relational databases to return results as XML rather than&lt;br /&gt;standard rowsets. These queries can be executed directly or from within stored procedures. To retrieve&lt;br /&gt;XML results, use the FOR XML clause of the SELECT statement and specify an XML mode of RAW, AUTO,&lt;br /&gt;or EXPLICIT.&lt;br /&gt;OPENXML&lt;br /&gt;OPENXML is a Transact-SQL keyword that provides a relational/rowset view over an in-memory XML&lt;br /&gt;document. OPENXML is a rowset provider similar to a table or a view. OPENXML provides a way to&lt;br /&gt;access XML data within the Transact-SQL context by transferring data from an XML document into the&lt;br /&gt;relational tables. Thus, OPENXML allows you to manage an XML document and its interaction with the&lt;br /&gt;relational environment.&lt;br /&gt;What is an execution plan? When would you use it? How would you view the execution plan?&lt;br /&gt;An execution plan is basically a road map that graphically or textually shows the data retrieval methods&lt;br /&gt;chosen by the SQL Server query optimizer for a stored procedure or ad-hoc query and is a very useful&lt;br /&gt;tool for a developer to understand the performance characteristics of a query or stored procedure since&lt;br /&gt;the plan is the one that SQL Server will place in its cache and use to execute the stored procedure or&lt;br /&gt;query. From within Query Analyzer is an option called "Show Execution Plan" (located on the Query&lt;br /&gt;drop-down menu). If this option is turned on it will display query execution plan in separate window&lt;br /&gt;when query is ran again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-2287654244697339612?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/2287654244697339612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/06/sql-interview-questions-with-answers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2287654244697339612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/2287654244697339612'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/06/sql-interview-questions-with-answers.html' title='SQL Interview Questions with Answers'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-1995588075964579639</id><published>2009-06-24T23:52:00.001-07:00</published><updated>2009-06-24T23:52:18.299-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RDBMS Interview Questions'/><title type='text'>RDBMS Interview Questions</title><content type='html'>1. What is database? &lt;br /&gt;A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.&lt;br /&gt;2. What is DBMS?&lt;br /&gt;It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications.&lt;br /&gt;3. What is a Database system?&lt;br /&gt;The database and DBMS software together is called as Database system.&lt;br /&gt;4. Advantages of DBMS?&lt;br /&gt;Ø Redundancy is controlled.&lt;br /&gt;Ø Unauthorised access is restricted.&lt;br /&gt;Ø Providing multiple user interfaces.&lt;br /&gt;Ø Enforcing integrity constraints.&lt;br /&gt;Ø Providing backup and recovery.&lt;br /&gt;5. Disadvantage in File Processing System?&lt;br /&gt;Ø Data redundancy &amp; inconsistency.&lt;br /&gt;Ø Difficult in accessing data.&lt;br /&gt;Ø Data isolation.&lt;br /&gt;Ø Data integrity.&lt;br /&gt;Ø Concurrent access is not possible. &lt;br /&gt;Ø Security Problems.&lt;br /&gt;6. Describe the three levels of data abstraction?&lt;br /&gt;The are three levels of abstraction:&lt;br /&gt;Ø Physical level: The lowest level of abstraction describes how data are stored.&lt;br /&gt;Ø Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data. &lt;br /&gt;Ø View level: The highest level of abstraction describes only part of entire database.&lt;br /&gt;7. Define the "integrity rules"&lt;br /&gt;There are two Integrity rules.&lt;br /&gt;Ø Entity Integrity: States that "Primary key cannot have NULL value"&lt;br /&gt;Ø Referential Integrity: States that "Foreign Key can be either a NULL value or should be Primary Key value of other relation.&lt;br /&gt;8. What is extension and intension?&lt;br /&gt;Extension - &lt;br /&gt;It is the number of tuples present in a table at any instance. This is time dependent.&lt;br /&gt;Intension - &lt;br /&gt;It is a constant value that gives the name, structure of table and the constraints laid on it.&lt;br /&gt;9. What is System R? What are its two major subsystems?&lt;br /&gt;System R was designed and developed over a period of 1974-79 at IBM San Jose Research Center. It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system. &lt;br /&gt;Its two subsystems are &lt;br /&gt;Ø Research Storage &lt;br /&gt;Ø System Relational Data System.&lt;br /&gt;10. How is the data structure of System R different from the relational structure? &lt;br /&gt;Unlike Relational systems in System R &lt;br /&gt;Ø Domains are not supported&lt;br /&gt;Ø Enforcement of candidate key uniqueness is optional&lt;br /&gt;Ø Enforcement of entity integrity is optional&lt;br /&gt;Ø Referential integrity is not enforced&lt;br /&gt;11. What is Data Independence?&lt;br /&gt;Data independence means that "the application is independent of the storage structure and access strategy of data". In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level.&lt;br /&gt;Two types of Data Independence:&lt;br /&gt;Ø Physical Data Independence: Modification in physical level should not affect the logical level. &lt;br /&gt;Ø Logical Data Independence: Modification in logical level should affect the view level. &lt;br /&gt;NOTE: Logical Data Independence is more difficult to achieve&lt;br /&gt;12. What is a view? How it is related to data independence?&lt;br /&gt;A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary.&lt;br /&gt;Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users from the effects of restructuring and growth in the database. Hence accounts for logical data independence.&lt;br /&gt;13. What is Data Model?&lt;br /&gt;A collection of conceptual tools for describing data, data relationships data semantics and constraints.&lt;br /&gt;14. What is E-R model?&lt;br /&gt;This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes.&lt;br /&gt;15. What is Object Oriented model?&lt;br /&gt;This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.&lt;br /&gt;16. What is an Entity?&lt;br /&gt;It is a 'thing' in the real world with an independent existence.&lt;br /&gt;17. What is an Entity type?&lt;br /&gt;It is a collection (set) of entities that have same attributes.&lt;br /&gt;18. What is an Entity set?&lt;br /&gt;It is a collection of all entities of particular entity type in the database.&lt;br /&gt;19. What is an Extension of entity type?&lt;br /&gt;The collections of entities of a particular entity type are grouped together into an entity set.&lt;br /&gt;20. What is Weak Entity set?&lt;br /&gt;An entity set may not have sufficient attributes to form a primary key, and its primary key compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set.&lt;br /&gt;21. What is an attribute?&lt;br /&gt;It is a particular property, which describes the entity. &lt;br /&gt;22. What is a Relation Schema and a Relation?&lt;br /&gt;A relation Schema denoted by R(A1, A2, …, An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation which contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered list of n-values t=(v1,v2, ..., vn).&lt;br /&gt;23. What is degree of a Relation?&lt;br /&gt;It is the number of attribute of its relation schema.&lt;br /&gt;24. What is Relationship?&lt;br /&gt;It is an association among two or more entities.&lt;br /&gt;25. What is Relationship set? &lt;br /&gt;The collection (or set) of similar relationships.&lt;br /&gt;26. What is Relationship type? &lt;br /&gt;Relationship type defines a set of associations or a relationship set among a given set of entity types. &lt;br /&gt;27. What is degree of Relationship type? &lt;br /&gt;It is the number of entity type participating.&lt;br /&gt;25. What is DDL (Data Definition Language)?&lt;br /&gt;A data base schema is specifies by a set of definitions expressed by a special language called DDL.&lt;br /&gt;26. What is VDL (View Definition Language)?&lt;br /&gt;It specifies user views and their mappings to the conceptual schema.&lt;br /&gt;27. What is SDL (Storage Definition Language)?&lt;br /&gt;This language is to specify the internal schema. This language may specify the mapping between two schemas.&lt;br /&gt;28. What is Data Storage - Definition Language?&lt;br /&gt;The storage structures and access methods used by database system are specified by a set of definition in a special type of DDL called data storage-definition language.&lt;br /&gt;29. What is DML (Data Manipulation Language)?&lt;br /&gt;This language that enable user to access or manipulate data as organised by appropriate data model.&lt;br /&gt;Ø Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data.&lt;br /&gt;Ø Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data.&lt;br /&gt;31. What is DML Compiler?&lt;br /&gt;It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand.&lt;br /&gt;32. What is Query evaluation engine?&lt;br /&gt;It executes low-level instruction generated by compiler.&lt;br /&gt;33. What is DDL Interpreter?&lt;br /&gt;It interprets DDL statements and record them in tables containing metadata.&lt;br /&gt;34. What is Record-at-a-time?&lt;br /&gt;The Low level or Procedural DML can specify and retrieve each record from a set of records. This retrieve of a record is said to be Record-at-a-time.&lt;br /&gt;35. What is Set-at-a-time or Set-oriented?&lt;br /&gt;The High level or Non-procedural DML can specify and retrieve many records in a single DML statement. This retrieve of a record is said to be Set-at-a-time or Set-oriented.&lt;br /&gt;36. What is Relational Algebra?&lt;br /&gt;It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation. &lt;br /&gt;37. What is Relational Calculus?&lt;br /&gt;It is an applied predicate calculus specifically tailored for relational databases proposed by E.F. Codd. E.g. of languages based on it are DSL ALPHA, QUEL.&lt;br /&gt;38. How does Tuple-oriented relational calculus differ from domain-oriented relational calculus&lt;br /&gt;The tuple-oriented calculus uses a tuple variables i.e., variable whose only permitted values are tuples of that relation. E.g. QUEL&lt;br /&gt;The domain-oriented calculus has domain variables i.e., variables that range over the underlying domains instead of over relation. E.g. ILL, DEDUCE.&lt;br /&gt;39. What is normalization? &lt;br /&gt;It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties&lt;br /&gt;Ø Minimizing redundancy&lt;br /&gt;Ø Minimizing insertion, deletion and update anomalies. &lt;br /&gt;40. What is Functional Dependency? &lt;br /&gt;A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y.&lt;br /&gt;41. When is a functional dependency F said to be minimal? &lt;br /&gt;Ø Every dependency in F has a single attribute for its right hand side.&lt;br /&gt;Ø We cannot replace any dependency X A in F with a dependency Y A where Y is a proper subset of X and still have a set of dependency that is equivalent to F.&lt;br /&gt;Ø We cannot remove any dependency from F and still have set of dependency that is equivalent to F.&lt;br /&gt;42. What is Multivalued dependency?&lt;br /&gt;Multivalued dependency denoted by X Y specified on relation schema R, where X and Y are both subsets of R, specifies the following constraint on any relation r of R: if two tuples t1 and t2 exist in r such that t1[X] = t2[X] then t3 and t4 should also exist in r with the following properties&lt;br /&gt;Ø t3[x] = t4[X] = t1[X] = t2[X]&lt;br /&gt;Ø t3[Y] = t1[Y] and t4[Y] = t2[Y]&lt;br /&gt;Ø t3[Z] = t2[Z] and t4[Z] = t1[Z] &lt;br /&gt;where [Z = (R-(X U Y)) ]&lt;br /&gt;43. What is Lossless join property?&lt;br /&gt;It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition.&lt;br /&gt;44. What is 1 NF (Normal Form)?&lt;br /&gt;The domain of attribute must include only atomic (simple, indivisible) values. &lt;br /&gt;45. What is Fully Functional dependency? &lt;br /&gt;It is based on concept of full functional dependency. A functional dependency X Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more.&lt;br /&gt;46. What is 2NF? &lt;br /&gt;A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.&lt;br /&gt;47. What is 3NF?&lt;br /&gt;A relation schema R is in 3NF if it is in 2NF and for every FD X A either of the following is true&lt;br /&gt;Ø X is a Super-key of R.&lt;br /&gt;Ø A is a prime attribute of R.&lt;br /&gt;In other words, if every non prime attribute is non-transitively dependent on primary key.&lt;br /&gt;48. What is BCNF (Boyce-Codd Normal Form)?&lt;br /&gt;A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that for every FD X A, X must be a candidate key.&lt;br /&gt;49. What is 4NF?&lt;br /&gt;A relation schema R is said to be in 4NF if for every Multivalued dependency X Y that holds over R, one of following is true&lt;br /&gt;Ø X is subset or equal to (or) XY = R.&lt;br /&gt;Ø X is a super key.&lt;br /&gt;50. What is 5NF?&lt;br /&gt;A Relation schema R is said to be 5NF if for every join dependency {R1, R2, ..., Rn} that holds R, one the following is true &lt;br /&gt;Ø Ri = R for some i.&lt;br /&gt;Ø The join dependency is implied by the set of FD, over R in which the left side is key of R. &lt;br /&gt;51. What is Domain-Key Normal Form?&lt;br /&gt;A relation is said to be in DKNF if all constraints and dependencies that should hold on the the constraint can be enforced by simply enforcing the domain constraint and key constraint on the relation. &lt;br /&gt;52. What are partial, alternate,, artificial, compound and natural key?&lt;br /&gt;Partial Key:&lt;br /&gt;It is a set of attributes that can uniquely identify weak entities and that are related to same owner entity. It is sometime called as Discriminator.&lt;br /&gt;Alternate Key:&lt;br /&gt;All Candidate Keys excluding the Primary Key are known as Alternate Keys.&lt;br /&gt;Artificial Key:&lt;br /&gt;If no obvious key, either stand alone or compound is available, then the last resort is to simply create a key, by assigning a unique number to each record or occurrence. Then this is known as developing an artificial key.&lt;br /&gt;Compound Key:&lt;br /&gt;If no single data element uniquely identifies occurrences within a construct, then combining multiple elements to create a unique identifier for the construct is known as creating a compound key.&lt;br /&gt;Natural Key:&lt;br /&gt;When one of the data elements stored within a construct is utilized as the primary key, then it is called the natural key.&lt;br /&gt;53. What is indexing and what are the different kinds of indexing?&lt;br /&gt;Indexing is a technique for determining how quickly specific data can be found.&lt;br /&gt;Types:&lt;br /&gt;Ø Binary search style indexing&lt;br /&gt;Ø B-Tree indexing&lt;br /&gt;Ø Inverted list indexing&lt;br /&gt;Ø Memory resident table&lt;br /&gt;Ø Table indexing&lt;br /&gt;54. What is system catalog or catalog relation? How is better known as?&lt;br /&gt;A RDBMS maintains a description of all the data that it contains, information about every relation and index that it contains. This information is stored in a collection of relations maintained by the system called metadata. It is also called data dictionary.&lt;br /&gt;55. What is meant by query optimization?&lt;br /&gt;The phase that identifies an efficient execution plan for evaluating a query that has the least estimated cost is referred to as query optimization.&lt;br /&gt;56. What is join dependency and inclusion dependency?&lt;br /&gt;Join Dependency:&lt;br /&gt;A Join dependency is generalization of Multivalued dependency.A JD {R1, R2, ..., Rn} is said to hold over a relation R if R1, R2, R3, ..., Rn is a lossless-join decomposition of R . There is no set of sound and complete inference rules for JD.&lt;br /&gt;Inclusion Dependency:&lt;br /&gt;An Inclusion Dependency is a statement of the form that some columns of a relation are contained in other columns. A foreign key constraint is an example of inclusion dependency.&lt;br /&gt;57. What is durability in DBMS?&lt;br /&gt;Once the DBMS informs the user that a transaction has successfully completed, its effects should persist even if the system crashes before all its changes are reflected on disk. This property is called durability.&lt;br /&gt;58. What do you mean by atomicity and aggregation?&lt;br /&gt;Atomicity:&lt;br /&gt;Either all actions are carried out or none are. Users should not have to worry about the effect of incomplete transactions. DBMS ensures this by undoing the actions of incomplete transactions.&lt;br /&gt;Aggregation:&lt;br /&gt;A concept which is used to model a relationship between a collection of entities and relationships. It is used when we need to express a relationship among relationships.&lt;br /&gt;59. What is a Phantom Deadlock?&lt;br /&gt;In distributed deadlock detection, the delay in propagating local information might cause the deadlock detection algorithms to identify deadlocks that do not really exist. Such situations are called phantom deadlocks and they lead to unnecessary aborts.&lt;br /&gt;60. What is a checkpoint and When does it occur?&lt;br /&gt;A Checkpoint is like a snapshot of the DBMS state. By taking checkpoints, the DBMS can reduce the amount of work to be done during restart in the event of subsequent crashes.&lt;br /&gt;61. What are the different phases of transaction?&lt;br /&gt;Different phases are&lt;br /&gt;Ø Analysis phase&lt;br /&gt;Ø Redo Phase&lt;br /&gt;Ø Undo phase&lt;br /&gt;62. What do you mean by flat file database?&lt;br /&gt;It is a database in which there are no programs or user access languages. It has no cross-file capabilities but is user-friendly and provides user-interface management.&lt;br /&gt;63. What is "transparent DBMS"?&lt;br /&gt;It is one, which keeps its Physical Structure hidden from user.&lt;br /&gt;64. Brief theory of Network, Hierarchical schemas and their properties&lt;br /&gt;Network schema uses a graph data structure to organize records example for such a database management system is CTCG while a hierarchical schema uses a tree data structure example for such a system is IMS.&lt;br /&gt;65. What is a query?&lt;br /&gt;A query with respect to DBMS relates to user commands that are used to interact with a data base. The query language can be classified into data definition language and data manipulation language.&lt;br /&gt;66. What do you mean by Correlated subquery?&lt;br /&gt;Subqueries, or nested queries, are used to bring back a set of rows to be used by the parent query. Depending on how the subquery is written, it can be executed once for the parent query or it can be executed once for each row returned by the parent query. If the subquery is executed for each row of the parent, this is called a correlated subquery. &lt;br /&gt;A correlated subquery can be easily identified if it contains any references to the parent subquery columns in its WHERE clause. Columns from the subquery cannot be referenced anywhere else in the parent query. The following example demonstrates a non-correlated subquery. &lt;br /&gt;E.g. Select * From CUST Where '10/03/1990' IN (Select ODATE From ORDER Where CUST.CNUM = ORDER.CNUM)&lt;br /&gt;67. What are the primitive operations common to all record management systems?&lt;br /&gt;Addition, deletion and modification.&lt;br /&gt;68. Name the buffer in which all the commands that are typed in are stored&lt;br /&gt;'Edit' Buffer&lt;br /&gt;69. What are the unary operations in Relational Algebra?&lt;br /&gt;PROJECTION and SELECTION.&lt;br /&gt;70. Are the resulting relations of PRODUCT and JOIN operation the same?&lt;br /&gt;No.&lt;br /&gt;PRODUCT: Concatenation of every row in one relation with every row in another.&lt;br /&gt;JOIN: Concatenation of rows from one relation and related rows from another.&lt;br /&gt;71. What is RDBMS KERNEL?&lt;br /&gt;Two important pieces of RDBMS architecture are the kernel, which is the software, and the data dictionary, which consists of the system-level data structures used by the kernel to manage the database&lt;br /&gt;You might think of an RDBMS as an operating system (or set of subsystems), designed specifically for controlling data access; its primary functions are storing, retrieving, and securing data. An RDBMS maintains its own list of authorized users and their associated privileges; manages memory caches and paging; controls locking for concurrent resource usage; dispatches and schedules user requests; and manages space usage within its table-space structures&lt;br /&gt;.&lt;br /&gt;72. Name the sub-systems of a RDBMS&lt;br /&gt;I/O, Security, Language Processing, Process Control, Storage Management, Logging and Recovery, Distribution Control, Transaction Control, Memory Management, Lock Management&lt;br /&gt;73. Which part of the RDBMS takes care of the data dictionary? How&lt;br /&gt;Data dictionary is a set of tables and database objects that is stored in a special area of the database and maintained exclusively by the kernel.&lt;br /&gt;74. What is the job of the information stored in data-dictionary?&lt;br /&gt;The information in the data dictionary validates the existence of the objects, provides access to them, and maps the actual physical storage location. &lt;br /&gt;75. Not only RDBMS takes care of locating data it also &lt;br /&gt;determines an optimal access path to store or retrieve the data&lt;br /&gt;76. How do you communicate with an RDBMS?&lt;br /&gt;You communicate with an RDBMS using Structured Query Language (SQL)&lt;br /&gt;77. Define SQL and state the differences between SQL and other conventional programming Languages&lt;br /&gt;SQL is a nonprocedural language that is designed specifically for data access operations on normalized relational database structures. The primary difference between SQL and other conventional programming languages is that SQL statements specify what data operations should be performed rather than how to perform them. &lt;br /&gt;78. Name the three major set of files on disk that compose a database in Oracle&lt;br /&gt;There are three major sets of files on disk that compose a database. All the files are binary. These are&lt;br /&gt;Ø Database files &lt;br /&gt;Ø Control files &lt;br /&gt;Ø Redo logs &lt;br /&gt;The most important of these are the database files where the actual data resides. The control files and the redo logs support the functioning of the architecture itself. &lt;br /&gt;All three sets of files must be present, open, and available to Oracle for any data on the database to be useable. Without these files, you cannot access the database, and the database administrator might have to recover some or all of the database using a backup, if there is one. &lt;br /&gt;79. What is an Oracle Instance?&lt;br /&gt;The Oracle system processes, also known as Oracle background processes, provide functions for the user processes-functions that would otherwise be done by the user processes themselves&lt;br /&gt;Oracle database-wide system memory is known as the SGA, the system global area or shared global area. The data and control structures in the SGA are shareable, and all the Oracle background processes and user processes can use them. &lt;br /&gt;The combination of the SGA and the Oracle background processes is known as an Oracle instance&lt;br /&gt;80. What are the four Oracle system processes that must always be up and running for the database to be useable&lt;br /&gt;The four Oracle system processes that must always be up and running for the database to be useable include DBWR (Database Writer), LGWR (Log Writer), SMON (System Monitor), and PMON (Process Monitor). &lt;br /&gt;81. What are database files, control files and log files. How many of these files should a database have at least? Why?&lt;br /&gt;Database Files &lt;br /&gt;The database files hold the actual data and are typically the largest in size. Depending on their sizes, the tables (and other objects) for all the user accounts can go in one database file-but that's not an ideal situation because it does not make the database structure very flexible for controlling access to storage for different users, putting the database on different disk drives, or backing up and restoring just part of the database. &lt;br /&gt;You must have at least one database file but usually, more than one files are used. In terms of accessing and using the data in the tables and other objects, the number (or location) of the files is immaterial. &lt;br /&gt;The database files are fixed in size and never grow bigger than the size at which they were created&lt;br /&gt;Control Files &lt;br /&gt;The control files and redo logs support the rest of the architecture. Any database must have at least one control file, although you typically have more than one to guard against loss. The control file records the name of the database, the date and time it was created, the location of the database and redo logs, and the synchronization information to ensure that all three sets of files are always in step. Every time you add a new database or redo log file to the database, the information is recorded in the control files. &lt;br /&gt;Redo Logs &lt;br /&gt;Any database must have at least two redo logs. These are the journals for the database; the redo logs record all changes to the user objects or system objects. If any type of failure occurs, the changes recorded in the redo logs can be used to bring the database to a consistent state without losing any committed transactions. In the case of non-data loss failure, Oracle can apply the information in the redo logs automatically without intervention from the DBA. &lt;br /&gt;The redo log files are fixed in size and never grow dynamically from the size at which they were created. &lt;br /&gt;82. What is ROWID?&lt;br /&gt;The ROWID is a unique database-wide physical address for every row on every table. Once assigned (when the row is first inserted into the database), it never changes until the row is deleted or the table is dropped. &lt;br /&gt;The ROWID consists of the following three components, the combination of which uniquely identifies the physical storage location of the row. &lt;br /&gt;Ø Oracle database file number, which contains the block with the rows&lt;br /&gt;Ø Oracle block address, which contains the row &lt;br /&gt;Ø The row within the block (because each block can hold many rows) &lt;br /&gt;The ROWID is used internally in indexes as a quick means of retrieving rows with a particular key value. Application developers also use it in SQL statements as a quick way to access a row once they know the ROWID&lt;br /&gt;83. What is Oracle Block? Can two Oracle Blocks have the same address?&lt;br /&gt;Oracle "formats" the database files into a number of Oracle blocks when they are first created-making it easier for the RDBMS software to manage the files and easier to read data into the memory areas. &lt;br /&gt;The block size should be a multiple of the operating system block size. Regardless of the block size, the entire block is not available for holding data; Oracle takes up some space to manage the contents of the block. This block header has a minimum size, but it can grow. &lt;br /&gt;These Oracle blocks are the smallest unit of storage. Increasing the Oracle block size can improve performance, but it should be done only when the database is first created. &lt;br /&gt;Each Oracle block is numbered sequentially for each database file starting at 1. Two blocks can have the same block address if they are in different database files. &lt;br /&gt;84. What is database Trigger?&lt;br /&gt;A database trigger is a PL/SQL block that can defined to automatically execute for insert, update, and delete statements against a table. The trigger can e defined to execute once for the entire statement or once for every row that is inserted, updated, or deleted. For any one table, there are twelve events for which you can define database triggers. A database trigger can call database procedures that are also written in PL/SQL. &lt;br /&gt;85. Name two utilities that Oracle provides, which are use for backup and recovery.&lt;br /&gt;Along with the RDBMS software, Oracle provides two utilities that you can use to back up and restore the database. These utilities are Export and Import. &lt;br /&gt;The Export utility dumps the definitions and data for the specified part of the database to an operating system binary file. The Import utility reads the file produced by an export, recreates the definitions of objects, and inserts the data&lt;br /&gt;If Export and Import are used as a means of backing up and recovering the database, all the changes made to the database cannot be recovered since the export was performed. The best you can do is recover the database to the time when the export was last performed. &lt;br /&gt;86. What are stored-procedures? And what are the advantages of using them.&lt;br /&gt;Stored procedures are database objects that perform a user defined operation. A stored procedure can have a set of compound SQL statements. A stored procedure executes the SQL commands and returns the result to the client. Stored procedures are used to reduce network traffic.&lt;br /&gt;87. How are exceptions handled in PL/SQL? Give some of the internal exceptions' name&lt;br /&gt;PL/SQL exception handling is a mechanism for dealing with run-time errors encountered during procedure execution. Use of this mechanism enables execution to continue if the error is not severe enough to cause procedure termination. &lt;br /&gt;The exception handler must be defined within a subprogram specification. Errors cause the program to raise an exception with a transfer of control to the exception-handler block. After the exception handler executes, control returns to the block in which the handler was defined. If there are no more executable statements in the block, control returns to the caller. &lt;br /&gt;User-Defined Exceptions &lt;br /&gt;PL/SQL enables the user to define exception handlers in the declarations area of subprogram specifications. User accomplishes this by naming an exception as in the following example: &lt;br /&gt;ot_failure EXCEPTION;&lt;br /&gt;In this case, the exception name is ot_failure. Code associated with this handler is written in the EXCEPTION specification area as follows: &lt;br /&gt;EXCEPTION&lt;br /&gt;when OT_FAILURE then&lt;br /&gt;out_status_code := g_out_status_code;&lt;br /&gt;out_msg := g_out_msg;&lt;br /&gt;The following is an example of a subprogram exception: &lt;br /&gt;EXCEPTION&lt;br /&gt;when NO_DATA_FOUND then&lt;br /&gt;g_out_status_code := 'FAIL';&lt;br /&gt;RAISE ot_failure;&lt;br /&gt;Within this exception is the RAISE statement that transfers control back to the ot_failure exception handler. This technique of raising the exception is used to invoke all user-defined exceptions. &lt;br /&gt;System-Defined Exceptions &lt;br /&gt;Exceptions internal to PL/SQL are raised automatically upon error. NO_DATA_FOUND is a system-defined exception. Table below gives a complete list of internal exceptions. &lt;br /&gt;PL/SQL internal exceptions. &lt;br /&gt;Exception Name Oracle Error&lt;br /&gt;CURSOR_ALREADY_OPEN ORA-06511&lt;br /&gt;DUP_VAL_ON_INDEX ORA-00001&lt;br /&gt;INVALID_CURSOR ORA-01001&lt;br /&gt;INVALID_NUMBER ORA-01722&lt;br /&gt;LOGIN_DENIED ORA-01017&lt;br /&gt;NO_DATA_FOUND ORA-01403&lt;br /&gt;NOT_LOGGED_ON ORA-01012&lt;br /&gt;PROGRAM_ERROR ORA-06501&lt;br /&gt;STORAGE_ERROR ORA-06500&lt;br /&gt;TIMEOUT_ON_RESOURCE ORA-00051&lt;br /&gt;TOO_MANY_ROWS ORA-01422&lt;br /&gt;TRANSACTION_BACKED_OUT ORA-00061&lt;br /&gt;VALUE_ERROR ORA-06502&lt;br /&gt;ZERO_DIVIDE ORA-01476&lt;br /&gt;In addition to this list of exceptions, there is a catch-all exception named OTHERS that traps all errors for which specific error handling has not been established.&lt;br /&gt;88. Does PL/SQL support "overloading"? Explain&lt;br /&gt;The concept of overloading in PL/SQL relates to the idea that you can define procedures and functions with the same name. PL/SQL does not look only at the referenced name, however, to resolve a procedure or function call. The count and data types of formal parameters are also considered. &lt;br /&gt;PL/SQL also attempts to resolve any procedure or function calls in locally defined packages before looking at globally defined packages or internal functions. To further ensure calling the proper procedure, you can use the dot notation. Prefacing a procedure or function name with the package name fully qualifies any procedure or function reference. &lt;br /&gt;89. Tables derived from the ERD &lt;br /&gt;a) Are totally unnormalised&lt;br /&gt;b) Are always in 1NF&lt;br /&gt;c) Can be further denormalised&lt;br /&gt;d) May have multi-valued attributes&lt;br /&gt;(b) Are always in 1NF&lt;br /&gt;90. Spurious tuples may occur due to&lt;br /&gt;i. Bad normalization &lt;br /&gt;ii. Theta joins&lt;br /&gt;iii. Updating tables from join&lt;br /&gt;a) i &amp; ii b) ii &amp; iii&lt;br /&gt;c) i &amp; iii d) ii &amp; iii&lt;br /&gt;(a) i &amp; ii because theta joins are joins made on keys that are not primary keys.&lt;br /&gt;91. A B C is a set of attributes. The functional dependency is as follows&lt;br /&gt;AB -&gt; B&lt;br /&gt;AC -&gt; C&lt;br /&gt;C -&gt; B&lt;br /&gt;a) is in 1NF&lt;br /&gt;b) is in 2NF&lt;br /&gt;c) is in 3NF&lt;br /&gt;d) is in BCNF&lt;br /&gt;(a) is in 1NF since (AC)+ = { A, B, C} hence AC is the primary key. Since C B is a FD given, where neither C is a Key nor B is a prime attribute, this it is not in 3NF. Further B is not functionally dependent on key AC thus it is not in 2NF. Thus the given FDs is in 1NF. &lt;br /&gt;92. In mapping of ERD to DFD &lt;br /&gt;a) entities in ERD should correspond to an existing entity/store in DFD&lt;br /&gt;b) entity in DFD is converted to attributes of an entity in ERD&lt;br /&gt;c) relations in ERD has 1 to 1 correspondence to processes in DFD&lt;br /&gt;d) relationships in ERD has 1 to 1 correspondence to flows in DFD&lt;br /&gt;(a) entities in ERD should correspond to an existing entity/store in DFD&lt;br /&gt;93. A dominant entity is the entity&lt;br /&gt;a) on the N side in a 1 : N relationship&lt;br /&gt;b) on the 1 side in a 1 : N relationship&lt;br /&gt;c) on either side in a 1 : 1 relationship&lt;br /&gt;d) nothing to do with 1 : 1 or 1 : N relationship&lt;br /&gt;(b) on the 1 side in a 1 : N relationship&lt;br /&gt;94. Select 'NORTH', CUSTOMER From CUST_DTLS Where REGION = 'N' Order By &lt;br /&gt;CUSTOMER Union Select 'EAST', CUSTOMER From CUST_DTLS Where REGION = 'E' Order By CUSTOMER&lt;br /&gt;The above is&lt;br /&gt;a) Not an error&lt;br /&gt;b) Error - the string in single quotes 'NORTH' and 'SOUTH'&lt;br /&gt;c) Error - the string should be in double quotes&lt;br /&gt;d) Error - ORDER BY clause&lt;br /&gt;(d) Error - the ORDER BY clause. Since ORDER BY clause cannot be used in UNIONS&lt;br /&gt;95. What is Storage Manager? &lt;br /&gt;It is a program module that provides the interface between the low-level data stored in database, application programs and queries submitted to the system. &lt;br /&gt;&lt;br /&gt;96. What is Buffer Manager?&lt;br /&gt;It is a program module, which is responsible for fetching data from disk storage into main memory and deciding what data to be cache in memory. &lt;br /&gt;97. What is Transaction Manager?&lt;br /&gt;It is a program module, which ensures that database, remains in a consistent state despite system failures and concurrent transaction execution proceeds without conflicting.&lt;br /&gt;98. What is File Manager?&lt;br /&gt;It is a program module, which manages the allocation of space on disk storage and data structure used to represent information stored on a disk. &lt;br /&gt;99. What is Authorization and Integrity manager?&lt;br /&gt;It is the program module, which tests for the satisfaction of integrity constraint and checks the authority of user to access data. &lt;br /&gt;100. What are stand-alone procedures?&lt;br /&gt;Procedures that are not part of a package are known as stand-alone because they independently defined. A good example of a stand-alone procedure is one written in a SQL*Forms application. These types of procedures are not available for reference from other Oracle tools. Another limitation of stand-alone procedures is that they are compiled at run time, which slows execution.&lt;br /&gt;101. What are cursors give different types of cursors.&lt;br /&gt;PL/SQL uses cursors for all database information accesses statements. The language supports the use two types of cursors&lt;br /&gt;Ø Implicit &lt;br /&gt;Ø Explicit&lt;br /&gt;102. What is cold backup and hot backup (in case of Oracle)?&lt;br /&gt;Ø Cold Backup: &lt;br /&gt;It is copying the three sets of files (database files, redo logs, and control file) when the instance is shut down. This is a straight file copy, usually from the disk directly to tape. You must shut down the instance to guarantee a consistent copy. &lt;br /&gt;If a cold backup is performed, the only option available in the event of data file loss is restoring all the files from the latest backup. All work performed on the database since the last backup is lost. &lt;br /&gt;Ø Hot Backup: &lt;br /&gt;Some sites (such as worldwide airline reservations systems) cannot shut down the database while making a backup copy of the files. The cold backup is not an available option. &lt;br /&gt;So different means of backing up database must be used - the hot backup. Issue a SQL command to indicate to Oracle, on a tablespace-by-tablespace basis, that the files of the tablespace are to backed up. The users can continue to make full use of the files, including making changes to the data. Once the user has indicated that he/she wants to back up the tablespace files, he/she can use the operating system to copy those files to the desired backup destination. &lt;br /&gt;The database must be running in ARCHIVELOG mode for the hot backup option. &lt;br /&gt;If a data loss failure does occur, the lost database files can be restored using the hot backup and the online and offline redo logs created since the backup was done. The database is restored to the most consistent state without any loss of committed transactions. &lt;br /&gt;103. What are Armstrong rules? How do we say that they are complete and/or sound&lt;br /&gt;The well-known inference rules for FDs &lt;br /&gt;Ø Reflexive rule : &lt;br /&gt;If Y is subset or equal to X then X Y.&lt;br /&gt;Ø Augmentation rule:&lt;br /&gt;If X Y then XZ YZ.&lt;br /&gt;Ø Transitive rule:&lt;br /&gt;If {X Y, Y Z} then X Z.&lt;br /&gt;Ø Decomposition rule :&lt;br /&gt;If X YZ then X Y.&lt;br /&gt;Ø Union or Additive rule:&lt;br /&gt;If {X Y, X Z} then X YZ.&lt;br /&gt;Ø Pseudo Transitive rule :&lt;br /&gt;If {X Y, WY Z} then WX Z.&lt;br /&gt;Of these the first three are known as Amstrong Rules. They are sound because it is enough if a set of FDs satisfy these three. They are called complete because using these three rules we can generate the rest all inference rules.&lt;br /&gt;104. How can you find the minimal key of relational schema?&lt;br /&gt;Minimal key is one which can identify each tuple of the given relation schema uniquely. For finding the minimal key it is required to find the closure that is the set of all attributes that are dependent on any given set of attributes under the given set of functional dependency.&lt;br /&gt;Algo. I Determining X+, closure for X, given set of FDs F&lt;br /&gt;1. Set X+ = X&lt;br /&gt;2. Set Old X+ = X+&lt;br /&gt;3. For each FD Y Z in F and if Y belongs to X+ then add Z to X+&lt;br /&gt;4. Repeat steps 2 and 3 until Old X+ = X+&lt;br /&gt;Algo.II Determining minimal K for relation schema R, given set of FDs F&lt;br /&gt;1. Set K to R that is make K a set of all attributes in R&lt;br /&gt;2. For each attribute A in K &lt;br /&gt;a. Compute (K - A)+ with respect to F&lt;br /&gt;b. If (K - A)+ = R then set K = (K - A)+&lt;br /&gt;105. What do you understand by dependency preservation?&lt;br /&gt;Given a relation R and a set of FDs F, dependency preservation states that the closure of the union of the projection of F on each decomposed relation Ri is equal to the closure of F. i.e., &lt;br /&gt;((PR1(F)) U … U (PRn(F)))+ = F+&lt;br /&gt;if decomposition is not dependency preserving, then some dependency is lost in the decomposition.&lt;br /&gt;106. What is meant by Proactive, Retroactive and Simultaneous Update.&lt;br /&gt;Proactive Update:&lt;br /&gt;The updates that are applied to database before it becomes effective in real world .&lt;br /&gt;Retroactive Update: &lt;br /&gt;The updates that are applied to database after it becomes effective in real world .&lt;br /&gt;Simulatneous Update:&lt;br /&gt;The updates that are applied to database at the same time when it becomes effective in real world .&lt;br /&gt;107. What are the different types of JOIN operations? &lt;br /&gt;Equi Join: This is the most common type of join which involves only equality comparisions. The disadvantage in this type of join is that there&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-1995588075964579639?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/1995588075964579639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/06/rdbms-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/1995588075964579639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/1995588075964579639'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/06/rdbms-interview-questions.html' title='RDBMS Interview Questions'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-138524136031051065</id><published>2009-06-24T23:48:00.001-07:00</published><updated>2009-07-03T23:32:41.802-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is the differnce between store procedure and Functions (UDF)'/><title type='text'>What is the differnce between store procedure and Functions (UDF)</title><content type='html'>A procedure or function is an object stored in the database, and run as a unit to solve a specific problem or perform a set of related tasks. Procedures and functions permit the caller to provide parameters that can be input only, output only, or input and output values. Procedures and functions let you combine the ease and flexibility of SQL with the procedural functionality of a structured programming language&lt;br /&gt;1. Return Type: Functions should return atleast one output parameter. On the other hand it is not mandatory for the SP to return any value, but it could return one or more values limit is 1024.&lt;br /&gt;2. Compiled Type: Functions are parsed and compile at runtime. On the other hand SP are stored in database as Compiled form.&lt;br /&gt;3. State of the Database: Functions can not effects the state of the database, they cant invoke DDL (Database definition language) but can use DML (Data Manipulation Language). On the other hand SP can effect the state of database using DDL and use commit.&lt;br /&gt;4. Invoke: Functions can be invoke from the SQL Statement e.g. Select. Whereas  SP can not be invoke using Select Command.&lt;br /&gt;5. Usage: Functions are generally use for computing values whereas SP use to apply business logics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/661597201796672556-138524136031051065?l=kalitinterviewquestions.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kalitinterviewquestions.blogspot.com/feeds/138524136031051065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/06/what-is-differnce-between-store.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/138524136031051065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/661597201796672556/posts/default/138524136031051065'/><link rel='alternate' type='text/html' href='http://kalitinterviewquestions.blogspot.com/2009/06/what-is-differnce-between-store.html' title='What is the differnce between store procedure and Functions (UDF)'/><author><name>kalit</name><uri>http://www.blogger.com/profile/06926361249526760368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/_zpFefy31Gkc/SYKUiboDxmI/AAAAAAAAAAM/jjnmmi0D6m8/S220/NetSet.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-661597201796672556.post-368670072970926038</id><published>2009-06-24T23:46:00.001-07:00</published><updated>2009-06-24T23:46:50.333-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Questions on ADO.net'/><title type='text'>Interview Questions on ADO.net</title><content type='html'>1.    What is ADO.Net? &lt;br /&gt; &lt;br /&gt;ActiveX Data Object (ADO).NET is the primary relational data access model for Microsoft .NET-based applications. ADO.Net provides consistent data access from database management system (DBMS) such as SQL Server, Oracle etc. ADO.NET is exclusively designed to meet the requirements of web-based applications model such as disconnected data architecture, integration with XML, common data representation, combining data from multiple data sources, and optimization in interacting with the database.  &lt;br /&gt;  &lt;br /&gt;2.    Explain the ADO .Net Architecture? &lt;br /&gt; &lt;br /&gt;ADO.NET Architecture includes three data providers for implementing connectivity with databases: SQL Server .NET Data Provider, OLEDB .NET Data Provider, and ODBC .Net Data Provider. You can access data through data provider in two ways either using a DataReader or DataAdapter.&lt;br /&gt;&lt;br /&gt;Leverage current ADO knowledge &lt;br /&gt;Support the N-Tier programming model &lt;br /&gt;Provide support for XML &lt;br /&gt; &lt;br /&gt;In distributed applications, the concept of working with disconnected data has become very common. A disconnected model means that once you have retrieved the data that you need, the connection to the data source is dropped—you work with the data locally. The reason why this model has become so popular is that it frees up precious database server resources, which leads to highly scalable applications. The ADO.NET solution for disconnected data is the DataSet object. &lt;br /&gt;&lt;br /&gt;Data Access in ADO.NET relies on two components:&lt;br /&gt;&lt;br /&gt;DataSet &lt;br /&gt;Data Provider. &lt;br /&gt;DataSet&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The ADO.NET Data Set is explicitly designed for data access independent of any data source. As a result, it can be used with multiple and differing data sources, used with XML data, or used to manage data local to the application. The DataSet contains a collection of one or more objects made up of rows and columns of data, as well as primary key, foreign key, constraint, and relation information about the data in the DataTable objects.&lt;br /&gt;The dataset is a disconnected, in-memory representation of data. It can be considered as a local copy of the relevant portions of the database. The DataSet is persisted in memory and the data in it can be manipulated and updated independent of the database. When the use of this DataSet is finished, changes can be made back to the central database for updating. The data in DataSet can be loaded from any valid data source like Microsoft SQL server database, an Oracle database or from a Microsoft Access database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Provider &lt;br /&gt;&lt;br /&gt;The Data Provider is responsible for providing and maintaining the connection to the database. A DataProvider is a set of related components that work together to provide data in an efficient and performance driven manner. The .NET Framework currently comes with two DataProviders: the SQL Data Provider which is designed only to work with Microsoft's SQL Server 7.0 or later and the OleDb DataProvider which allows us to connect to other types of databases like Access and Oracle. Each DataProvider consists of the following component classes:&lt;br /&gt;&lt;br /&gt;The Connection object which provides a connection to the database&lt;br /&gt;The Command object which is used to execute a command&lt;br /&gt;The DataReader object which provides a forward-only, read only, connected recordset&lt;br /&gt;The DataAdapter object which populates a disconnected DataSet with data and performs update&lt;br /&gt;&lt;br /&gt;Data access with ADO.NET can be summarized as follows:&lt;br /&gt;A connection object establishes the connection for the application with the database. The command object provides direct execution of the command to the database. If the command returns more than a single value, the command object returns a DataReader to provide the data. Alternatively, the DataAdapter can be used to fill the Dataset object. The database can be updated using the command object or the DataAdapter. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Component classes that make up the Data Providers&lt;br /&gt;&lt;br /&gt; The Connection Object&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The Connection object creates the connection to the database. Microsoft Visual Studio .NET provides two types of Connection classes: the SqlConnection object, which is designed specifically to connect to Microsoft SQL Server 7.0 or later, and the OleDbConnection object, which can provide connections to a wide range of database types like Microsoft Access and Oracle. The Connection object contains all of the information required to open a connection to the database.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Command Object&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The Command object is represented by two corresponding classes: SqlCommand and OleDbCommand. Command objects are used to execute commands to a database across a data connection. The Command objects can be used to execute stored procedures on the database, SQL commands, or return complete tables directly. Command objects provide three methods that are used to execute commands on the database:&lt;br /&gt;ExecuteNonQuery: Executes commands that have no return values such as INSERT, UPDATE or DELETE &lt;br /&gt;ExecuteScalar: Returns a single value from a database query &lt;br /&gt;ExecuteReader: Returns a result set by way of a DataReader object&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The DataReader Object&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The DataReader object provides a forward-only, read-only, connected stream recordset from a database. Unlike other components of the Data Provider, DataReader objects cannot be directly instantiated. Rather, the DataReader is returned as the result of the Command object's ExecuteReader method. The SqlCommand.ExecuteReader method returns a SqlDataReader object, and the OleDbCommand.ExecuteReader method returns an OleDbDataReader object. The DataReader can provide rows of data directly to application logic when you do not need to keep the data cached in memory. Because only one row is in memory at a time, the DataReader provides the lowest overhead in terms of system performance but requires the exclusive use of an open Connection object for the lifetime of the DataReader.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The DataAdapter Object&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The DataAdapter is the class at the core of ADO .NET's disconnected data access. It is essentially the middleman facilitating all communication between the database and a DataSet. The DataAdapter is used either to fill a DataTable or DataSet with data from the database with it's Fill method. After the memory-resident data has been manipulated, the DataAdapter can commit the changes to the database by calling the Update method. The DataAdapter provides four properties that represent database commands:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;SelectCommand &lt;br /&gt;InsertCommand &lt;br /&gt;DeleteCommand &lt;br /&gt;UpdateCommand &lt;br /&gt;When the Update method is called, changes in the DataSet are copied back to the database and the appropriate InsertCommand, DeleteCommand, or UpdateCommand is executed.&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;3.    What are the advantages and drawbacks of using ADO.NET?  &lt;br /&gt; &lt;br /&gt;Pros&lt;br /&gt;&lt;br /&gt;ADO.NET is rich with plenty of features that are bound to impress even the most skeptical of programmers. If this weren’t the case, Microsoft wouldn’t even be able to get anyone to use the Beta. What we’ve done here is come up with a short list of some of the more outstanding benefits to using the ADO.NET architecture and the System.Data namespace. &lt;br /&gt;&lt;br /&gt;* Performance – there is no doubt that ADO.NET is extremely fast. The actual figures vary depending on who performed the test and which benchmark was being used, but ADO.NET performs much, much faster at the same tasks than its predecessor, ADO. Some of the reasons why ADO.NET is faster than ADO are discussed in the ADO versus ADO.NET section later in this chapter. &lt;br /&gt;&lt;br /&gt;* Optimized SQL Provider – in addition to performing well under general circumstances, ADO.NET includes a SQL Server Data Provider that is highly optimized for interaction with SQL Server. It uses SQL Server’s own TDS (Tabular Data Stream) format for exchanging information. Without question, your SQL Server 7 and above data access operations will run blazingly fast utilizing this optimized Data Provider. &lt;br /&gt;&lt;br /&gt;* XML Support (and Reliance) – everything you do in ADO.NET at some point will boil down to the use of XML. In fact, many of the classes in ADO.NET, such as the DataSet, are so intertwined with XML that they simply cannot exist or function without utilizing the technology. You’ll see later when we compare and contrast the “old” and the “new” why the reliance on XML for internal storage provides many, many advantages, both to the framework and to the programmer utilizing the class library. &lt;br /&gt;&lt;br /&gt;* Disconnected Operation Model – the core ADO.NET class, the DataSet, operates in an entirely disconnected fashion. This may be new to some programmers, but it is a remarkably efficient and scalable architecture. Because the disconnected model allows for the DataSet class to be unaware of the origin of its data, an unlimited number of supported data sources can be plugged into code without any hassle in the future. &lt;br /&gt;&lt;br /&gt;* Rich Object Model – the entire ADO.NET architecture is built on a hierarchy of class inheritance and interface implementation. Once you start looking for things you need within this namespace, you’ll find that the logical inheritance of features and base class support makes the entire system extremely easy to use, and very customizable to suit your own needs. It is just another example of how everything in the .NET framework is pushing toward a trend of strong application design and strong OOP implementations. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cons&lt;br /&gt;&lt;br /&gt;Hard as it may be to believe, there are a couple of drawbacks or disadvantages to using the ADO.NET architecture. I’m sure others can find many more faults than we list here, but we decided to stick with a short list of some of the more obvious and important shortcomings of the technology. &lt;br /&gt;&lt;br /&gt;* Managed-Only Access – for a few obvious reasons, and some far more technical, you cannot utilize the ADO.NET architecture from anything but managed code. This means that there is no COM interoperability allowed for ADO.NET. Therefore, in order to take advantage of the advanced SQL Server Data Provider and any other feature like DataSets, XML internal data storage, etc, your code must be running under the CLR. &lt;br /&gt;&lt;br /&gt;* Only Three Managed Data Providers (so far) – unfortunately, if you need to access any data that requires a driver that cannot be used through either an OLEDB provider or the SQL Server Data Provider, then you may be out of luck. However, the good news is that the OLEDB provider for ODBC is available for download from Microsoft. At that point the down-side becomes one of performance, in which you are invoking multiple layers of abstraction as well as crossing the COM InterOp gap, incurring some initial overhead as well. &lt;br /&gt;&lt;br /&gt;* Learning Curve – despite the misleading name, ADO.NET is not simply a new version of ADO, nor should it even be considered a direct successor. ADO.NET should be thought of more as the data access class library for use with the .NET framework. The difficulty in learning to use ADO.NET to its fullest is that a lot of it does seem familiar. It is this that causes some common pitfalls. Programmers need to learn that even though some syntax may appear the same, there is actually a considerable amount of difference in the internal workings of many classes. For example (this will be discussed in far more detail later), an ADO.NET DataSet is nothing at all like a disconnected ADO RecordSet. Some may consider a learning curve a drawback, but I consider learning curves more like scheduling issues. There’s a learning curve in learning anything new; it’s just up to you to schedule that curve into your time so that you can learn the new technology at a pace that fits your schedule. &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;4.    Explain what a diffgram is and its usage ? &lt;br /&gt; &lt;br /&gt;A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order.&lt;br /&gt;When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram. &lt;br /&gt;The DiffGram format is divided into three sections: the current data, the original (or "before") data, and an errors section, as shown in the following example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;?xml version="1.0"?&gt;&lt;br /&gt;&lt;diffgr:diffgram &lt;br /&gt;         xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&lt;br /&gt;         xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&lt;br /&gt;         xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt;   &lt;DataInstance&gt;&lt;br /&gt;   &lt;/DataInstance&gt;&lt;br /&gt;  &lt;diffgr:before&gt;&lt;br /&gt;  &lt;/diffgr:before&gt;&lt;br /&gt;  &lt;diffgr:errors&gt;&lt;br /&gt;  &lt;/diffgr:errors&gt;&lt;br /&gt;&lt;/diffgr:diffgram&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The DiffGram format consists of the following blocks of data: &lt;br /&gt;&lt;DataInstance&gt; &lt;br /&gt;The name of this element, DataInstance, is used for explanation purposes in this documentation. A DataInstance element represents a DataSet or a row of a DataTable. Instead of DataInstance, the element would contain the name of the DataSet or DataTable. This block of the DiffGram format contains the current data, whether it has been modified or not. An element, or row, that has been modified is identified with the diffgr:hasChanges annotation. &lt;br /&gt;&lt;diffgr:before&gt; &lt;br /&gt;This block of the DiffGram format contains the original version of a row. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation. &lt;br /&gt;&lt;diffgr:errors&gt; &lt;br /&gt;This block of the DiffGram format contains error information for a particular row in the DataInstance block. Elements in t
