Você está na página 1de 108

1) What are the differences between DataReader and DataAdapter? S.

No 1 2 3 4 DataReader Works in Connected Mode Can have only one record at a time Is ForwardOnly and Readonly Faster DataAdapter Works in Disconnected Mode Can have more than 1 records Can navigate front and back and editable Slower

2) What are the differences between DataSet and DataReader? S.No 1 2 3 4 5 DataSet Works in Disconnected Mode Can navigate back and forth Data is editable Can contain more than one table and relationships Slower as having more overhead DataReader Works in Connected Mode Can navigate forward only Data is Readonly Can contain only one row at a time Faster when compared with DataSet

3) What is the difference between DataSet.Copy() and DataSet.Clone()? S.No 1 DataSet.Copy() DataSet.Copy() copies both the structure and data DataSet.Clone() DataSet.Clone() copies the structure of the DataSet, including all DataTable schemas, relations, and constraints and it does not copy any data

4) What are the differences between RecordSet and DataSet? S.No 1 2 3 4 RecordSet RecordSet provides data of one row at an instant RecordSet always needs an Open connection to read the data from data sources RecordSet is able to load the structure and data of only one table at a time RecordSet does not support constraints of Databases DataSet DataSet is a data structure which represents the complete table data at the same time DataSet needs connection only for retrieving the data. After retrieve the data connection is not necessary DataSet has the capability to store the structure and data of multiple tables at a time DataSet enforces data integrity by using Constraints

5) What are the differences between ADO and ADO.Net? S.No ADO ADO.Net

1 2 3

It supports connected model It uses record set XML support is less

It supports disconnected model It uses data set XML support is more

1.Difference between Typed DataSet and Untyped DataSet S.No 1 Typed DataSet It provides additional methods, properties and events and thus it makes it easier to use. They have .xsd file (Xml Schema definition) file associated with them and do error checking regarding their schema at design time using the .xsd definitions. We will get advantage of intelliSense in VS. NET. Performance is slower in case of strongly typed dataset. In complex environment, strongly typed dataset's are difficult to administer. Typed DataSets use explicit names and DataTypes for their members. ex: northwindDataSet.Products.Produ ctNameColumn.Caption = "pnames"; 2.Difference between DataView and DataTable Untyped DataSet It is not as easy to use as strongly typed dataset. They do not do error checking at the design time as they are filled at run time when the code executes.

3 4 5

We cannot get an advantage of intelliSense. Performance is faster in case of Untyped dataset. Untyped datasets are easy to administer. UnTyped DataSets use table and column collections for their members ex: ds.Tables["emp"].Columns["eno"].Rea dOnly=true;

S.No 1

DataView Read-only i.e., DataView can be used to select the data. Is a reference to an existing DataTable. Cannot be populated from scratch; must be instantiated with a reference to an existing DataTable. Data is a reference to an existing DataTable, and does not consume space.

DataTable Read/Write i.e., Datatable can be used to edit or select or delete or insert a data. Can be created empty and then populated

Data takes storage space.

Can sort or filter rows without modifying the underlying data. Rows and columns can be hidden and revealed repeatedly.

Can add/edit/delete rows, columns, and data, and all changes are persistent.

5 6

Can return a DataTable version Can be cloned of the view A live reference to a DataTable; any changes in the DataTable data is immediately reflected in the view. Supports calculated columns, which are columns with a value calculated on the fly by combining or manipulating other columns. Can hide or show selected columns Is source data; does not contain references

Does not support calculated columns

No row or column hiding

3.Difference between Connected and Disconnected Environment

S.No 1

Connected Environment Connected Environment needs a constantly connection of user to data source while performing any operation. Only one operation can be performed at a time in connection Environment. DataReader is used in Connection Environment. It is slower in speed. We get updated data in it.

Disconnected Environment Disconnected Environment does not need any connection.

Multiple operations can be performed.

3 4 5

DataSet is used in it. Disconnected Environment has a good speed. There is a problem of dirty read.

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1) What are the differences between Inline code and Code Behind Code? S.No Inline code Code Behind Code 1 Its within .aspx file Its in a external class file 2 Dynamically compiled Compiled prior to deployment and linked with .aspx file 2) What are the differences between Global.asax and Web.Config? S.No global.asax web.config 1 It is a class file It is an XML file 2 There can be only one for an There can be many if under different application sub-folders 3 Can have Application and Session Cannot have Application and Session events events 4 Need to be recompiled when No need to compile when changes are changes are made made 3) What are the Differences between Server.Transfer and Response.Redirect? S.No Server.Transfer Response.Redirect 1 The navigation happens on the The navigation happens on the clientserver-side ,so client history is side ,so client history is updated not updated 2 Data can be persist across the Context.Items loses the persistence pages using Context.Item collection 3 No Round-trips Makes a Round-trip 4 Has Good encapsulation No 4) What is the difference between a custom control and a user control? S.No User Control Custom Control 1 Is a file with the .ascx extension Is a file with the .dll extension 2 Can be only used with the Can be used in any number of application applications 3 Language dependent They are language independent, a control created in c# can be used in vb.net 4 Cannot be added to Visual studio Can be added to Visual studio Toolbox Toolbox 5 Inherits from Server controls and We have to develop from scratch , easy to create so comparatively difficult 6 Generally used for static content Used when dynamic content is required 5) What is the difference between Caching and Application? S.No Caching Application 1 Cache have expire policy Application does not have expire policy 2 Cache does not require explicit Application require explicit locking locking 3 Cache has the Property of timeout, Application variables exist as long as

which allows us to control the the application is alive duration of the Objects so cached 4 Output can be cached in 4 ways, Application does not have options as like Cache object Page Output Caching Page Partial Caching DataSource Caching Data Caching 5 It is accessible to page level to all It is accessible to both page level and the users application level to all the users 6) What is the difference between web farm and web garden? S.No Web farm Web garden 1 A web application running on A web application running on a single multiple servers is called a web server that has multiple CPUs is farm called a web garden 7) What is the difference between Application and Session Events? S.No Application Event Session Event 1 Application events are used to Session events are used to initialize initialize objects and data that we data that we want to keep throughout do want to make available to all individual sessions, but that we do not the current sessions of our web want to share between sessions application 8) What is the difference between Session Cookies and Persistent Cookies? S.No Session Cookies Persistent Cookies 1 Session Cookies do not have Persistent Cookies have an expiration expiration date date. The expiration date indicates to the browser that it should write the cookie to the clients hard drive 9) What are the differences between Server Controls and HTML Controls? S.No Server Controls HTML Controls 1 Server Controls can trigger HTML Controls can trigger only control-specific events on the page-level events on server (postback) server 2 Data entered in a server control is Data is not maintained in an HTML maintained across requests. Server control. Data must be saved and controls retain state restored using page-level scripts 3 The Microsoft .NET Framework HTML controls have HTML attributes provides a set of properties for only each server control. Properties allows us to change the server controls appearance and behavior within server-side code 4 Server controls automatically We must detect browser in code or detect browser and adapt display write for least common denominator as appropriate 10) What are the differences between ViewState and Hidden fields? S.No ViewState Hidden fields 1 This is used for pages that will This is used for pages that will postback to itself postback to itself or to another page

2 3

This is built in structure for maintaining state of a page Security is more as data is hashed, compressed and encoded

This is not an inbuilt structure Security is less when compared to ViewState

11) What is the difference between SQL Cache Notification and SQL Cache Invalidation? S.No SQL Cache Notification SQL Cache Invalidation 1 Using SQL Cache Notification, Using SQL Cache Invalidation, we we can generate notifications can make a cached item invalid that when the data of a database on depends on the data stored in a SQL which a cached item depends server database, when the data in the changes SQL server database is changed 12) What is the difference between absolute time expiration and sliding time expiration? S.No Absolute time expiration Sliding time expiration 1 In absolute time expiration, a In sliding time expiration, the time for cached item expires after the which the item is cached is each time expiration time specifies for it, incremented by its expiration time if it irrespective of how often it is is accessed before completion of its accessed expiration time 13) What is the difference between adding items into cache through Add() method and Insert() method? S.No Cache.Add() Cache.Insert() 1 Cache.Add() method also returns Cache.Insert() method adds only the an object representing the item we item in the cache have added in the cache ,besides adding the item in the cache 2 It is not possible to replace an We can replace an existing item in the existing item in the cache using cache using the Cache.Insert() method the Cache.Add() method 14) What is the difference between page-level caching and fragment caching? S.No Page-level caching Fragment caching 1 In Page-level caching, we cache In Fragment caching, we cache parts a whole page of the web page such as a user control added to the web page 15) What is the difference between Label control and Literal control? S.No Label control Literal control 1 Final HTML code of a Label Final HTML code of a Literal control control has an HTML tag contains only text, which is not surrounded by any HTML tag 16) What is the difference between HyperLink control and LinkButton control? S.No HyperLink control LinkButton control 1 A HyperLink control do not have A LinkButton control have Click and Click and Command events Command events, which can be handled in the code behind file of the web page

17) What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control? S.No HtmlInputCheckBox control HtmlInputRadioButton control 1 We can select more than one We can select only a single HtmlInputCheckBox control from HtmlInputRadioButton control from a a group of HtmlInputCheckBox group of HtmlInputRadioButton controls controls 18) How a content page differs from a master page? S.No Content page Master page 1 A content page does not have A master page has complete HTML complete HTML source code source code inside its source file 19) How will you differentiate a submaster page from a top-level master page? S.No Submaster page Top-level master page 1 Like a content page, a submaster Top-level master page has complete page also does not have complete HTML source code inside its source HTML source code file 20) What is the difference between a page theme control and a global theme? S.No Page theme Global theme 1 A page theme is stored inside a A global theme is stored inside the subfolder of the App_Themes Themes folder on a web server folder of a web application 2 It can be applied to individual web It can be applied to all the web sites pages of the web application on the web server 21) What is the difference between a default skin and a named skin? S.No Default skin Named skin 1 A default skin does not have a A named skin has a SkinId attribute SkinId attribute 2 It is automatically applied to all It is applied to a control explicitly by the controls of the same type setting the SkinId property of the present on a web page control from the Properties window 22) Differentiate Globalization and Localization S.No Globalization Localization 1 Globalization is the process of Localization is the process of identifying the specific portion of configuring a web application to be a web application that needs to be supported for a specific language or different for different languages locale and isolating that portion from the core of the web application 23) What are the differences between web.config and machine.config? S.No web.config machine.config 1 This is automatically created This is automatically installed when when we create an ASP.Net web we install Visual Studio. Net application project 2 This is also called application This is also called machine level level configuration file configuration file

3 4

We can have more than one web.config file This file inherits setting from the machine.config

Only one machine.config file exists on a server This file is at the highest level in the configuration hierarchy

Difference between Web site and Web application S.No 1 2 3 4 Web site Can mix vb and c# page in single website. Can not establish dependencies. Edit individual files after deployment. Right choice when one developer will responsible for creating and managing entire website. i.e.,In web site development, decoupling is not possible. Web site is easier to create than Web application Web application We can't include c# and vb page in single web application. We can set up dependencies between multiple projects. Can not edit individual files after deployment without recompiling. Right choice for enterprise environments where multiple developers work unitedly for creating,testing and deployment. i.e.,In Web application, different different groups work on various components independently like one group work on domain layer, other work on UI layer. Web application is more difficult to create than a Web site

Difference between Local storage and cookies S.No 1 2 3 Local storage Good to store large amount of data, up to 4MB Easy to work with the JavaScript Local storage data is not sent to the server on every request (HTTP header) as it is purely at the client side No way to specify the time out period as the Cookies have Cookies Good for small amount of data, up to 4KB Difficult to work with JavaScript All data is transferred to and from server, so bandwidth is consumed on every request Can specify timeout period so that cookies data are removed from browser

Difference between Session and Cache S.No 1 2 Session Ssession retains state per user Items put into a session will stay there, until the session ends Cache Cache is used for retaining state for application scoped items. Items in the cache can expire (will be removed from cache) after a specified amount of time. And also there is no guaranty that objects will not be removed before their expiration times as ASP.NET remove items from cache when the amount of available memory gets small. This process is called as Scavenging.

The session state can be kept external This is not the case with the cache. (state server, SQL server) and shared between several instances of our web app (for load balancing).

Difference between Datalist and Repeater S.No 1 Datalist Datalist supports multiple columns displaying and using repeat columns property Repeater Repeater doesn't support multiple columns display,no repeat columns property

2 3

Datalist supports styles for formating Repeater does not provide styles templates data[headerstyle,...] Datalist rendering output[html content]will be slow compare with repeater. Repeater performanace is better than Datalist

Summary: If the requirement can achieve using repeater and datalist,choose repeater for better performance

1.Difference between ASP.NET and PHP S.No 1 ASP.NET Technology Availability: ASP.NET was launched by Microsoft in the year 2002. 2 Database: ASP.Net uses MS-SQL for connecting database but MS-SQL can not be availed free from Microsoft. PHP Technology Availability: PHP was launched by Rasmus Lerdorf in the year 1995. Database: For point of database connectivity PHP uses MySQL for the purpose of database connectivitybecasue its highly flexiblilty nature. Another important fact is that it will incurextra expenditure because MySQL can be accessed for free. Cost: Linux can be used for running PHP programs and Linux is free operating system. Therefore,the cost of developing a website in PHP language is remarkably low

Cost: We need to install Internet Information Server (IIS)on a Windows server platformif you want to run ASP.Net program. As Windows server platform is not a free product,the cost of production is bounded to be increased.

Run Time : It has been observed that ASP.Net code runs slower than PHP code. This is becauseASP.Net utilizes server space while running

Run Time: Whereas inbuilt memory space is used by PHP while running.

Coding Simplicity: ASP.Net codes are somewhat complicated and a web developer needs to work hard to get the hang of it

Coding Simplicity: PHP codes are very simple and a programmer does not haveto make a diligent effort because it is comparatively easier than other types of programming languages. Platform Connectivity Issue: PHP has a unique advantagein this issue. Its codes can be linked with different types of platforms such asWindows, Linux and UNIX. Cost of Tools :

Platform Connectivity Issue : ASP.NET codes are usually run on Windows platforms but if you install ASP-Apache inthe server than it can run on Linux platform as well.

Cost of Tools :

There is no such free tools are available for ASP.Net.

PHP codes are available for free in various forums and blogs as it is a open source software. Furthermore, some useful tools that can be used in PHP are also availablefor free Language Support : The codes that are used in PHP are very much similar to that of C++ language and its syntax resembles the syntax used in C and C++. Therefore, if you have a fair knowledge in C++ or C, you will not face any difficulty while coding PHP language. Security : Though PHP can offer enough measures for ensuring data security

Language Support : The syntax of ASP.Net is more or less similar to that of Visual basic syntax and this is all but simple.

Security : ASP. Net is reputedfor creating sophisticated techniques to ensure the safety of confidential data.This is the reason why government organizations opt for ASP.Net.

2.Difference between ASP and ASP.NET

S.No 1

ASP ASP is a request response model.

ASP.NET ASP.NET is a programming model that is event driven. ASP.NET is a compiled CLR code that will be executed on the Server. The code and design logic is separated in ASP.NET. ASP.NET application can be developed and debugged using various tools including the leading Visual Studio .NET tool. ASP.NET is a complete Object Oriented Programming language. ASP.NET extends complete support for session management and

ASP code is an interpreted language that is interpreted by the script engine. HTML and the coding logic are mixed in ASP. To develop and debug ASP application, there are very limited tools. ASP has limited support to Object Oriented Programming principles. Session management and application state management is

3 4

5 6

very limited in ASP. 7 Error handling system is poor in ASP. ASP does not offer any in-built support for the XML. Data source support is not fully distributed in ASP.

application state management. ASP.NET offers complete error handling and exception handling services. In ASP.NET, data exchange is easily performed using XML support. Data source support is fully distributed in ASP.NET.

8 9

3.Difference between ASP.NET and VB.NET

S.No 1

ASP.NET ASP.NET is web technology that is used in building web applications and websites. ASP.NET is a server side technology that is language independent. Any .NET languages such as C#, VB.NET can be used to develop web applications through ASP.NET.

VB.NET VB.NET is a language that is used in writing programs that are utilizing the ASP.NET framework. VB.NET is a .NET programming language. VB.NET is used to create ASP.NET web applications or windows applications using Visual Studio Windows Forms Designer or mobile applications or console applications or applications for variety of other purposes. VB.NET is not part of .NET framework. For example, VB.NET is the code that is written on various events of text boxes and controls to make them function as per the requirement. VB.NET does not include server controls. VB.NET can support only scripting languages.

ASP.NET is included within the .NET framework. For example, ASP.NET contains the text boxes and the controls that can be dragged and dropped into a web form.

ASP.NET contains server controls. ASP.NET can support all .NET languages.

4.Difference between Java and .NET

S.No 1 2

Java JAVA is developed by Sun Microsystem JAVA is a programming language In JAVA, JVM(Java Virtual Machine) execute the code and convert source code to byte code. JAVA can run on any operating system But in JAVA it depends upon the programmer to destroy the garbage memory.

.NET .NET is developed by Microsoft. .NET is a framework that supports many programming languages like C#,ASP,VB. In .NET CLR(common language Runtime) execute the code with two phase compilation. .NET can run only on windows/IIS. Although .NET support both explicit and implicit garbage collection,especially,in .NET the garbage collector destroy the garbage value in an efficient manner as compared to JAVA. ADO .NET is use for database connection in .NET. .net has a standard development IDE i.e. Microsoft Visual Studio

4 5

6 7 8

JDBC is used for database connection in JAVA For java many third party IDEs are available.

But web application in java run on Both windows and web applications any operating system. can developed by .net but it will be more better to go for windows application with .NET . you can also go for web application with .NET but it will only hosted on windows server. Exception Handling in Java is harder than .NET JAVA uses bootclasspath for completely trusted codes. Java is less secure than .NET while providing security Exception Handling in .NET is simpler than JAVA. .NET uses GAC(Global Assembly Cache) and keep trusted assemblies. JAVA and .NET both have similar security goals. But .NET is more secure because of its simple and clean designs. .Net due to disconnected data access through ADO.Net has high level of performance against Java JDBC

9 10 11

12

Java JDBC which requires multiple round trips to data base. Hence, performance is lesser than .NET

13

Development is comparatively slower. Java applications development can be done on even less configuration computer system. Java can only communicate with java programs

Due to Microsoft Visual Studio, development is faster. Microsoft Visual Studio installation requires higher configuration system. .Net is the platform itself for a multitude of languages. One can use C, C++ and VB to program upon .net. These programs interact with each other using common methods. these common methods are defined by .Net, and are used by the programs to communicate with each other without worry about that language the program was written in. the machine running the program/s will need the .Net platform to be installed.

14

15

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1.Difference between HTTP and HTTPS S.No 1 2 3 4 5 6 7 HTTP URL begins with http://" in case of HTTP HTTP is unsecured HTTP uses port 80 for communication HTTP operates at Application Layer No encryption is there in HTTP No certificates required in HTTP Most internet forums will probably fall into this category. Because these are open discussion forums, secured access is generally not required HTTPS URL begins with https:// in case of HTTPS. HTTPS is secured. HTTPS uses port 443 for communication. HTTPS operates at Transport Layer. HTTPS uses encryption. certificates required in HTTPS. HTTPS should be used in Banking Websites, Payment Gateway, Shopping Websites, Login Pages, Emails (Gmail offers HTTPS by default in Chrome browser) and Corporate Sector Websites. For example: PayPal: https://www.paypal.com Google AdSense: https://www.google.com/adsense/ 2.Difference between GET and POST methods

S.No 1

GET Post Mechanism: GET request is sent via URL.

POST Post Mechanism: Post request is sent via HTTP request body or we can say internally. Form Default Method: We have to specify POST method within form tag like <Form method="POST"....... Security: Since Post request encapsulated name pair values in HTTP request body, so that we can submit sensitive data through POST method.

Form Default Method: GET request is the default method.

Security: Since GET request is sent via URL, so that we can not use this method for sensitive data.

Length: GET request has a limitation on its length. The good practice is never allow more than 255 characters.

Length: POST request has no major limitation.

Caching or Bookmarking: GET request will be better for caching and bookmarking.

Caching or Bookmarking: POST request is not better for caching and bookmarking. SEO: POST request is not SEO friendly. Data Type: POST request has no restriction. Best Example: LOGIN is the best example for POST request. HTTP Request Message Format: 1 POST /path/script.cgi HTTP/1.0 2 From: umarali1981@gmail.com 3 User-Agent: HTTPTool/1.0 4 Content-Type: application/x-wwwform-urlencoded 5 Content-Length: 8 6 7 Code=132

SEO: GET request is SEO friendly.

Data Type: GET request always submits data as TEXT.

Best Example: SEARCH is the best example for GET request.

HTTP Request Message Format: 1 GET /path/file.html? SearchText=Interview_Question HTTP/1.0 2 From: umarali1981@gmail.com 3 User-Agent: HTTPTool/1.0 4 [blank line here]

Some comments on the limit on QueryString / GET / URL parameters Length: 1. 255 bytes length is fine, because some older browser may not support more than that. 2. Opera supports ~4050 characters. 3. IE 4.0+ supports exactly 2083 characters. 4. Netscape 3 -> 4.78 support up to 8192 characters. 5. There is no limit on the number of parameters on a URL, but only on the length. 6. The number of characters will be significantly reduced if we have special characters like spaces that need to be URLEncoded (e.g. converted to the '%20'). 7. If we are closer to the length limit better use POST method instead of GET method.

3.Difference between User Controls and Master Pages S.No 1 2 3 User Controls Its extension is .ascx. Code file: .ascx.cs or .ascx.vb A page can have more than one User Controls. It does not contain Contentplaceholder and this makes it somewhat difficult in providing proper layout and alignment for large designs. Suitable for small designs(Ex: logout button on every .aspx page.) Register Tag is added when we drag and drop a user control onto the .aspx page. Can be attached dynamically using LoadControl method.PreInit event is not mandatory in their case for dynamic attachment. Master Pages Its extension is .Master. code file: .master.cs or .master.vb extension Only one master page can be assigned to a web page It contains ContentPlaceHolder.

More suitable for large designs(ex: defining the complete layout of .aspx page) MasterPageFile attribute is added in the Page directive of the .aspx page when a Master Page is referenced in .aspx page. Can be referenced using Web.Config file also or dynamically by writing code in PreInit event.

4.Difference between Build and Rebuild

S.No 1

Build A build compiles only the files and projects that have changed. Build does not updates the xmldocumentation files

Rebuild A rebuild rebuilds all projects and files in the solution irrelevant of whether they have changed or not. Rebuild updates the xmldocumentation files

Note: Sometimes,rebuild is necessary to make the build successful. Because, Rebuild cleans Solution to delete any intermediate and output files, leaving only the project and component files, from which new instances of the intermediate and output files can then be built.

5.Difference between generic handler and http handler

S.No 1

Generic Handler Generic handler has a handler which can be accessed by url with .ashx extension Typical example of generic handler are creating thumbnails of images

Http Handler http handler is required to be configured in web.config against extension in web.config.It does not have any extension For http handler, page handler which serves .aspx extension request and give response.

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1.Difference between ViewState and SessionState S.No 1 2 ViewState View state is maintained in page level only. View state of one page is not visible in another page.i.e., when user requests another page previous page data will be no longer available. View state information stored in client only. View state persist the values of particular page in the client (browser) when post back operation done. View state used to persist pageinstance-specific data. SessionState Session state is maintained in session level. Session state value is available in all pages within a user session.i.e., The data will be no longer available if user close the browser or session timeout occurs. Session state information stored in server. Session state persist the data of particular user in the server. This data available till user close the browser or session time completes. Session state used to persist the userspecific data on the server side.

3 4

2.Difference between ViewState and ControlState

S.No 1 2

ViewState ViewState can be disabled ViewState is implemented by using EnableViewState property of a control to true.

ControlState Control State cannot be disabled. Control State works even when EnableViewState is off. To use Control State (for example in a custom control) we have to override OnInit method,call RegisterRequiresControlState method in OnInit method and then override the SaveControlState and LoadControlState methods. Control State is used for small data only. eg: maintain clicked page number in a GridView even when EnableViewState is off

ViewState is used to maintain page-level state for large data

3.Difference between SessionState and Cookies

S.No 1

SessionState

Cookies

Session can store any type of data Cookies can store only "string" because the value is of datatype of datatype "object" These are stored at Server side Session are secured because it is stored in binary format/encrypted form and it gets decrypted at server Session is independent for every client i.e individual for every client There is no limitation on size or number of sessions to be used in an application For all conditions/situations we can use sessions We cannot disable the sessions.Sessions can be used without cookies also(by disabling cookies) The disadvantage of session is that it is a burden/overhead on server Sessions are called as NonPersistent cookies because its life time can be set manually They are stored at Client side Cookie is non-secure since stored in text format at client side

2 3

Cookies may or may not be individual for every client Due to cookies network traffic will increase.Size of cookie is limited to 40 and number of cookies to be used is restricted to 20. Only in few situations we can use cookies because of no security We can disable cookies

6 7

Since the value is string there is no security We have persistent and non-persistent cookies

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1.Difference between DataGrid and GridView S.No 1 DataGrid Sorting: In DataGrid code requires to handle the SortCommand event and rebind grid required. Paging: In DataGrid requires code to handle the PageIndexChanged event and rebind grid required. Data binding: Like GridView DataGrid cannot bind with new datasource control in ASP.NET 2.0. Updating data: DataGrid requires extensive code to update operation on data Events: In DataGrid less events supported as compared to GridView. GridView Sorting: In case of GridView no additional code required.

Paging: In case of GridView no additional code required. It also supports customized appearance. Data binding: GridView can bind with new datasource control

Updating data: GridView requires little code. Code like exceptions handling for database part. Events: GridView supports events fired before and after database updates.

2.Difference between ListView and GridView S.No 1 ListView Data Grouping: In-built support for this functionality is provided. GridView Data Grouping: To provide this functionality, we need to write custom code.

Provide Flexible Layout: In-built Provide Flexible Layout: To provide support for this functionality is this functionality, we need to write provided. custom code Insert: In-built support for this functionality is provided. Insert: To provide this functionality, we need to write custom code

3.Difference between DataList and GridView S.No 1 DataList Paging: To provide this functionality, we need to write custom code. GridView Paging: In-built support for this functionality is provided.

Provide Flexible Layout: In-built Provide Flexible Layout: To provide support for this functionality is this functionality, we need to write provided. custom code Update,Delete: To provide this functionality, we need to write custom code Data Grouping: In-built support for this functionality is provided. Sorting:To provide this functionality, we need to write custom code. Update,Delete: In-built support for this functionality is provided. Data Grouping: To provide this functionality, we need to write custom code. Sorting:In-built support for this functionality is provided.

4.Difference between Repeater and ListView

S.No 1

Repeater Paging: To provide this functionality, we need to write custom code. Data Grouping: To provide this functionality, we need to write custom code. Insert: To provide this functionality, we need to write custom code Update,Delete: To provide this functionality, we need to write custom code Sorting:To provide this functionality, we need to write custom code.

ListView Paging: In-built support for this functionality is provided. Data Grouping: In-built support for this functionality is provided. Insert: In-built support for this functionality is provided. Update,Delete: In-built support for this functionality is provided. Sorting:In-built support for this functionality is provided.

5.Difference between Repeater and DataList

S.No 1 2

Repeater Repeater is template driven Repeater cannot automatically generates columns from the data source Row selection is not supported by Repeater Editing of contents is not supported by Repeater Arranging data items horizontally or verticlaly is not supported by Repeater

DataList DataList is rendered as Table. DataList can automatically generates columns from the data source Row selection is supported by DataList Editing of contents is supported by DataList We can arrange data items horizontally or verticlaly in DataList

3 4 5

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

New features of ASP.Net 2.0, ASP.Net 3.0 and ASP.Net 3.5- A Comparative Chart

SNo 1

ASP.Net 2.0 ASP.Net 3.0 ASP.Net 3.5 a) Generics a) Windows a) Linq for SQL, XML, Dataset, b) Anonymous Communication Object methods Foundation (WCF), b) Addin system c) Partial class formerly called c) p2p base class d) Nullable type Indigo; a serviced) Active directory e) The new API gives oriented messaging e) ASP.NET Ajax a fine grain control system which allows f) Anonymous types with on the behavior of programs to static type inference the runtime with interoperate locally g) Paging support for regards to or remotely similar to ADO.NET multithreading, web services. h) ADO.NET synchronization memory b) Windows API to synchronize local allocation, Presentation caches and server side assembly loading Foundation (WPF), datastores. and more formerly called i) Asynchronous network I/O f) Full 64-bit support Avalon; a new user API for both the x64 interface subsystem j) Support for HTTP and the IA64 and API based on pipelining and syndication hardware XML and vector feeds. platforms graphics, which uses k) New System.CodeDom g) New 3D computer namespace. personalization graphics hardware features for and Direct3D ASP.NET, such as technologies. support for c) Windows Workflow themes, skins and Foundation (WF) webparts. allows for building of h) .NET Micro task automation and Framework integrated transactions using workflows. d) Windows CardSpace, formerly called InfoCard; a software component which securely stores a person's digital identities and

provides a unified interface for choosing the identity for a particular transaction, such as logging in to a website

1.Difference between C# 3.5 and C# 4.0 S.No 1 2 C# 3.5 C# 3.5 does not support dynamic programming. The dynamic keyword is not recognized in C# 3.5. Dynamic variables cannot be created in C# 3.5. In C# 3.5, method parameters cannot be specified with default values. C# 3.5 does not support optional parameters. In C# 3.5, method parameters have to be specified in the same order as in method declaration in the method call. C# 3.5 does not provide named parameters. In C# 3.5, usage of ref keyword is mandatory while executing methods which are supplied by the COM interfaces. The COM objects indexed properties are not recognized in C# 3.5. Co-variance and contra-variance are not supported in Generics of C# 3.5. C# 4.0 C# 4.0 supports dynamic programming through dynamic objects. In C# 4.0, dynamic keyword is associated with objects to represent them as dynamic objects. C# 4.0 allows creation of dynamic variables. In C# 4.0, the method parameters can be specified with default values using optional parameters. C# 4.0 provides named parameters to represent the values of method parameters without following the order of declaration. In C# 4.0, usage of ref keyword is optional while executing methods which are supplied by the COM interfaces. The COM objects indexed properties are recognized in C# 4.0. C# 4.0 enhances Generics by introducing co-variance and contravariance.

3 4

2.Difference between C# and VB.NET

S.No 1

C#

VB.NET

In C#, variables are declared using In VB.NET, the variables are declared declarators. using keywords such as private, protected, friend, public, static, shared and Dim. In C#, an object can only be created using new. In C#, void is specified as the return type when a method does In VB.NET, an object can be created using new and CreateObject(). In VB.NET, Sub is used in method declaration to indicate that the method

2 3

not return a value. 4 5 6 In C#, no keyword is required to indicate an overloaded method. The current object is referred using this pointer in C#.

does not return any value. In VB.NET, Overloads keyword is used to indicate an overloaded method. The current object is referred as me in VB.NET.

Non virtual call cannot be made in To make a non-virtual call to the C#. current objects virtual method, MyClass is used in VB.NET. Compound data type is declared in C# using class, struct and interface. In C#, constructors are used to initialize an object. Object cleanup can be explicitly done by destructor in C#. In C#, an object is subject to asynchronous modification using volatile keyword. In C#, all the variables have to be declared before being used. In C#, default property is defined by using indexers. In C#, base class can be referred using the keyword base. Abstract class of C# can only be inherited and not instantiated. Sealed keyword of C# is used to denote that a class cannot be inherited. Division can be performed in C# using / operator. Remainder of division can be retrieved using mod operator of C#. C# does not have exponentiation operator. Compound data type is declared in VB.NET using Structure. In VB.NET, Sub New() is used to initialize the newly created object. Object cleanup can be done by using Finalize method in VB.NET. In VB.NET, an object cannot be modified in an asynchronous way. In VB.NET, variables can be forced for explicit declaration using Option Explicit. In VB.NET, default property is defined using Default. In VB.NET, base class can be referred using the keyword MyBase. MustInherit keyword of VB.NET is used to denote that a class can only be inherited and not instantiated. NotInheritable keyword of VB.NET denotes that the class cannot involve in inheritance. Division can be performed in VB.NET using \ operator. Remainder of division can be retrieved using %. In VB.NET, exponentiation can be performed using ^ operator.

8 9 10

11

12 13 14

15

16 17

18

19 20

C# has Bitwise operators namely &,| and ^. Object reference variables can be compared using == operator in C#. The short ciruit operators in C# are && (Boolean AND) and || (Boolean OR).

Bitwise operators in VB.NET are And, Or, Xor. Object reference variables can be compared using Is operator in VB.NET. The short circuit operators in VB.NET are AndAlso (Boolean AND) and OrElse (Boolean OR).

21

3.Difference between C# and C++

S.No 1 2

C# C# is a high level language that is component oriented. When compiled, C# code is converted into Intermediate language code. This intermediate language code is converted into executable code through the process called Just-In-Time compilation. In C#, memory management is automatically handled by garbage collector. In C# Switch Statement, the test variable can be a string. In C# switch statement, when break statement is not given, the fall through will not happen to the next case statement if the current case statement has any code. In addition to for, while and do..while, C# has another flow control statement called for each.

C++ C++ is a low level and indeed platform neutral programming language. When compiled, C++ code is converted into assembly language code.

In C++, the memory that is allocated in the heap dynamically has to be explicitly deleted. In C++ Switch Statement, the test variable cannot be a string. In C++ switch statement, when break statement is not given, the fall through will happen to the next case statement even if the current case statement has any code. C++ does not contain for each statement.

4 5

C# struts can contain only value C++ struts behave like classes except types. The struts is sealed and it that the default access is public instead cannot have a default no-argument of private. constructor. In C#, delegates, events and properties can also be specified as class members. In C++, only variables, constructors, functions, operator overloads and destructors can be class members.

Delegates, events and properties cannot be specified as class members. 9 In C#, the end of the class definition has a closing brace alone. The access modifiers in C# are public, private, protected, internal and protected internal. In C++, the end of the class definition has a closing brace followed by a semicolon. The access modifiers in C++ are public, private, protected. C++ does not have internal and protected internal access modifiers.

10

11

C# has finally block in exception C++ does not have finally block in handling mechanism. The code exception handling mechanism. statements in the finally block will be executed once irrespective of exception occurrence. The exception in C# can only throw a class that is derived from the System.Exception class. The exception in C++ can throw any class.

12

13

C# does not have the concept of C++ has the concept of function function pointers. C# has a similar pointers. concept called Delegates.

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1. Difference between Factory Pattern and Abstract Factory Pattern S.No 1 2 3 Factory Pattern Create object through inheritance Produce only one product Implements code in the abstract creator that make use of the concrete type that sub class produces Abstract Factory Pattern Create object through composition Produce families of products Concrete factories implements factory method to create product

2.Difference between Abstract Factory Pattern And Builder Pattern S.No 1 Builder Pattern Abstract Factory Pattern

In Builder Pattern, there will be one Abstract Factory Pattern will return the Director class which will instruct Builder instance directly. class to build the different parts/properties of our object and finally retrieve the object. It will have reference to the created object. It does not keep the track of it's created object.

3.Difference between Builder Pattern And Composite Pattern S.No 1 Builder Pattern It is used to create group of objects of predefined types. Composite Pattern It creates Parent - Child relations between our objects.

4.Difference between MVC and MVP

S.No 1

MVP MVP is a bit more complex to implement than MVC .Also, it has additional layer for view interfaces. The request is always received by the View and delegated to the presenter which in turn gets the data does the processing The presentation and view logic an be unit tested as the view is loosely coupled. MVP is best suitable for Windows Programming as the flow naturally tend towards this pattern.

MVC MVC is easier to implement than MVP.

The request is received by the controller which in turn gets the required data and loads up the appropriate view The controller logic can be unit tested. Note: We can unit test view if we are using Razor view engine. ASPX viewengine are not that easily unit testable MVC is best suitable for Web Programming.

5.Difference between Proxy Pattern and Observer Pattern S.No 1 Proxy Pattern Observer Pattern

The Proxy Pattern is used for wrapping a The Observer Pattern is used by a publisher kind of special object with 1 or more object to notify subscriber objects with other objects. information. Either because we don't always have the wrapped object or because it needs to be managed in a certain way that can be simplified via the proxy object(s). This is kind of a way to exchange the API of an existing class with a proxy class. We are not just talking events here, but whatever kind of functionality to define via the proxy object instead of the real object. The publisher object does not know the subscribing objects - except that the conform to a certain subscriber interface. This is a very flexible pattern for distributing events, since those that wants to listen on certain object has the power to do so without changing the code of the publishing object.

6. Difference between Singleton Pattern and a static class S.No 1 2 Singleton Pattern Singleton pattern maintains single instance. A singleton can extend classes and implement interfaces. A singleton can be initialized lazily or asynchronously. Singletons can be handled polymorphically without forcing their users to assume that there is only one instance. static class We cannot create instance for static class. A static class cannot . Note: It can extend classes, but it does not inherit their instance members. A static class is generally initialized when it is first loaded, leading to potential class loader issues. static class cannot be handled polymorphically.

Singleton Class can have value when Static are always just shared and have no Class object instantiated between server instance but multiple references. and client, such a way if three client want to have a shared data between them Singleton can be used.Thats why singleton class can be used for state mangement in stateless scenarios like shopping cart scenario. We can pass singleton object as parameter Singleton provides flexibility and also provides sort of a mechanism to control object creation based on various requirements. They can be extended as well if need arises. In other words we are not always tied to a particular implementation. With Singleton we We cannot pass parameter in static class Static classes once defined could not accomodate any future design changes as by design static classes are rigid and cannot be extended.

6 7

have the flexibility to make changes as when situation demands. 7.Difference between Strategy and Inversion of Control (IOC)

S.No 1

Strategy Pattern The strategy pattern is useful when we want classes to depend on the interface rather than the implementation.And we can easily swap out behavior depending on which concrete implementation we provide.

Inversion of Control (IOC) Pattern Inversion of Control/Dependency Injection (IoC/DI) comes into play when we want the concrete strategy implementation injected into a class. For example, we could use the DI Framework Ninject and configure it so that it will know which concrete strategy implementation to inject into a class in specific scenarios. Note: Strategy is just one of the ways that IOC is implemented

8.DIfference between IDictionary and Dictionary

S.No 1 2

IDictionary

Dictionary

IDictionary is just a contract, abstraction Dictionary is concrete implementation. It is recommended for example to expect Argument or Property is not required for as argument an IDictionary rather than Dictionary. concrete Dictionary, or to expose property of IDictionary rather than Dictionary, because this promotes loose coupling. Than we are able to change underlying objects in the future without affecting those who use your object.

9.Difference between Factory Pattern and Dependency Injection

S.No 1 2

Factory Pattern Factory is used to create objects

Dependency Injection(DI) DI is used to move the responsibility of creating an object outside the main code. Some of the well known framework available for DI are 1. 2. 3. 4. 5. 6. Unity Application Block (Microsoft) Ninject StructureMap Castle Windsor Munq/Funq Autofac

10.Difference between String.Clone() and String.Copy() method S.No 1 String.Clone() Returns a reference to this instance of String. i.e., it gives pointer value(ie Current memory Reference) String.Copy() Creates a new instance of String with the same value as a specified String. i.e., it creates an instance in Heap Memory and gives pointer value(ie New Memory Reference)

11.Difference between Strategy Pattern and Factory Pattern S.No 1 Strategy Pattern Factory Pattern

Strategy's sole intent to is to provide a Factory's sole purpose is to create objects . mechanism to select different algorithm. We cannot use "strategy" to create objects of "factory". We can use "factory" to create objects of "strategy".

12.Difference between Proxy and Adaptor S.No 1 Proxy Pattern Proxy on the other hand represents a standin object for the real object. This is required when the real object is complex to create, is not available, or for authentication purpose. For e.g. web service proxy, proxy authentication server etc. Proxy can be categorized into Virtual Proxy Remote Proxy Protection Proxy 13.Difference between Decorator and Visitor S.No 1 2 3 Decorator Pattern Decorator may have just a single object to customize. Decorator does not require a traverser for successful implementation. Decorator pattern is a structural pattern that help us to add new function to an object in the run time , note that in the run time not design time . Visitor Pattern Visitor has a tree of objects to be worked upon. Visitor requires a traverser for successful implementation. Visitor pattern is Behavioral pattern that seperate the data structure from the operation (functionality ) that work on it , this mean we can add different operation on the same data structure Adaptor Pattern Adapter is used to adapt to incompatible interfaces. It's more directed from the client (those who consume the object) perspective. A client expects an interface to be of particular type and adapter plays a role in filling that gap. It's more from making it easier for the client to adapt to other third party libraries within there own by adapting to it.

Difference between ASP.Net 2.0 and ASP.Net 3.5 SN o 1 Feature New Features ASP.Net 2.0 ASP.Net 2.0 includes the following as new features, a) Master Pages b) Profiles c) GridView Control ASP.Net 2.0 does not support Multi-Targeting environment. ASP.Net 3.5 ASP.Net 3.5 includes the following as new features, a) ListView Control b) DataPager Control c) Nested Master Pages
d) LinqDataSource Control

Multitargeting

AJAX Support

There is no in-built support for AJAX in ASP.Net 2.0. Instead, it has to be downloaded and installed. It does not support Siverlight. It does not provide Javascript debugging. It does not support LINQ.

4 5 6

Siverlight Support Javascript Debugging LINQ Support

ASP.Net 3.5 supports multitargeting. It means that we choose from a drop-down list whether to have Visual Studio 2008 build applications against the ASP.NET 2.0, 3.0, or 3.5 frameworks. In ASP.Net 3.5, AJAX is integrated into the .NET Framework, thereby making the process of building intuitive cool user interfaces easier. It supports Siverlight. It provides Javascript debugging. It Supports Language Integrated Query (LINQ).

1) What is the difference between CCW and RCW? S.No 1 CCW COM to .NET communication happens through COM Callable Wrapper RCW .NET to COM Communication happens through Runtime Callable Wrapper

2) What are the differences between Dll and Exe? S.No 1 2 3 Dll Objects of Dlls can be created Dll is In-Process It cannot be started as a standalone Exe Objects of Exe cannot be created Exe is Out-Process It can be started as a standalone

3) What are the differences between Managed Code and Unmanaged Code? S.No 1 2 3 4 Managed Code It is executed under CLR It compiles to intermediate language It provides services like security, exception handling, garbage collection etc It can access both managed and unmanaged code Unmanaged Code It is not executed under CLR It compiles directly to machine code It does not provide security, exception handling, garbage collection etc It can access only unmanaged code

1.Difference between Finalize() and Dispose() methods in .NET S.No 1 2 Finalize() Finalize() belongs to the Object class. It is automatically called by the Garbage Collection mechanism when the object goes out of the scope(usually at the end of the program) Dispose() Dispose() belongs to the IDisposable interface We have to manually write the code to implement it(User Code) ex: if we have emp class we have to inherit it from the IDisposable interface and write code. We may have to suppress the Finalize method using GC.SuppressFinalize() method. Faster method for instant disposal of the objects. Example: user interface Controls. Forms, SqlConnection class have built in implementaion of Dispose method.

It is slower method and not suitable for instant disposing of the objects. Example: class employee { //This is the destructor of emp class ~employee() { } //This destructor is implicitly compiled to the Finalize method. }

It is non-deterministic function i.e., it is uncertain when Garbage Collector will call Finalize() method to reclaim memory.

It is deterministic function as Dispose() method is explicitly called by the User Code.

2.Difference between Dispose and Destructor in .NET

S.No 1

Dispose Unmanaged resources are removed by dispose method and it is called manually It is used to remove the unused resources from the memory.

Destructor It is used to release unused managed resources and it is called automatically by the Garbage Collector It is used to de-allocate the allocated memory by the constructor method

3.Difference between Close() and Dispose() methods in .NET

S.No 1

Close() When a Close() method is called,database connection will be temporarily closed and can be opened once again using Open() method.

Dispose() Where as Dispose() method permanently close and removes connection object from memory and the resource no longer exists for any further processing. Note: However, calling Dispose does not remove the connection from the connection pool.

Example: try { string constring = "Server=(local);Database=my; User Id=sa; Password=sa"; SqlConnection sqlcon = new SqlConnection(constring); sqlcon.Open(); // here connection is open // some code here which will be execute } catch { // code will be execute when error occurred in try block } finally { sqlcon.Close(); // close the connection sqlcon.Dispose(); // desroy the connection object } Note: Only call the Close method on a Stream or a database connection if the object will be reused. Otherwise, use the Dispose method. And, further updates on difference between questions and answers, please visit my blog @ http://onlydifferencefaqs.blogspot.in/

Difference between hash table and arraylist S.No 1 2 3 Arraylist Array List is a List Here, we can only add items to the list Retrieving data using Arraylist is slower than Hashtable because If we want to find something in a arraylist we have to go through each value in arraylist. Hash table Hash Table is a map Here, we can add data with the key Retrieving by key in Hashtable is faster than retrieving in Arraylist because If we want to find something in a hashtable we dont have to go through each value in hashtable, instead search for key values and is faster.

Difference between Hash Table and Arrays Hash Table Hash table stores data as name,value pair. To access value from hash table, we need to pass name. We can store different type of data in hash table, say int,string etc. Difference between Dictionary and Hashtable Dictionary Dictionary is a generic type Hashtable Hashtable is not generic type. Array Array stores only value In array, to access value , we need to pass index number. In array ,we can store only similar type of data.

In Dictionary we need to specify the types of Hashtable is a collection of name/value pairs both the key and the corresponding value.The that are organised on the basis of hash code of value represents the actual object stored and the the key being specified. key represents a means to identify a particular object. In Dictionary public static members are type safe but any instance members are not type safe. Hashtable is thread safe for use by multiple reader threads and a single writing thread.

We cannot use Dictionary with Web Services We can use Hashtable withWeb Services The reason is no web service standard supports generic standard. Dictionary is aster than Hashtable because boxing is not required. It is slower than dictionary because to retrieve a value we must cast it as its actual type, because it will be returned via object reference.

Difference between array and stack Array An array can be multi-dimensional An array allows direct access to any of its elements Stack Stack is strictly one-dimensional With a stack, only the 'top' element is directly accessible; to access other elements of a stack, we must go through them in order, until we get to the one we want

Difference between Stack and Heap Stack Memory will be allocated at the compile time. Here the memory is allocated by the compiler. Memory will be allocated only in sequential locations. The memory will also be deleted by the compiler. There is lot of chance of memory wastage. Heap Memory will be allocated at the run time. Here the memory is allocated by the user. Memory will be allocated in sequential locations and non- sequential locations. The memory must be deleted explicitly by the user. There is no chance of memory wastage if the memory is handled perfectly.

Difference between Array and ArrayList Array They are fixed length. They are compiled strong type collection. Because arrays are of fixed size and strong type collection performance is faster. Array is in the System namespace Ex:Char[] vowel=new Char[]; ArrayList They are resizable and variable length They are flexible and can accommodate any data types. In arraylist lots of boxing and unboxing are done there for its performance is slower. ArrayList is in the System.Collections namespace. Ex:ArrayList a_list=new ArrayList();

1.Difference between for and foreach loop S.No 1 For loop Foreach loop

In case of for the variable of the loop is In case of Foreach the variable of the loop always be int only. while be same as the type of values under the array. The For loop executes the statement or block of statements repeatedly until specified expression evaluates to false. There is need to specify the loop bounds(Minimum, Maximum). example: using sytem; class class1 { static void Main() { int j=0; for(int i=0; i<=10;i++) { j=j+1; } Console.ReadLine(); } } The Foreach statement repeats a group of embedded statements for each element in an array or an object collection. We do not need to specify the loop bounds minimum or maximum. example: using sytem; class class1 { static void Main() { int j=0; int[] arr=new int[] {0,3,5,2,55,34,643,42,23}; foreach(int i in arr) { j=j+1; } Console.ReadLine(); } }

3 4

2. Difference between Covariance and Contravariance S.No 1 Covariance Converting from a broader type to a specific type is called co-variance.If B is derived from A and B relates to A, then we can assign A to B. Like A=B. This is Covariance. Contravariance Converting from a more specific type to a broader type is called contra-variance. If B is derived from A and B relates to A, then we can assign B to A. Like B= A. This is Contravariance.

Co-variance is guaranteed to work Contra-variance on the other hand is not without any loss of information during guaranteed to work without loss of data. As conversion. So, most languages also such an explicit cast is required. provide facility for implicit conversion. e.g. Converting from cat or dog to animal is e.g. Assuming dog and cat inherits from called contra-variance, because not all animal, when you convert from animal features (properties/methods) of cat or dog is type to dog or cat, it is called copresent in animal. variance.

Example:

class Fruit { } class Mango : Fruit { } class Program { delegate T Func<out T>(); delegate void Action<in T>(T a); static void Main(string[] args) { // Covariance Func<Mango> mango = () => new Mango(); Func<Fruit> fruit = mango; // Contravariance Action<Fruit> fr = (frt) => { Console.WriteLine(frt); }; Action<Mango> man = fr; } } 4 Note: 1. Co-variance and contra-variance is possible only with reference types; value types are invariant. 2. In .NET 4.0, the support for co-variance and contra-variance has been extended to generic types. No now we can apply co-variance and contra-variance to Lists etc. (e.g. IEnumerable etc.) that implement a common interface. This was not possible with .NET versions 3.5 and earlier.

3.Difference between IList and IEnumerable

S.No 1

IList IList is used to access an element in a specific position/index in a list. IList is useful when we want to Add or remove items from the list. IList can find out the no of elements in the collection without iterating the collection. IList does not support filtering.

IEnumerable IEnumerable is a forward only collection, it can not move backward and between the items. IEnumerable does not support add or remove items from the list. Using IEnumerable we can find out the no of elements in the collection after iterating the collection. IEnumerable supports filtering.

2 3

4.Difference between IEnumerable and IQueryable

S.No 1 2

IEnumerable IEnumerable exists in System.Collections Namespace. IEnumerable is best to query data from in-memory collections like List, Array etc. While query data from database, IEnumerable execute select query on server side, load data in-memory on client side and then filter data. IEnumerable is suitable for LINQ to Object and LINQ to XML queries. IEnumerable does not supports custom query. IEnumerable does not support lazy loading. Hence not suitable for paging like scenarios. Extension methods supports by IEnumerable takes functional objects. IEnumerable Example

IQueryable IQueryable exists in System.Linq Namespace. IQueryable is best to query data from outmemory (like remote database, service) collections. While query data from database, IEnumerable execute select query on server side with all filters. IQueryable is suitable for LINQ to SQL queries. IQueryable supports custom query using CreateQuery and Execute methods. IQueryable support lazy loading. Hence it is suitable for paging like scenarios. Extension methods supports by IEnumerable takes expression objects means expression tree.

4 5 6

MyDataContext dc = new MyDataContext (); IEnumerable list = dc.loyees.Where(p => p.Name.StartsWith("S")); list = list.Take(10); Generated SQL statements of above query will be : SELECT [t0].[EmpID], [t0].[EmpName], [t0].[Salary] FROM [Employee] AS [t0] WHERE [t0].[EmpName] LIKE @p0

Note: In this query "top 10" is missing since IEnumerable filters records on client side IQueryable Example MyDataContext dc = new MyDataContext (); IEnumerable list = dc.loyees.Where(p => p.Name.StartsWith("S")); list = list.Take(10); Generated SQL statements of above query will be : SELECT TOP 10 [t0].[EmpID], [t0].[EmpName], [t0].[Salary] FROM [Employee] AS [t0] WHERE [t0].[EmpName] LIKE @p0 Note: In this query "top 10" is exist since IQueryable executes query in SQL server with all filters. 5.Difference between IEnumerable and IEnumerator S.No 1 IEnumerable The IEnumerable interface is a generic interface that provides an abstraction for looping over elements. In addition to providing foreach support, it allows us to tap into the useful extension methods in the System.Linq namespace, opening up a lot of advanced functionality The IEnumerable interface contains an abstract member function called GetEnumerator() and return an interface IEnumerator on any success call. IEnumerable does not remember the cursor state i.e currently row which is iterating through IEnumerable is useful when we have only iterate the value IEnumerator IEnumerator provides two abstract methods and a property to pull a particular element in a collection. And they are Reset(), MoveNext() and Current The signature of IEnumerator members is as follows: void Reset() : Sets the enumerator to its initial position, which is before the first element in the collection. bool MoveNext() : Advances the enumerator to the next element of the collection. object Current : Gets the current element in the collection IEnumerator does remember the cursor state

IEnumerator is useful when we have to pass the iterator as parameter and has to remember the value

1) What are differences between XML and HTML? S.No 1 2 3 XML XML provides user definable tags XML is content driven End tags are essential in a well formed XML document. In a well formed document, elements can be defined as single tag or a pair of tags like <student/> or the <student> </student> pair Quotes required around attribute values Slash required in empty tags XML is used for describing data HTML HTML provides defined set of tags designed for web display HTML is format driven End tags are not always required.<HTML> tag needs an equivalent </HTML> tag but <br> tag does not require </br> tag Quotes are not required for the values of attributes Slash not required HTML is used for designing pages

4 5 6

1.Difference between LINQ and SQL S.No 1 2 LINQ LINQ Stands for language integrated query. LINQ Statements are verified during compile time. To use LINQ we can depend upon our .Net Language syntaxes and also we can consume base class library functionalities. LINQ Statements can be debugged as they execute under framework environment. SQL . SQL SQL stands for Structured Query Language. SQL statements can be used in a application gets verified for their syntaxes only in the run time. To use SQL we need to be familiar with SQL syntaxes and also the predefined functions of SQL like MAX,MIN,LEN and SUBSTRING etc... As SQL statements execute on Database server debugging of the code is not possible.

2.Difference between LINQ to SQL and Entity Framework S.No 1 2 3 4 5 6 LINQ to SQL It only works with Sql server. Used for rapid application development. It does not support for complex type. It cannot generate db from model. Mapping type ( class to single table) We can query data using DataContext. Entity Framework It works with variety of db products. Cannot used for rapid application development. It provides support for complex type. It can generate db from model. Mapping type ( class to multiple tables) We can query data using esql,object services,entity client and linq to entities.

Another Good Reference: http://jinaldesai.net/linq-to-sql-vs-entity-framework/ (OR) http://www.slideshare.net/jinaldesailive/linq-to-sql-vs-entity-framework-jinal-desai

3.Difference between LINQ and Stored Procedures

S.No 1

LINQ As LINQ is part of .NET, we can use visual studios debugger to debug the queries With LINQ everything gets complied into single DLL hence deployment becomes easy. LINQ is type safe, so queries errors are type checked at compile time.It is really good to encounter an error when compiling rather than runtime exception! LINQ supports multiple databases LINQ supports abstraction which allows framework to add additional improvements like multi threading. It is much simpler and easier to add this support through LINQ than Stored Procedures.

Stored Procedures It is really very hard to debug the Stored Procedure With Stored Procedures, we need to provide an additional script for deployment Stored Procedures are not type safe i.e., error can be caught only during runtime.

4 5

With Stored Procedures which need to be re-written for different databases. As Stored Procedures does not support abstaction , so it is difficult to add additional impovements like multi threading

LINQ queries need to compile Stored Procedures are ster thn LINQ before execution.Therefore, LINQ because they are precompiled i.e., is slower than Stored Procedures. Stored Procedures have a predictable execution plan.Therefore, if a stored procedure is being executed for the second time, the database gets the cached execution plan to execute the stored procedure.

4.Difference between LINQ to SQL and LINQ to Objects

S.No 1

LINQ to SQL

LINQ to Objects

LINQ to SQL needs a Data LINQ to Objects does not need any Context object. The Data Context intermediate LINQ provider or API. object is the bridge between LINQ and the database. LINQ to SQL returns data of type IQueryable<T> LINQ to Objects returns data of type IEnumerable<T>.

LINQ to SQL is translated to SQL by way of Expression Trees, which allow them to be evaluated as a single unit and translated to the appropriate and optimal SQL statements. LINQ to SQL is translated to SQL calls and executed on the specified database

LINQ to Objects does not need to be translated.

LINQ to Objects is executed in the local machine memory.

5.Difference between LINQ to SQL and LINQ to Entities

S.No 1 2 3 4 5 6 7 8

LINQ to SQL
Does not support Conceptual Data Model Does not support Storage Schema Does not support Mapping Schema Does not support New Data Access Provider Does not support Non-SQL Server Database Support

LINQ to Entities
Supports Conceptual Data Model Supports Storage Schema Supports Mapping Schema Supports New Data Access Provider

Supports Non-SQL Server Database


Support Does not support Direct Database Connection

Supports Direct Database


Connection Does not support Multiple-table Inheritance Does not support Single Entity from Multiple Tables

Supports Multiple-table Inheritance Supports Single Entity from Multiple


Tables

1.Difference between LINQ to SQL and ADO.NET S.No 1 LINQ to SQL Used for data handling with SQL Server databases only. Uses the extension methods of System.Linq.Queryable class. Introduced in .net Framework 3.0 DataContext is used for Database connectivity. Syntax and coding is somewhat complex. ADO.NET Used for data handling with any database: SQL Server/Access/Oracle/Excel etc. Does not use the extension methods of System.Linq.Queryable class. It is there since the .net Framework 1.0 SqlConnection/OleDbConnection are used for database connectivity Easier syntax and coding.

2 3 4 5

Note: Both LINQ TO SQL and ADO.NET have connected / disconnected modes of data handling 2.Difference between LINQ and nHibernate S.No 1 2 3 4 LINQ LINQ is not an open-source LINQ is an incomplete ORM tool as it needs additional extensions. LINQ is primarily a querying language LINQ is much more useful in small applications where there is no massive dependence on databases. With LINQ, database already exists and the relationships and some programming will be dependent on how the database is defined. nHibernate nHibernate is an open source. nHibernate is an ORM tool nHibernate has a limited querying language. nHibernate is much more useful in largel applications where there is massive dependence on databases. With nHibernate, database does not already exist and it needs to be defined .

3.Difference between LINQ and Entity Framework

S.No 1 2

LINQ Used for Rapid Application Development Works with objects in database

Entity Framework Used for Enterprise Development Works with Conceptual model of database Works with all data sources ".EDMX" is created while using Entity Framework

3 4

Mainly woks with SQL Server ".dbml" is created while using LINQ to SQL

1) What are the differences between TypeOf() and GetType()? S.No TypeOf() GetType() 1 Its an operator Its a method 2 Can't be overloaded Has lot of overloads 2) What are the differences between const and readonly? S.No const readonly 1 It cannot be static It can be instance level or static 2 It is evaluated at design time It is evaluated at run time 3 It is initialized at declaration It is initialized at declaration or in constructor 4 It must be of integral type or In addition, it can have complex types enumeration with new keyword and enumerations are not allowed 3) What are the Differences between Abstract Class and Interface? S.No Abstract Class Interface 1 It can have implemented Methods It cannot have implemented Methods 2 A class can inherit only one abstract A Class can implement any number of class Interfaces 3 We go for Abstract classes on such We go for Interface on such situations situations where we need to give where we need to give common common functionality for group of functionality for group of un-related related classes classes 4 If we add a new method, then we can If we add a new method, then we need to provide a default implementation and change all the existing work so no need to make any change to existing work 5 Static and Instance constants are Only Static constants are possible possible 4) What are the differences between Structure and Class? S.No Structure Class 1 It is value type It is reference type 2 It is stored on stack It is stored on heap 3 It does not support inheritance It supports inheritance 4 It is suitable for small data structure It is suitable for complex data structures 5) What are the differences between property and indexer? S.No Property Indexer 1 A property can be static member An indexer is always an instant member 2 The get accessor of a property The get accessor of an indexer corresponds to a method with no corresponds to the same formal parameter parameters lists as the indexer 6) What are the differences between overloading and overriding? S.No Overloading Overriding 1 Same name in same / derived class We need to provide different but with different / type of parameter implementation than base class 2 Has different signature Has same signature 3 Otherwise called Compile-time Otherwise called Run-time Polymorphism

Polymorphism 7) What are the differences between Value Types and Reference Types? S.No Value Types Reference Types 1 It is stored on stack It is stored on heap 2 It can be accessed directly It can be accessed through references 3 Life time of value type is determined Lifetime of reference type is managed by lifetime of variable that contain by .net framework them 4 Examples: All numeric data type, Examples: All arrays, String, Class types, Boolean, char, Date, Structure, Delegate enumerations Note: Object is not any kind of type. You can create object of structure as well as Class Are not type: Namespaces, Modules, Events, properties, procedures, variables, constants, & fields.

Difference between Events and Delegates S.No


1 2 3

Events
Event can be used in an interface definition Event can only be invoked from the class that declares it Event comes with its pair of accessors i.e Add and Remove. An event is always assigned and unassigned with a += and -= operator. Event has a restrictive signature and must always be of the form Event (object source, EventArgs args)

Delegates
Delegate cannot be used in an interface definition Delegates can be invoked from child classes and clients. There is no pair of accessors concept in delegates.

Delegates do not have restrictive signature as like events

Difference between Class and Object S.No


1 2 3

Class
It is a datatype that contains the programming logic. Class is visible in the source code and resides in hard disk. Class is like a template or blueprint of the object. It implements reusability,encapsulation, inheritance Example:Button is a class with properties like Text,BackColor, events like click, methods like Focus We can create subclasses

Object
It is a chunk of memory that implements the class logic. Object is in the RAM and not visible in source code. It is the real world implementation of the class. Each object has its own copy of data.

Example: Button1, Button2 are the


objects of Button class. We cannot create sub-objects

Difference between Private and Static Constructor S.No Static constructor Private constructor
1 A static constructor is called before the first instance is created. i.e. global initializer. Static constructor will be called first time when the class is referenced.Static constructor is used to initialize static members of the class. Private constructor is called after the instance of the class is created. Static members will not be initialized either by private or public constructor.

The static constructor will only be The private constructor will be executed once. executed each time it is called.

Difference between properties and methods S.No


1 2

Properties
Properties are used to represent data Properties are created by using getter and setter i.e., get{} and set{}

Methods
Methods are used to performs actions Methods create like public void method1(parameter list here)

Difference between Singleton Pattern and a static class S.No Singleton Pattern
Singleton pattern maintains single instance. 2

static class
We cannot create instance for static class.

A singleton can extend classes and A static class cannot . implement interfaces. Note: It can extend classes, but it does not inherit their instance members. A singleton can be initialized lazily or asynchronously. Singletons can be handled polymorphically without forcing their users to assume that there is only one instance. Singleton Class can have value when Class object instantiated between server and client, such a way if three client want to have a shared data between them Singleton can be used.Thats why singleton class can be used for state mangement in stateless scenarios like shopping cart scenario. We can pass singleton object as parameter Singleton provides flexibility and also provides sort of a mechanism to control object creation based on various requirements. They can be extended as well if need arises. In other words we are not always tied to a particular implementation. With Singleton we have the flexibility to make changes as when situation demands. A static class is generally initialized when it is first loaded, leading to potential class loader issues. static class cannot be handled polymorphically.

Static are always just shared and have no instance but multiple references.

6 7

We cannot pass parameter in static class Static classes once defined could not accomodate any future design changes as by design static classes are rigid and cannot be extended.

Difference between Abstraction and Encapsulation Abstraction Abstraction solves the problem in the design level. Encapsulation Encapsulation solves the problem in the implementation level.

Abstraction is used for hiding the Encapsulation means hiding the code unwanted data and giving relevant data. and data into a single unit to protect the data from outside world. Abstraction allows us to focus on what the object does instead of how it does it Abstraction- Outer layout, used in terms of design. For Example:Outer Look of a Mobile Phone, like it has a display screen and keypad buttons to dial a number. Encapsulation means hiding the internal details or mechanism of how an object does something. Encapsulation- Inner layout, used in terms of implementation. For Example:- Inner Implementation detail of a Mobile Phone, how keypad button and Display Screen are connected with each other using circuits

Difference between Composition and Aggregation Composition Defines a strong-coupled relationship between two entities, where the one entity is part of another, and both need each other for their existence. e.g. Human body and the Heart. Composition implies real ownership of its components Composition has a stronger bond of its components. Composition has components that exist at the inner level. Aggregation Defines a weak-coupled relationship between two entities, where one entity could be part of another, but either can exist without the other, independantly. e.g.School and teacher. Aggregation does not necessarily own any of its aggregates. Aggregation has weaker or looser bonds with its aggregates. Aggregation has aggregates that live at the outer level.

Difference between Private Class and Sealed Class Private Class Sealed Class

A Private class can only be accessed by A Sealed class can be accessed by any the class it is defined and contain within class.Private Constructor of a Private - it is completely inaccessible to outside Class = Sealed Class. classes. In private Class,we can create a constructor and therefore we can create an instance of that class. public class A { private class B { } B b = new B(); } public class C { A.B b = new A.B(); // ERROR } In Sealed class we can not create a constructor of that class, so no instance of that class is possible. public sealed class A { } public class B : A //ERROR { }

The main use of Private class is to create The sealed classes are mainly used to a user-defined type, which we want to be prevent inheritance features of object accessible to that class only. oriented programming. Private class(i.e private constructor) is also used to implement singleton classes(pattern). Singleton means "A single-instance object, and it simplify complex code. Singletons have a static property that we must access to get the object reference." Difference between Static Class and Sealed Class Static Class We can neither create their instances, nor inherit them They can have static members only. ex: static class Program Sealed Class We can create their instances, but cannot inherit them They can contain static as well as nonstatic members. ex:

{ }

sealed class demo { } class abc:demo { --Wrong }

Static classes are used when a class The sealed classes are mainly used to provides functionality that is not specific prevent inheritance features of object to any unique instance. oriented programming. Difference between Virtual method and Abstract method

Feature Overriding

Virtual method

Abstract method

Virtual method may or may An abstract method should be not override by inherited class. overriden by inherited class. i.e.,Virtual method provide the derived class with the option of overriding it. Virtual = = Overridable i.e.,Abstract method forces the derived class to override it. abstract == MustOverride Abstract method does not provide an implementation. Abstract methods in a class contain no method body, and are implicitly virtual Abstract method's scope to members and classes Abstract method - direcly NO, but other way, Yes. We can create an instance of a class that derives from an abstract class. And we can declare a type Abstract class and instantiate that as a derived class.

Implementation Necessity to Implement

Virtual method has an implementation. Virtual methods allow subclasses to provide their own implementation of that method using the override keyword Virtual methods scope to members only. Virtual methods - Not applicable, as we can't create instance for members, it is possible only with classes.

Scope Instancing

Example: public abstract class Test { public abstract void A(); // Abstract method

public virtual void B() { Console.WriteLine("Test.B"); } // Virtual Method } public class InheritedTest : Test { public override void A() { Console.WriteLine("InheritedTest.A"); } //Method B implementation is optional public override void B() { Console.WriteLine("InheritedTest.B"); } }

Difference between Class and Static Class Class Class has Instance Members In Class, Constructor has Access Specifier. In Class Constructor, initiation is done every time when an object is created for the class In Class, Class members can be accessed through class object. Static Class Static class does not have Instance Members In Static Class, Constructor does not have Access Specifier. In Static Class ,Constructor will be called only one time .

In Static Class, members can be accessed through its Class name only

Difference between Method Overloading and Method overriding in C# Method Overloading Method Overloading is passing same message for different functionality Method Overloading is between the same function name with the different signature Method overriding Method Overriding is redifining parent class function to the child class Method Overriding is between the same method.

Method Overloading does not check for Method Overriding checks the return the return type. type. Method Overloading takes place in the same class. Method Overloading is static binding Method Overriding takes place between parent and child classes Method Overriding is a dynamic binding.

1.Difference between SQL Server 2008 and SQL Server 2012 S.No 1 SQL Server 2008 SQL Server 2012

The Maximum number concurrent SQL server 2012 has unlimited connections to SQL Server 2008 concurrent connections. is 32767. The SQL Server 2008 uses 27 bit bit precision for spatial calculations. TRY_CONVERT() and FORMAT() functions are not available in SQL Server 2008 ORDER BY Clause does not have OFFSET / FETCH options as in SQL Server 2012 The SQL Server 2012 uses 48 bit precision for spatial calculations TRY_CONVERT() and FORMAT() functions are newly included in SQL Server 2012 ORDER BY Clause now have OFFSET / FETCH options to use paging to show required rows per page in applications and allow the user to scroll through each page of results rather than download the entire set In the sample query below, SQL Server would return 10 records beginning with record 11. The OFFSET command provides a starting point for the SELECT statement in terms of paging, and the FETCH command provides how many records to return at a time. SELECT BusinessEntityID, FirstName, LastName FROM Person.Person ORDER BY BusinessEntityID OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY;

SQL Server 2008 is code named as Katmai. In SQL Server 2008, audit is an Enterprise-only feature. Only available in Enterprise, Evaluation, and Developer Edition.

SQL Server 2012 is code named as Denali In SQL Server 2012,support for server auditing is expanded to include all editions of SQL Server.

Sequence is not available in SQL Server 2008

Sequence is included in SQL Server 2012.Sequence is a user defined object that generates a sequence of a number.

Here is an example using Sequence. /****** Create Sequence Object ******/ CREATE SEQUENCE MySequence START WITH 1 INCREMENT BY 1; /****** Create Temp Table ******/ DECLARE @Person TABLE ( ID int NOT NULL PRIMARY KEY, FullName nvarchar(100) NOT NULL ); /****** Insert Some Data ******/ INSERT @Person (ID, FullName) VALUES (NEXT VALUE FOR MySequence, 'Umar Ali'), (NEXT VALUE FOR MySequence, 'John Peter'), (NEXT VALUE FOR MySequence, 'Mohamed Iqbal'); /****** Show the Data ******/ SELECT * FROM @Person; The results would look like this: ID FullName 1 Umar Ali 2 John Peter 3 Mohamed Iqbal 8 The Full Text Search in SQL Server 2008 does not allow us to search and index data stored in extended properties or metadata. The Full Text Search in SQL Server 2012 has been enhanced by allowing us to search and index data stored in extended properties or metadata. Consider a PDF document that has "properties" filled in like Name, Type, Folder path, Size, Date Created, etc. In the newest release of SQL Server, this data could be indexes and searched along with the data in the document itself. The data does have to be exposed to work, but it's possible now. Analysis Services will include a new BI Semantic Model (BISM). BISM is a

Analysis Services in SQL Server does not have BI Semantic Model

(BISM) concept.

3-layer model that includes: Data Model Business Logic Data Access BISM will enhance Microsoft's front end analysis experiencing including Excel, Reporting Services and SharePoint Insights. Microsoft has said that BISM is not a replacement for the current BI Models but more of an alternative model. In simple terms, BISM is a relation model that includes BI artifact such as KPIs and hierarchies.

For more references on SQL Server 2012 Features, please have a look at the below links, http://social.technet.microsoft.com/wiki/contents/articles/3783.what-s-new-in-sql-server-2012-enus.aspx http://beyondrelational.com/modules/4/whatisnew/361/what-is-new-in-sql-server-2012-denali.aspx? tab=tags&tn=category http://blogs.technet.com/b/dataplatforminsider/archive/2011/11/01/my-top-5-sql-server-2012features-by-aaron-bertrand-guest-blogger.aspx And, further updates on difference between questions and answers, please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1) What are the Differences between TRUNCATE and Delete? S.No Truncate Delete 1 Truncate is faster Delete is comparatively slower 2 Removes all rows from a table Can remove specific rows with Where clause 3 Is DDL Command Is DML Command 4 Resets identity of the table Does not reset identity of the table 5 Removes the data by deallocating Removes one row at a time and the data pages and logs the records an entry in the transaction log deallocation. for each deleted row. 6 Cannot be rolled back Can be rolled back 2) What are the differences between Primary key and Unique key? S.No Primary Key Unique Key 1 Creates Clustered index Creates Non-Clustered index 2 Null values are not allowed Allows only one null value 3) What are the Differences between Clustered Indexes and Non-Clustered Indexes? S.No 1 2 3 Clustered Indexes It reorders the physical storage of records in the table There can be only one Clustered index per table The leaf nodes contain data Non-Clustered Indexes It sorts and maintain a separate storage More than one The leaf node contains pointer to data

4) What are the differences between Stored Procedures and User Defined Functions? S.No Stored Procedures User Defined Functions 1 Stored Procedure cannot be used User Defined Function can be used in in a Select statement a Select statement 2 Stored procedure supports User Defined Function does not Deferred Name Resolution support Deferred Name Resolution 3 Stored Procedures are generally User Defined Functions are generally used for performing Business used for Computations Logic 4 Stored Procedure need not return User Defined Functions should return a value a value 5 Stored Procedures can return any User Defined Functions cannot return datatype Image 6 Stored Procedures can accept User Defined Functions accept lesser more number of input parameters number of input parameters than than User Defined Functions. Stored Procedures. UDF can have Stored Procedures can have upto upto 1023 input parameters 21000 input parameters 7 Stored Procedures can use Temporary Tables cannot be used in a Temporary Tables User Defined Function 8 Stored Procedures can execute User Defined Functions cannot Dynamic SQL execute Dynamic SQL 9 Stored Procedure supports error User Defined Function does not handling support error handling. RAISEERROR or @@ERROR are

10

Non-deterministic functions can be used in Stored Procedures.

not allowed in UDFs Non-deterministic functions cannot be used in User Defined Functions (UDFs). For example, GETDATE() cannot be used in User Defined Functions(UDFs)

5) What are the differences between Where and Having clauses? S.No Where clause Having clause 1 It applies to individual rows It applies to a group as a whole 2 It selects rows before grouping It selects rows after grouping 3 It cannot contain aggregate It can contain aggregate functions functions 4 It can be used in select, delete It is used only in select clause ,insert etc. 6) What are the differences between Union and UnionAll? S.No Union UnionAll 1 This is used to eliminate duplicate It will not eliminate duplicate rows rows 2 This selects only distinct rows It selects all the values 3 It can be used to combine any It can be used to combine maximum number of queries of 2 queries 4 It cannot contain aggregate It can contain aggregate functions functions 7) What is the difference between normal Select statement and a Cursor? S.No Select statement Cursor 1 Select statements are used for Cursors are used for row-level table-level processing processing

1) What are the differences between Instead of Triggers and After Triggers? S.No Instead of Triggers After Triggers 1 Each table or view can have one A table can have several AFTER INSTEAD OF trigger for each triggers for each triggering action. triggering action (UPDATE, DELETE, and INSERT) 2 INSTEAD OF triggers fire in AFTER triggers fire after the place of the triggering action and triggering action (INSERT, UPDATE, before constraints are processed. or DELETE) and after any constraints are processed. 2) What are the differences between Views and User-Defined Functions? S.No Views User-Defined Functions 1 Views cannot accept parameters. User-Defined Functions can accept parameters. 2 Output of the Views cannot be Output of the User-Defined Functions directly used in the SELECT can be directly used in the SELECT clause. clause. 3) What are the differences between Triggers and Stored Procedures? S.No Triggers Stored Procedures 1 Triggers cannot return a value Stored Procedures may return a value 2 We cannot pass parameters in We can pass parameter in Stored Triggers Procedures 3 We can write a Stored procedure We cannot write a Trigger within a within a Trigger Stored Procedure 4 Triggers are implicitly fired Stored Procedures need to be whenever insert, update or delete explicitly called by the programmer operations take place on table 5 Triggers can only be implemented Stored procedures can be written for on Tables or Views the Database

1.Difference between Identity and Sequence in SQL Server 2012 S.No 1 2 Identity Dependant on table. Identity is a property in a table. Example : CREATE TABLE Table test_Identity ( [ID] int Identity (1,1), [Product Name] varchar(50) ) Sequence Independent from table. Sequence is an object. Example : CREATE SEQUENCE [dbo]. [Sequence_ID] AS [int] START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 1000 NO CYCLE NO CACHE 3 If we need a new ID from an identity column we need to insert and then get new ID. Example : Insert into [test_Identity] Values (SQL Server) GO SELECT @@IDENTITY AS Identity OR Select SCOPE_IDENTITY() AS Identity 4 We cannot perform a cycle in identity column. Meaning, we cannot restart the counter after a particular interval. In the sequence, we can simply add one property to make it a cycle. Example : ALTER SEQUENCE [dbo]. [Sequence_ID] In the sequence, we do not need to insert new ID, we can view the new ID directly. Example : SELECT NEXT VALUE FOR dbo.[Sequence_ID]

CYCLE; 5 We cannot cache Identity column property. Sequence can be easily cached by just setting cache property of sequence. It also improves the performance. Example : ALTER SEQUENCE [dbo]. [Sequence_ID] CACHE 3; 6 We cannot remove the identity column from the table directly. The sequence is not table dependent so we can easily remove it Example : Create table dbo.[test_Sequence] ( [ID] int, [Product Name] varchar(50) ) GO First Insert With Sequence object INSERT INTO dbo.test_Sequence ([ID],[Product Name]) VALUES (NEXT VALUE FOR [Ticket] , MICROSOFT SQL SERVER 2008) GO Second Insert without Sequence INSERT INTO dbo.test_Sequence ([ID],[Product Name]) VALUES (2 , MICROSOFT SQL SERVER 2012) 7 We cannot define the maximum value in identity column it is based on the data type limit. Here we can set up its maximum value. Example :

ALTER SEQUENCE [dbo]. [Sequence_ID] MAXVALUE 2000; 8 We can reseed it but cannot change the step size. Example : DBCC CHECKIDENT (test_Identity, RESEED, 4) We can reseed as well as change the step size. Example : ALTER SEQUENCE [dbo]. [Sequence_ID] RESTART WITH 7 INCREMENT BY 2; 9 We cannot generate range from identity. We can generate a range of sequence values from a sequence object with the help of sp_sequence_get_range.

2.Difference between Temp table and Table variable S.No 1 Temp table A Temp table is easy to create and back up data. Temp table result can be used by multiple users. Temp table will be stored in the tempdb. It will make network traffic. When we have large data in the temp table then it has to work across the database. A Performance issue will exist. Temp table can do all the DDL operations. It allows creating the indexes, dropping, altering, etc.., Table variable But the table variable involves the effort when we usually create the normal tables. But the table variable can be used by the current user only. But a table variable will store in the physical memory for some of the data, then later when the size increases it will be moved to the tempdb.

2 3

Whereas table variable won't allow doing the DDL operations. But the table variable allows us to create the clustered index only.

Temp table can be used for the But the table variable can be used up current session or global. So that a to that program. (Stored procedure) multiple user session can utilize the results in the table. Temp variable cannot use the But we cannot do it for table variable.

transactions. When we do the DML operations with the temp table then it can be rollback or commit the transactions. 7 Functions cannot use the temp variable. More over we cannot do the DML operation in the functions . The stored procedure will do the recompilation (can't use same execution plan) when we use the temp variable for every sub sequent calls. But the function allows us to use the table variable. But using the table variable we can do that. Whereas the table variable won't do like that.

Another Good Reference: http://sqljunkieshare.com/2011/11/05/difference-between-temporary-tables-and-table-variables/ 3.Difference between RAISERROR and THROW statements

S.No 1

RAISERROR Statement If a msg_id is passed to RAISERROR, the ID must be defined in sys.messages. The msg_str parameter can contain printf formatting styles. The severity parameter specifies the severity of the exception.

THROW Statement The error_number parameter does not have to be defined in sys.messages. The message parameter does not accept printf style formatting. There is no severity parameter. The exception severity is always set to 16.

2 3

4.Difference between Local temporary table and Global temporary table

S.No 1 2

Local temporary table Denoted by # symbol. Valid for the current connection only. They are cleared as soon as the current connection closes. Cannot be shared between multiple users.

Global temporary table Denoted by ## symbol. Available to all the connections once created. They are deleted when all users referencing the table disconnect from SQL Server . Can be shared between multiple users.

1.Difference between Correlated subquery and Nested subquery S.No 1 Correlated subquery Correlated subquery runs once for each row selected by the outer query. It contains a reference to a value from the row selected by the outer query. Correlated subquery follows down to top approach i.e., main query is executed first(even though parenthesis are present) and then child query. We can also say: in a Correlated subquery,Inner query condition is used in the outer query 4 Example: select e1.empname, e1.basicsal, e1.deptno from emp e1 where e1.basicsal = (select max(basicsal) from emp e2 where e2.deptno = e1.deptno) Nested subquery Nested subquery runs only once for the entire nesting (outer) query. It does not contain any reference to the outer query row. Nested subquery follows top-down approach i.e., child query is executed first and then parent . We can also say:In a subquery Outer query condition is used in the the inner query.

Example: select empname, basicsal, deptno from emp where (deptno, basicsal) in (select deptno, max(basicsal) from emp group by deptno)

2.Difference between Weak Entity Set and Strong Entity Set

S.No 1

Weak Entity Set An entity set which does not possess sufficient attributes to form a primary key is known as a weak entity set. Member of a weak entity set is a subordinate entity. Example: Specific Person,Company,Event,Plant

Strong Entity Set An entity set which does have a primary key is called a strong entity set. Member of a strong entity set is a dominant entity. Example: Set of all Persons,Companies,Trees,Holidays

2 3

3.Difference between char and varchar data types in Sql Server S.No 1 2 Char Fixed length memory storage CHAR takes up 1 byte per character Use Char when the data entries in a column are expected to be the same size like phone number Ex: Declare test Char(100); test="Test" Then "test" occupies 100 bytes first four bytes with values and rest with blank data Varchar Variable length memory storage(Changeable) VARCHAR takes up 1 byte per character, + 2 bytes to hold length information Use Varchar when the data entries in a column are expected to vary considerably in size like address Ex: Declare test VarChar(100); test="Test" Then "test" occupies only 4+2=6 bytes. first four bytes for value and other two bytes for variable length information.

4.Difference between Sql Server 2005 and Sql Server 2008 S.No 1 2 3 4 5 6 7 Sql Server 2005 XML datatype is introduced. Cannot encrypt the entire database. Datetime is used for both date and time. No table datatype is included. SSIS is started using. CMS is not available. PBM is not available Sql Server 2008 XML datatype is used. Can encrypt the entire database introduced in 2008. Date and time are seperately used for date and time Table datatype introduced. SSIS avails in this version. Central Management Server(CMS) is Introduced. Policy based management(PBM) server is Introduced.

1.Difference between Database Mail and SQL Mail S.No 1 2 3 4 Database Mail Based on SMTP (Simple Mail Transfer Protocol). Introduced in Sql Server 2005. No need to install Outlook. More secure than Sql mail. SQL Mail Based on MAPI (Messaging Application Programming Interface). Used prior versions of Sql Server 2005. Require Outlook to be installed. Less secure than Database mail.

2.Difference between Azure Table storage and SQL Azure S.No 1 Azure Table storage It is built on top of the Azure Storage platform. SQL Azure It is an SQL Server that has been configured to be hosted on top of the Windows Azure in a high availability mode. It comprises standard SQL Tables with indexes and referential integrity.

It comprises flexible or schemaless entities. No referential integrity between the tables, and no custom indexes. It can scale massive amounts of data due to the partition key. Can be thought as single spreadsheet.

3 4

It may not scale as far as Azure Table storage. Look familiar to any .Net developer who has used Sql server 2008 prior.

3.Difference between DBMS and RDBMS S.No 1 2 DBMS Stands for DataBase Management System In dbms no relationship concept RDBMS Stands for Relational DataBase Management System It is used to establish the relationship concept between two database objects, i.e, tables It supports multiple users It treats data as Tables internally It supports minimum 6 rules of E.F.CODD It requires High software and

3 4 5 6

It supports Single User only It treats Data as Files internally It supports 3 rules of E.F.CODD out off 12 rules It requires low Software and

Hardware Requirements. 7 8 DBMS is used for simpler business applications DBMS does not impose any constraints or security with regard to data manipulation In DBMS Normalization process will not be present There is no enforcement to use foreign key concept compulsorily in DBMS FoxPro, IMS are Examples

hardware requirements. RDBMS is used for more complex applications. RDBMS defines the integrity constraint for the purpose of holding ACID PROPERTY In RDBMS, normalization process will be present to check the database table consistency Although the foreign key concept is supported by both DBMS and RDBMS but its only RDBMS that enforces the rules SQL Server, Oracle are examples

10

11

4.Difference between SQL Server 2000 and SQL Server 2005 S.No 1 2 3 4 5 6 7 8 9 SQL Server 2000 Query Analyser and Enterprise manager are separate. No XML datatype is used. We can create maximum of 65,535 databases. Exception Handling mechanism is not available There is no Varchar(Max) data type is not available DDL Triggers is not available DataBase Mirroring facility is not available RowNumber function for paging is not available Table fragmentation facility is not available Full Text Search facility is not available SQL Server 2005 Both are combined as SSMS(Sql Server management Studio). .XML datatype is introduced. We can create 2(pow(20))-1 databases. Exception Handling mechanism is available Varchar(Max) data type is introduced. DDL Triggers is introduced DataBase Mirroring facility is introduced RowNumber function for paging is introduced Table fragmentation facility is introduced Full Text Search facility is introduced

10

11 12 13 14 15

Bulk Copy Update facility is not available Data Encryption concept is not introduced Cannot compress the tables and indexes. No varchar(max) or varbinary(max) is available.

Bulk Copy Update facility is introduced .Cannot encrypt the entire database Can Compress tables and indexes. (Introduced in 2005 SP2) Varchar(max) and varbinary(max) is used.

Data Transformation SQL Server Integration Services(SSIS) Services(DTS) is used as ETL tool is started using from this SQL Server version and which is used as ETL tool

1.Difference between SQL Server and PostgreSQL S.No 1 2 SQL Server INSERT t VALUES () BULK INSERT and BCP PostgreSQL This syntax is not allowed. Allows: INSERT INTO t VALUES () uses COPY instead (which has the functionality of both BCP and BULK INSERT) pgAdmin Boolean type (accepts values true and false) Has sequencers (like Oracle) default schema is PostgreSQL Default listening on 5432 datatype: text key is not clustered by default (and it is enforced by a constraint and not an an index!) Domains user: postgres NATURAL and USING joins SELECT * FROM t LIMIT 10

3 4 5 6 7 8 9

Management Studio Bit type IDENITTY default schema is dbo Default Listening on 1433 datatype: varchar(max) Key is clustered by default

10 11 12 13 14 15

User Defined Data Types user: sa No such thing SELECT TOP 10 * FROM t

Query plans read from right to left Query plan read from left to right Estimate Query Plan: CTRL+L Estimate Query Plan: F7

2.Difference between Cross Join and Full Outer Join S.No 1 Cross Join No join conditions are specified. Full Outer Join A combination of both left and right outer joins. Results in every row from both of the tables , at least once. Assigns NULL for unmatched fields.

Results in pairs of rows.

Results in Cartesian product of two tables.

3.Difference between SQL Server and Oracle

S.No 1

SQL Server SQL History: IBM introduced structured Query Language (SQL) as the language to interface with its prototype relational database management system; System R. Oracle Corporation introduced the first commercially available SQL relational database management system in 1979. Today, SQL has become an industry standard, and Oracle Corporation clearly leads the world in RDBMS technology. SQL is used for all types of DB activities by all type of users. The basic SQL commands can be learned in a few hours and even the most advanced commands can be mastered in a few days.

Oracle Oracle History: Oracle Corp is the leading supplier for S/w products, headquartered in Redwood shores, California, USA. It was founded by Larry Ellison, Bob Miner and Ed Oates in 1977. Now they have 43,000 Employees in 150 countries. Oracle first commercial RDBMS was built in 1979, and it is the first to support the SQL. Oracle is the first S/w company to develop and deploy 100 % Internet-enabled enterprise Software.

SQL (Structure Query Language): When a user wants to get some information from any DB file, he can issue a query. Structured query language (SQL), pronounced Sequel, is the set of commands that all programs and users must use to access data within the Oracle. SQL is a high performance fault tolerant data base management system. The database is mostly maintained by SQL language, which is conceded as the heart of the RDBMS.

Oracle (RDBMS): Oracle is fastest and easiest way to create applications in MS windows. It provides the ability to store and access data. Whether you are experienced or new to windows in programming, Oracle provides you with the complete set of tools to simplify rapid application development. The Oracle refers to the method used to create the graphical user inter face. There is no need to write numerous lines of code to describe the appearance and location of inter face elements.

SQL Technology: SQL is divided into four parts: DDL (Data Definition Language): Create, Alter, Drop, Rename, Truncate.

Oracle Technology: Oracle DB structure is divided into two parts, one is called Physical structure (these files define the operating system that make up the DB, each Oracle DB is made by three types

DML (Data Manipulate Language): Select, Update and Delete, Insert, Into. DCL (Data Control Language): Grant, Revoke TCL (Transaction Control Language): Commit, Rollback. 4 Advantages: Provides easy access to all data. Flexibility in data molding. Reduced data storage and redundancy. Provides a high-level manipulation language. SQL can save data in common PC file formats that can be imported into other application (like MsExcel). SQL is not case sensitive. It can enter one or more lines. Tabs and indents can be used to make code more readable. Can be used by a range of users. It is a nonprocedural language (English-like language). 5 Differences: SQL is a tool for all DB like DBMS, RDBMS, TSQL, and SQL Plus. SQL maintains different RDBMS. SQL is combination of different commands and functions that why, SQL is worked for Oracle DB as a

of files, data-files, redo logs filecontrols file) and the other is called Logical structure (these files define the logical areas of storage like schema, table spaces, segments and extents).

Advantages: Data consistency Integration of data Easy file generation Increased security Easy updating of records No wastage of time Enforcement of standards Controlled data redundancy Reduce the total expenditures Searching of particular data is easy Dispose of heavy files and register work The work of three persons is reduced to one Instant intimation of modification of information

Differences: Oracle Corp is the worlds leading supplier of S/w products. Oracle is the platform, where we develop and implement different DB designs and software. Oracle is the combination of different S/w products, where

command prompt shell (SQL is the command prompt shell, where we can communicate with any DB).

they work together for designing DB. Oracle works with different front and back end products/tools (like SQL).

4.Difference between View and Stored Procedure

S.No 1 2 3 4 5

View Does not accepts parameters Can be used as a building block in large query.

Stored Procedure Accept parameters Cannot be used as a building block in large query.

Can contain only one single Select Can contain several statement like if, query. else, loop etc. Cannot perform modification to any table. Can be used (sometimes) as the target for Insert, update, delete queries. Can perform modification to one or several tables. Cannot be used as the target for Insert, update, delete queries.

5.Difference between IN and EXISTS

S.No 1

IN Returns true if specified value matches any value in the sub query or a list. The sub query will run first and then only outer query. IN is slower than EXISTS. The IN is used in the widely For Static variables for eg: select name from table where ID in (Select ID from table2). Example: SELECT id, [Name] FROM dbo.tablea WHERE id IN (SELECT id

EXISTS Return true if sub query contain any rows. The Outer query will ran first and then only sub query. Exists is faster than IN.The Outer query will run first and then only inner query.So it will reduce the over head. The Exists is useful mostly in IF conditional statements. Example: SELECT id, [Name] FROM dbo.tablea AS a WHERE EXISTS (SELECT id2

2 3

FROM dbo.tableb)

FROM dbo.tableb WHERE id2 = a.id)

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1.Difference between Checkpoint and Lazy Writer S.No 1 2 CheckPoint Flush dirty pages to Disk Flush only Data pages to disk Lazy Writer Flush dirty pages to disk Check for available memory and removed Buffer pool (execution plan/compile plan/ Data pages /Memory objects) Occurs depending upon memory pressure and resource availability It is lazy, Sql server manages by its own. Monitor the memory pressure and try maintain the available free memory. No role in recovery

3 4 5 6

Default, Occurs approximately every 1 minute Can be managed with sp_confige -recovery interval option Does not check the memory pressure Crash recovery process will be fast to read log as data file is updated. Occurs for any DDL statement Occurs before Backup/Detach command Depends upon the configuration setting, we can control. For simple recovery it flush the tlog file after 70% full. Can manually /Forcefully run command Checkpoint Very Less performance impact

7 8 9

Occurs per requirement Occurs per requirement Works on Least recent used pages and removed unused plans first, no user control. No effect on recovery model. No command for Lazy Writer No performance impact

10 11 12

2.Difference between Mirroring and Log Shipping

S.No 1 2 3

Mirroring Principle can have single mirror Generally good to have 10 DBs for one server No data loss and can be used as

Log Shipping Multiple stand by servers can be possible. No limit May be some data loss as per schedule.

high availability like Clustering 4 Read log read and transfer the committed transaction through endpoints. Only committed transaction PAGE repair is possible if principle database page gets corrupt

And secondary server takes some manual work and time to be primary Transfer the log back up and restored at standby server. Committed as well as uncommitted and whole log backup restores. N/A

5 6

7 8 9 10

Mirrored DB can only be accessed Secondary server can be reporting using snapshot DB server (read-only) Principle and Mirror server should Primary and secondary server should have same edition be compatible server for restore. Require FULL recovery model Requires Sql Server 2005 SP1 or higher Enterprise or Developer Editions Immediate data moved depending on SEND and WAIT queue As Immediate data moves, user error reflects at mirrored DB Require FULL or Bulk-Logged recovery model Enterprise edition for Sql Server 2000 and even Standard edition for 2005 can works Can control the flow of data by scheduling jobs As delay in data transfer can avoided user error.

11 12

3.Difference between Change Track and Change Data Capture CDC in SQL Server 2008

S.No 1

Change Track It is about fact: It captures only the fact as the tracking table has changed. It does NOT capture the data. Therefore, change tracking is more limited in the historical questions it can answer compared to change data capture. However, for those applications that do not require the historical information, there is far less storage overhead because of the changed data not being captured

Change Data Capture It is about the Data: Change data capture provides historical change information for a user table by capturing both the fact that DML changes were made and the actual data that was changed.

Storage: Internal tables are placed on the same filegroup as the parent entity. You could use the sys.internal_tables catalog view to show all the internal tables and parent entities. For example: select name, object_name(parent_id) as parent_object from sys.internal_tables

Storage: When change data capture is enabled for a database, a few things are added to the database, including a new schema (called cdc), some metadata tables, and a trigger to capture Data Definition Language (DDL) events. The two function names are, respectively, fn_cdc_get_all_changes_ and fn_cdc_get_net_changes_, with the capture instance name appended. Note that (like the change tracking feature) this functionality requires the table to have a primary key or other unique index. Prevents Log truncation. Forces full logging of some bulk operations. One major point to note here is that once change data capture is enabled, the transaction log behaves just as it does with transactional replication the log cannot be truncated until the log reader has processed it. This means a checkpoint operation, even in SIMPLE recovery mode, will not truncate the log unless it has already been processed by the log reader. Change Data Capture (CDC) uses the asynchronous process that reads the transaction log.

Supported on Simple recovery model also. It is recommended that you use snapshot isolation when change tracking is enabled. Snapshot isolation itself can add significant workload overhead and requires much more careful management of tempdb.

It uses synchronous tracking mechanism. once a database is enabled for change tracking, a version number is instituted, which allows ordering of operations Change Tracking has minimal impact on the system. It uses TempDB heavily DDL Restriction: There are restrictions on the DDL that can be performed on a table being tracked. The most notable restriction is that the primary key cannot be altered in any way. The

It has almost nil impact as it asynchronous mechanism reads from the transaction log. It uses transaction log. No such DDL restriction

6 7

other restriction worth calling out here is that an ALTER TABLE SWITCH will fail if either table involved has change tracking enabled. 8 SQL Agent not needed t requires SQL Agent to be running. SQL Agent Job & Transaction Replication: Two SQL Agent jobs may be created: the capture job and the cleanup job. I say "may be created" because the capture job is the same as the one used for harvesting transactions in transactional replication. If transactional replication is already configured, then only the cleanup job will be created and the existing log reader job will also be used as the capture job Permission required to enable: DBOwner

Permission required to enable: SYSADMIN

4.Difference between Index Rebuild and Index Reorganize in SQL Server 2005 S.No 1 Index Rebuild Index Rebuild drops the existing Index and Recreates the index from scratch. Rebuild the Index when an index is over 30% fragmented. Rebuilding takes more server resources and uses locks unless you use the ONLINE option available in 2005 Enterprise and Development editions. T-SQL for Rebuilding all Indexes of a particular table. USE AdventureWorks; GO ALTER INDEX ALL ON HumanResources.Employee REBUILD GO Index Reorganize Index Reorganize physically reorganizes the leaf nodes of the index. Reorganize the Index when an index is between 10% and 30% fragmented. Always prefer to do Reorganize the Index.

2 3

T-SQL for Reorganize all Indexes of a particular table. USE AdventureWorks; GO ALTER INDEX ALL ON HumanResources.Employee REORGANIZE GO

Note: If fragmentation is below 10%, no action required. 5.Difference between User -defined SP and System-defined SP

S.No 1

User-defined SP Once we create User defined SP in one database i.e available to only that database directly.i.e we cannot call it from some other DBs directly UDSP will be used to fulfill the user requirements

System-defined SP System defined sp are available in master DB.These sps can be directly called from any DB

SDSP will be used for managing sql server

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1.Difference between Constraints and Triggers S.No 1 Constraints Triggers

Once we define some constraint in It will be stored as separate object a table they will be stored along with table definition Constraints will do memory location to table comparison. In the order of precedence first Constraints will be fired Performance wise Constraints will not give best performance because memeory location to table comparison is slower than table to table comparison. Constraints cannot start a chain reaction as like triggers - for instance each delete, update action etc. can trigger off another function Triggers will do table to table comparison.For this triggers will use magic tables(inserted,deleted). In the order of precedence only after Constraints is fired,then only Triggers will be fired Performance wise triggers will give best performance because table to table comparison is faster than memeory location to table comparison. Triggers are used to carry out tasks which cant be done using constraints. For eg:-A change in the "sal" column of a table should change the "tax" column in another table.This cant be done using constraints.It has to be done using triggers.Thats where the importance of triggers lie. Trigger is used for table Trigger is a user defined business rule for which user is responasible for logic for business rule

6 7

Constraint is used for column Constraints are predefined business rules in which all the organisations follow this constraints without any modification. Constraints are used to maintain the integrity and atomicity of database .In other words it can be said they are used to prevent invalid data entry . the main 5 constraints are NOT NULL,PRIMARY KEY,FOREIGN KEY,UNIQUE KEY and CHECK

Triggers are bascically stored procedures which automaticallly fired when any insert,update or delete is issued on table

2.Difference between Cast and Convert in SQL Server

S.No 1 2

Cast Cast is ANSII Standard Cast cannot be used for Formatting Purposes. Cast cannot convert a datetime to specific format Usage of CAST: USE Sample GO SELECT SUBSTRING(Name, 1, 30) AS ProductName, ListPrice FROM Production.Product WHERE CAST(ListPrice AS int) LIKE '3%'; GO

Convert Convert is Specific to SQL SERVER Convert can be used for Formatting Purposes.For example Select convert (varchar, datetime, 101) Convert can be used to convert a datetime to specific format Usage of CONVERT: USE Sample GO SELECT SUBSTRING(Name, 1, 30) AS ProductName, ListPrice FROM Production.Product WHERE CAST(int, ListPrice) LIKE '3%'; GO

3 4

3.Difference between CUBE and ROLLUP

S.No 1

CUBE It is an additional switch to GROUP BY clause. It can be applied to all aggregation functions to return cross tabular result sets. Produces all possible combinations of subtotals specified in GROUP BY clause and a Grand Total.

ROLLUP It is an extension to GROUP BY clause. Its used to extract statistical and summarized information from result sets. It creates groupings and then applies aggregation functions on them. Produces only some possible subtotal combinations

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

1.Difference between VARCHAR and NVARCHAR in SQL Server S.No 1 Varchar[(n)] Basic Definition: Non-Unicode Variable Length character data type. Example: DECLARE @FirstName AS VARCHAR(50) = UMAR SELECT @FirstName NVarchar[(n)] Basic Definition: UNicode Variable Length character data type. It can store both nonUnicode and Unicode (i.e. Japanese, Korean etc) characters. Example: DECLARE @FirstName AS NVARCHAR(50)= UMAR SELECT @FirstName No. of Bytes required for each character: It takes 2 bytes per Unicode/NonUnicode character. Example: DECLARE @FirstName AS NVARCHAR(50)= UMAR SELECT @FirstName AS FirstName,DATALENGTH(@FirstNa me) AS Length Result: FirstName Length UMAR 8 Optional Parameter n range:

No. of Bytes required for each character: It takes 1 byte per character Example: DECLARE @FirstName AS VARCHAR(50) = UMAR SELECT @FirstName AS FirstName,DATALENGTH(@Firs tName) AS Length Result: FirstName Length UMAR 4

Optional Parameter n range:

Optional Parameter n value can be Optional Parameter n value can be from 1 to 8000.Can store from 1 to 4000.Can store maximum maximum 8000 Non-Unicode 4000 Unicode/Non-Unicode characters characters. 4 If Optional Parameter n is not specified in the variable declaration or column definition: If Optional parameter value is not specified in the variable declaration or column definition then it is considered as 1. Example: DECLARE @firstName VARCHAR =UMAR If Optional Parameter n is not specified in the variable declaration or column definition: If Optional parameter value n is not specified in the variable declaration or column definition then it is considered as 2 Example: DECLARE @firstName NVARCHAR =UMAR SELECT @firstName

SELECT @firstName FirstName,DATALENGTH(@firs tName) Length Result: FirstName Length U1 5 If Optional Parameter n is not specified in while using CAST/CONVERT functions: When this optional parameter n is not specified while using the CAST/CONVERT functions, then it is considered as 30. Example: DECLARE @firstName VARCHAR(35) =UMAR ASIA INDIA TAMIL NADU CUDDALORE SELECT CAST(@firstName AS VARCHAR) FirstName,DATALENGTH(CAS T(@firstName AS VARCHAR)) Length Result: FirstName Length UMAR ASIA INDIA TAMIL NADU CUD 30 7 Which one to use? If we know that data to be stored in the column or variable doesnt have any Unicode characters. 8 Storage Size: Takes no. of bytes equal to the no. of Characters entered plus two bytes extra for defining offset.

FirstName,DATALENGTH(@firstNa me) Length Result: FirstName Length U2 If Optional Parameter n is not specified in while using CAST/CONVERT functions: When this optional parameter n is not specified while using the CAST CONVERT functions, then it is considered as 30. Example: DECLARE @firstName NVARCHAR(35) =UMAR ASIA INDIA TAMIL NADU CUDDALORE SELECT CAST(@firstName AS NVARCHAR) FirstName,DATALENGTH(CAST(@f irstName AS NVARCHAR)) Length Result: FirstName Length UMAR ASIA INDIA TAMIL NADU CUD 60

Which one to use? If we know that data to be stored in the column or variable can have Unicode characters. Storage Size: Takes no. of bytes equal to twice the no. of Characters entered plus two bytes extra for defining offset.

2.Difference between SQL Server and MySQL

S.No 1

SQL Server Current Date and Time: SELECT GETDATE()

MySQL Current Date and Time: SELECT NOW() Optionally: Use CURDATE() for the date only.

Limiting Results: SELECT TOP 10 * FROM table WHERE id = 1

Limiting Results: SELECT * FROM table WHERE id = 1 LIMIT 10 Date Field Default Value: DATETIME fields cannot have a default value, i.e. "GETDATE()" We must use your INSERT statement to specify CURDATE() for the field. Optionally: Use datatype TIMESTAMP DEFAULT CURRENT_TIMESTAMP

Date Field Default Value: DATETIME DEFAULT GETDATE()

Character Length: LEN()

Character Length: CHARACTER_LENGTH() Aliases: CHAR_LENGTH(), LENGTH() Character Replace: REPLACE() works case sensitively Trim Functions: TRIM() String Concatenation: CONCAT(string, string), which accepts two or more arguments. (Automatically casts values into types which can be concatenated) Auto Increment Field Definition:

Character Replace: REPLACE() works case insensitively

Trim Functions: LTRIM() and RTRIM()

String Concatenation: CONCATENATION USING + (Does not automatically cast operands to compatible types)

Auto Increment Field Definition:

tablename_id INT IDENTITY PRIMARY KEY 9 Get a List of Tables: SP_TABLES 10 Get Table Properties: HELP tablename 11 Get Database Version: SELECT @@VERSION 12 Recordset Paging: Recordset paging done by client side-ADO (very involved)

tablename_id INTEGER AUTO_INCREMENT PRIMARY KEY Get a List of Tables: SHOW TABLES Get Table Properties: DESCRIBE tablename Get Database Version: SELECT VERSION() Recordset Paging: Add to end of SQL: "LIMIT " & ((intCurrentPage-1)*intRecsPerPage) & ", " & intRecsPerPage LIMIT: The first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1). Get ID of Newest Inserted Record: Two step process: 1. Execute your statement: objConn.Execute("INSERT INTO...") 2. Set objRS = objConn.Execute("SELECT LAST_INSERT_ID() AS ID") Get a Random Record: SELECT * FROM Users ORDER BY RAND() LIMIT 1 Generate a Unique GUID: SELECT UUID()

13

Get ID of Newest Inserted Record: SET NOCOUNT ON; INSERT INTO...; SELECT id=@@IDENTITY; SET NOCOUNT OFF;

14

Get a Random Record: SELECT TOP 1 * FROM Users ORDER BY NEWID()

15

Generate a Unique GUID: SELECT NEWID()

3.Difference between SET QUOTED_IDENTIFIER ON and SET QUOTED_IDENTIFIER OFF in SQL Server

S.No

SET QUOTED_IDENTIFIER ON Characters Enclosed within double quotes: is treated as Identifier

SET QUOTED_IDENTIFIER OFF

Characters Enclosed within double quotes: is treated as Literal Try using Characters Enclosed within double quotes as identifier: Fails Example: Below statement to create a table with table name Table Fails. SET QUOTED_IDENTIFIER OFF GO CREATE TABLE dbo.Table (id int,Function VARCHAR(20)) GO Error Message: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near Table. Try using Characters Enclosed within double quotes as Literal: Works Example: Below Statement Works. SET QUOTED_IDENTIFIER OFF GO SELECT UMAR

Try using Characters Enclosed within double quotes as identifier: Works Example: Below statement to create a table with table name Table succeeds. SET QUOTED_IDENTIFIER ON GO CREATE TABLE dbo.Table (id int,Function VARCHAR(20)) GO

Try using Characters Enclosed within double quotes as Literal: Fails Example: Below statement fails. SET QUOTED_IDENTIFIER ON GO SELECT BIRADAR Error Message: Msg 207, Level 16, State 1, Line 1 Invalid column name UMAR.

Characters Enclosed within single quotes: is treated as Literal Example: SET QUOTED_IDENTIFIER ON GO SELECT UMAR

Characters Enclosed within single quotes: is treated as Literal Example: SET QUOTED_IDENTIFIER ON GO SELECT UMAR How to find all the objects which are created with SET

How to find all the objects which are created with SET

QUTOED_IDENTIFIER ON/OFF: Below Statement can be used to find all the objects created with SET QUTOED_IDENTIFIER setting as ON: SELECT OBJECT_NAME (object_id) FROM sys.sql_modules WHERE uses_quoted_identifier = 1

QUTOED_IDENTIFIER ON/OFF: Below Statement can be used to find all the objects created with SET QUTOED_IDENTIFIER setting as OFF: SELECT OBJECT_NAME (object_id) FROM sys.sql_modules WHERE uses_quoted_identifier = 0

4.Difference between DateTime and DateTime2 DataType

S.No 1 2

DateTime Min Value: 1753-01-01 00:00:00 Max Value: 9999-12-31 23:59:59.997

DateTime2[(n)] Min Value: 0001-01-01 00:00:00 Max Value: 9999-12-31 23:59:59.9999999 Storage Size: 6 to 8 bytes Note: Parameter n is optional and if it is not specified then fractional seconds precision is 7 digit and it can be from 0 to 7 digit. For fractional seconds precision <3, takes 6 bytes For fractional seconds precision 3 or 4 it will take 7 bytes For fractional seconds precision >4 it will take 8 bytes

Storage Size: 8 Bytes

Usage: Declare @now datetime

Usage: Declare @now datetime2(7) Current Date and Time function: SYSDATETIME()- It returns DB Current Date and Time of DateTime2 Data Type Example: SELECT SYSDATETIME() Result: 2011-09-16 13:23:18.7676720

Current Date and Time function: GetDate() It returns DB Current Date and Time of DateTime Data Type Example: SELECT GETDATE()

Result: 2011-09-16 13:23:18.767 6 +/- days: WORKS Example: DECLARE @nowDateTime DATETIME = GETDATE() SELECT @nowDateTime + 1 Result: 2011-09-17 13:44:31.247 +/- days: FAILS Need to use only DateAdd function Example: DECLARE @nowDateTime2 DATETIME2= SYSDATETIME() SELECT @nowDateTime2+1 Result: Msg 206, Level 16, State 2, Line 2 Operand type clash: datetime2 is incompatible with int Compliance: Is an ANSI/ISO compliant

Compliance: Is not an ANSI/ISO compliant

Please visit my blog @ http://onlydifferencefaqs.blogspot.in/

Difference between basicHttpBinding and wsHttpBinding Criteria BasicHttpBinding WsHttpBinding This exposes web services using WS-* specifications. As its built using WS-* specifications, it does not support wider ranges of client and it cannot be consumed by older .NET version less than 3 version.

Security This supports the old ASMX style, i.e. WS-BasicProfile 1.1. support Compatibility This is aimed for clients who do not have .NET 3.0 installed and it supports wider ranges of clients. Many of the clients like Windows 2000 still do not run .NET 3.0. So older version of .NET can consume this service. Soap version SOAP 1.1 Reliable messaging Not supported. In other words, if a client fires two or three calls you really do not know if they will return back in the same order. By default, there is no security provided for messages when the client calls happen. In other words, data is sent as plain text. None Windows default authentication Basic Certificate

SOAP 1.2 and WS-Addressing specification. Supported as it supports WS-* specifications.

Default security options Security options

As WsHttBinding supports WS-*, it has WS-Security enabled by default. So the data is not sent in plain text. None Transport Message Transport with message credentials

Difference between Message and Transport level security in WCF Criteria Scenarios when we should be using one of them Transport Security When there are no intermediate systems in between this is the best methodology. Message Security

When there are intermediate systems like one more WCF service through which message is routed then message security is If its an intranet type of solution the way to go. this is most recommended methodology. Does not need any extra coding as protocol inherent security is used. Performance is better as we can use hardware accelerators to enhance performance. There is lot of interoperability support and communicating Provides end to end security as its not dependent on protocol. Any intermediate hop in network does not affect the application. Supports wide set of security options as it is not dependent on protocol. We can also implement custom security.

Advantages

clients do not need to understand WS security as its built in the protocol itself. Disadvantages As its a protocol implemented Needs application refactoring to security so it works only point to implement security. point. As every message is encrypted As security is dependent on and signed there are performance protocol it has limited security issues. support and is bounded to the protocol security limitations. Does not support interoperability with old ASMX webservices

Difference between Buffered transfer and Streamed transfer in WCF S.No 1 2 3 Buffered Transfer Target can process the message once it is completely received. Performance will be good when message size is small Native channel shape is IDuplexSessionChannel Streamed Transfer Target can start processing the data when it is partially received. Performance will be good when message size is larger(more than 64K) Native channels are IRequestChannel and IReplyChannel

Difference between WCF and Web Services S.No 1 Features Hosting WebService It can be hosted in IIS WCF t can be hosted in IIS, windows activation service, Self-hosting, Windows service [ServiceContract] attribute has to be added to the class [OperationContract] attribute represents the method exposed to client One-Way, RequestResponse, Duplex are different type of operations supported in WCF System.Runtime.Seriali zation namespace is used for serialization XML 1.0, MTOM, Binary, Custom

2 3

Programming Model

[WebService] attribute has to be added to the class [WebMethod] attribute represents the method exposed to client One-way, RequestResponse are the different operations supported in web service System.Xml.serialization name space is used for serialization XML 1.0, MTOM(Message Transmission Optimization Mechanism), DIME, Custom

Operation

5 6

XML Encoding

Transports

Can be accessed through HTTP, TCP, Custom Security Web Services are stateless

8 9

Protocols State Management

Can be accessed through HTTP, TCP, Named pipes, MSMQ,P2P, Custom Security, Reliable messaging, Transactions WCF Services can manage states

Difference between Self Hosting and IIS Hosting Feature Coding Effort Deployment Recycling Service Lifetime Host Process Self Hosting IIS Hosting extra code

We need to add some extra code No need to add to host the process Automatic hosting Easy to deploy

More difficult to deploy than SelfHosting process recycling be is

Automatic process recycling is Automatic not possible possible

Can control the service lifetime Lifetime cannot using Open and Close methods manually.

controlled

Host process should be running IIS host runs automatically when a before client makes a call to the client makes a call to the service. service.

Difference between Behaviour and Contract (OR) Difference between Service Behaviour and Service Contract

Feature Behaviour Applicability Impact on WSDL

ServiceContract

ServiceBehavior

Affects the behavior of both Only affects the behavior of the client and server server Can apply to both interface and Only applicable class implementation Affects the WSDL emitted to a class

Does not affect the WSDL

Difference between proxy and channel factory Proxy Only requires URL where the service resides Very simpler Easy to understand There is Visual Studio gives us add the reference Channel Factory We must have direct access to the assembly that contains that service contract T for Not easier Channels are complex, network-related When we share a common service contract dll between the client and the server, we will be using the ChannelFactory class If we know that our entities will not change much and the client code is less, then a DLL would work better than a proxy

Proxies have several restrictions like: 1. Properties need to have gets and sets 2. Contructors cannot be exposed 3. Methods other than the service contract cannot be exposed By using SVCutil.exe we will create Proxy

When we are using DLL that refers Service contract interface then use the channel factory class

Difference between DataContractSerializer and XMLSerializer DataContractSerializer A practical benefit of the design of the DataContractSerializer is better performance over Xmlserializer. This is because DataContratSerializer explicitly shows the which fields or properties are serialized into XML. XMLSerializer XMLSerializer does not provide better performance when compare with DataContratSerializer because XMLSerializer does not indicate which fields or properties of the type are serialized into XML

The DataContractSerializer can translate the XMLSerializer cannot translate the HashTable into HashTable into XML. XML. DataContractSerializer is basically for very XMLSerializer is used for complex schemas. small, simple subset of the XML infoset. DataContractSerializer members. serializes private XmlSerializer cannot serialize private members

DataContractSerializer uses the opts-in XmlSerializer uses opts-out approach i.e., marking approach i.e, selecting the members that the members do not need to be serialized. This is needs to be serialized .This is called as opts- called as opts-out approach. in approach. DataContractSerializer can serialize both XmlSerializer can serialize only public types. If private and public types. we are trying to serialize a class that is marked private by InvalidOperation Exception will be thrown by the serializer. DataContractSerializer does not need any For any types that needs to be serialized by default constructor before serializing any XmlSerializer must have a default constructor. type.

DataContractSerializer does not give more XmlSerializer gives more control over the control over the generated xml structure generated xml structure compared to the compared to the XmlSerializer. DataContractSerializer. For ex, if a field should come as an attribute or element. DataContractSerializer can able to serialize XmlSerializer cannot able to serialize types that types that implements Idictionary. implements IDictionary, for ex. Dictionary type cannot be serialized. We can serialize a type that marked with [Serializable] attribute with DataContractSerializer. It serializes all the members (private, public) even they are marked with [XmlIgnore]. WCF uses DataContractSerializer attribute Only the public members are serialized not the private members. Suppose we do not need any of the member to be serialized we can use [XmlIgnore] attribute Webservice uses XMLSerializer attribute

1.Difference between ASP.NET and Silverlight S.No 1 ASP.NET ASP.NET is Microsoft's technology for developing dynamic web application using .NET languages like VB.NET or C#. The code is executed on the web server and the results are sent to the users browser. This is comparable to the way a web site would be done with the PHP language. ASP.NET uses AJAX to improve performance in the browser by making post backs and calls between the browser and server asynchronously. ASP.NET AJAX uses new built-in types and controls and JavaScript. Asp.net is not platform independent. Silverlight Silverlight is Microsoft technology for developing Rich Internet Applications. It is a browser plug-in that allows code from .NET languages to be run in the users browsers making it easier to develop graphically rich applications without having to constantly go back and forth between the browser and the server. This is comparable to Adobe's Flash technology. Unlike ASP.NET, the bulk of Silverlight processing occurs on the client machine thus decreasing server resource utilization and improving the Web experience on the client. There is no concept of Post back in Silverlight. Silverlight is delivered as a crossplatform and cross-browser plug-in that exposes a programming framework and features that are a subset of the .NET Framework and Windows Presentation Foundation (WPF). Silverlight is a client-side framework geared at providing a rich user experience and/or other capabilities such as video streaming. In Silverlight most processing happens from the client side. Silverlight is a free plug-in that encompasses a subset of functionality from the .NET Framework and WPF.Silverlight runs in the browser as a "sandbox" - a secure zone installed into the browser that accommodates Silverlight functionality while completely protecting the host platform from any possibly adverse actions performed by Silverlight Silverlight can be hosted in IIS & Apache.

ASP.NET is a server framework for building dynamic web applications. In Asp.net most processing happens from the server side. Both ASP.NET and ASP.NET AJAX are heavily dependent upon the ASP.NET page event life cycle, are tightly coupled to the server.

Asp.net can be hosted in IIS.

ASP.NET is Microsoft's competitor to JSP/JSF and the successor to classic ASP

Silverlight is Microsoft's competitor to Adobe Flash and Flex. Basically, a standalone runtime running inside a browser allowing animation, real-time 2D and vector rendering, etc

2.Difference between WPF and Silverlight

S.No 1 2

WPF WPF is mainly used for creating desktop applications. WPF extends support for advanced features of Windows OS. Few among those features are: 3D, complete documentation support and hardware acceleration.

Silverlight Silverlight is prominent for creating web based applications. The advanced features of Windows OS namely 3D, complete documentation support and hardware acceleration are not supported in Silverlight.

WPF includes extensive collection Silverlight does not support many data of data binding properties. binding properties that are supported by WPF. Few properties that are not supported by Silverlight are ElementName, RelativeSource, UpdateSourceTrigger In WPF, the custom markup extensions are supported through the markup extension support x:type. In WPF, the items that are added to the control named TabControl will be wrapped automatically within the TabItem. WPF provides routed commands and all its controls are linked to commands using the property called Command. The x:type is not available in Silverlight.

In Silverlight, the items that are added to the control named TabControl will not be wrapped automatically within the TabItem. Silverlight does not provide routed commands or Command property. Silverlight provides only an interface called ICommand. The developers have to create classes that implement this interface and the custom behavior has to be defined within the class. Silverlight does not offer input binding support.

WPF offers input binding support.

3.Difference between HTML 5 and Silverlight

S.No 1

HTML 5 HTML5 needs to integrate CSS3 and JavaScript to add its effects to web pages.

Silverlight On the other hand, Silverlight can be programmed without getting error prone due to usage of a statically typed .Net language. It is easier to program in Silver light. Silverlight has a disadvantage in that it consumes a lot of hardware resources of our device

While HTML5 is more resource friendly. This is the primary reason which Apple has given for not including support for technologies other than HTML5. When HTML5 will be fully standardized it is likely to get better support from all the newer versions of different browsers. HTML5 uses multiple codecs to run videos on the browsers that are not considered in the Apples bloc. HTML5 video quality is not that crisp as other competitors and its lack of ability to provide video content of various quality levels on various bandwidths to the user is also a hindrance in getting the message across to low data rate users. HTML5 pages, when designed, should be compatible with all the browsers.

On the other hand, newer browsers would have to be compatible with older versions of Silverlight in order to get the proper functioning. Silver light always needs a plug-in for any case and would not even run on iPhone and iPad. Silverlight offers good video quality and also provide video content of various quality levels on various bandwidths to the user.

Silver light works just like a plug-in. We can simply add the functionality to for any browser.

While HTML5 being more tilted Silverlight application is not easy to towards open source is a relatively decode easy target of stealing code. The divisions of JavaScript and HTML are clearly marked so it is easy to view and understand the code. At present HTML5 doesnt provide direct support for these devices. However there are some difficult ways to get around this in HTML5. Silverlight supports microphone and web cam and thus renders a number of rich interactive applications.

HTML5, like its predecessors facilitates search engines to crawl through its content and get maximum exposure for the website.Therefore,HTML5 is suitable for online business websites or those sites which require traffic through search engines.

Silverlight is not popular in the SEO community. At present the content of Silverlight is not indexed by search engines.Therefore,Silverlight is not suitable for online business websites or those sites which require traffic through search engines.

4.Difference between Flash and Silverlight

S.No 1

Flash The animation model is frame based.

Silverlight Animation - Silverlight supports the WPF animation model, which is not only time based instead of frame based, but lets you define the start and end conditions and it will figure out how to get there for you. No need to deal with matrixes like in flash. Also no need to calculate positions on various frames. It just works. Silverlight uses XAML. XAML is text based and can be output using a simple XML object.

Flash stores its shapes using binary shape records.In order to write shape definitions, you will need to either license a 3rd party Flash file format SDK, or build your own. It is not too difficult, but it does require a bit of a learning curve. The debugging with flash is harder than Silverlight. Dealing with fonts is fairly complex with flash.

3 4

The debugging with Silverlight is simpler than with flash. Silverlight lets you embed true type font information directly into your projects, and download that information with the downloader object. Rich set of development languages are available for Silverlight. Developer can use JavaScript as well as managed code VB.Net, C# for Silverlight development XAML is declarative while ActionScript is imperative.

Only Action Script can be used as programming tool in Flash.

ActionScript is an imperative language, which brings itself the

pitfalls of imperative languages when compared with declarative languages.

Using imperative languages to build UIs goes back to the early days of DOS and Windows, when developers had to manage all of the API nuances when interacting with graphical panes. Web Services support for Silverlight Streaming Additional Support for mobile devices with desktop and desktop browsers:Silverlight is supported by Windows mobile device as part of a new service that the NBL have built. Silverlight applications and media streaming can be run on a mobile phone so Silverlight even at this stage is about more than just the desktop browser and desktop market. Silverlight may be seen soon on the Symbian OS too. Silverlight does not require video codec to run industry standard videos like .WMV Silverlight supports scalable video formats from HD to mobile. Silverlight supports Hardware-assisted editing and encoding solutions. Silverlight has XAML based presentation layer for SEO.

7 8

There is not any such service provided by Flash Flash is not spread as across the vast majority of both desktops and mobiles platforms, as compared to Silverlight. Flash requires Flash Lite preinstalled on mobile devices.

Flash requires video codec to run .WMV videos. Flash does not support scalable video formats from HD to mobile Flash does not support Hardwareassisted editing and encoding solutions. Flash does not have XAML based presentation layer for SEO.

10 11

12 13 14 15 16

Flash does not provide End-to-end Silverlight provides End-to-end server server and application platform. and application platform. Media server licensing is costlier than Silverlight. Flash does not support Scalable full screen video. This limitation doesnt exist with Flash. Media server licensing is cheaper than flash. Silverlight supports Scalable full screen video. Silverlight is missing Linux support, so people using Linux machine cannot run it on their machines and will have to stick to Windows and MAC OS Silverlight will add to the use of the WMV file format.Using the WMV video format essentially makes

17

Flash Video turned Flash into a mechanism for delivering media with far more potential than any

other solution that is .flv, no doubt Flash has also limitation to play other video file. For that Flash required codex for that player installed on Client machine. 18 Even flash is also lacking this area. Flash can read data source in terms of XML or text from some URL and can use it. Same thing silverlight also can read. Flash has rich set of control library.

Silverlight useless for the vast majority of video websites such as YouTube. It cannot play .avi and .mov file.

Silverlight has no support for binding to models,binding to data, or even connecting to network resources to obtain data. Silverlight doesn't even have support for things that should be considered a stock part of any library such as buttons, checkboxes, list boxes, list views, grids,etc. Probably in future release may Microsoft support it. Once the accessibility features are provided with Silverlight versions, any existing test tools that support driving UI through Accessibility will be fully enabled to automate Silverlight applications Cannot do sound processing. Socket programming is not possible. Per pixel bitmap editing, bitmap filters (convolution, color matrix, etc),bitmap effects (drop shadow, blur,glow) cannot be done. Webcam and Microphone support are not provided by Silverlight Built in file upload/download support is not available. Silverlight is new in market and required time to get acceptance in market.

19

20

Flash test tools are already in place.

21 22 23

With some media file sound processing can possible. Flash allows creating XML Socket object. Can do that.

24 25 26

Flash supports it. Inbuilt Upload/download support is there. Flash has a long history that spans more than ten years, and already got acceptance in market and being the most successful browser plug- in ,it is installed on over 90 percent of the worlds web browsers Size of flash component is smaller.

27

Size of Silverlight component is larger.

28

Flash ships in single component that is .swf.Images/video/sounds also incorporated in single .swf package.

It has found in practical implementation of image animation, at some extent flickering occurs on image.

Você também pode gostar