Tuesday, 27 May 2014
Trigger
1)When you create a trigger you have to identify event and action of your trigger
2)A trigger is a pl/sql block structure which is fired when a DML statements like Insert, Delete, Update is executed on a database table. .
3) A trigger is triggered automatically.
4)It does not pass parameters
Stored procedure
1)Explicitly executed by invoking call to SP
2)you can not join SP
3)We can call a stored procedure from front
4)Stored procedure can take the input parameters
Function
1)can be used with Select statement
2)Not returning output parameter but returns Table variables
3) Cannot have transaction within function
4)Cannot be used to change server configuration
Difference between Stored Procedure and Function
1) Procedure can return zero or n values whereas function can return one value which is mandatory (Read more Here).
2) Procedures can have input, output parameters for it whereas functions can have only input parameters.
3) Procedure allows select as well as DML(INSERT/UPDATE/DELETE) statements in it whereas function allows only select statement in it.
4) Functions can be called from procedure whereas procedures cannot be called from function.
5) Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.
6) We can go for transaction management in procedure whereas we can't go in function.
7) Procedures cannot be utilized in a select statement whereas function can be embedded in a select statement.
Array List
1.Array List is a List.
2.In Array list we can only add items to the list.
3.Here we Can Add any datatype value,Every item in Arraylist is treated as object.
4.Index Numeric.
5.Data in Arraylist is stored in as only the value.
6.Slow when come to search
Hash Table
1.Hash Table is a map.
2.In Hashtable we can add data with the key.
3.Retrieving by key in Hashtable is faster than retrieving in Arraylist.
4.Index can be string also.
5.Data in Hashtable is stored in the key-value pair.
6.Fast when searching.
So lets first start with the difference between 1.0 and 2.0.
Support for 64 bit application.
Generics
SQL cache dependency
Master pages
Membership and roles
Now the next difference .NET 2.0 and 3.0
=========================================
WCF
WPF
WWF
WCS ( card space)
3.0 and 3.5
==========================================
LINQ
Ajax inbuilt
ADO Entity framework
ADO data services
Multi targeting
Finally 3.5 and 4.0
===========================================
MEF
Parallel computing
DLR dynamic
Code contract
language runtime
Lazy initialization
Custom controls: A control authored by a user or a third-party software vendor that does not belong to the .NET Framework class library. This is a generic term that includes user controls. A custom server control is used in Web Forms (ASP.NET pages). A custom client control is used in Windows Forms applications.
User Controls: In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used as a server control. An ASP.NET user control is authored declaratively and persisted as a text file with an .ascx extension. The ASP.NET page framework compiles a user control on the fly to a class that derives from the System.Web.UI.UserControl class.
Difference between Sql server 2005 and 2008
Sr No SQL Server 2005 SQL Server 2008
1 XML datatype is introduced. XML datatype is used.
2 Can not encrypt the entire database. Can encrypt the entire database introduced in 2008.
3 Datetime is used for both date and time. Date and time are seperately used for date and time
4 No table datatype is included. Table datatype introduced.
5 SSIS is started using. SSIS avails in this version.
6 CMS is not available. Central Management Server(CMS) is Introduced.
7 PBM is not available Policy based management(PBM) server is Introduced
What is the difference between unique key and primary key?
Unique Key Primary Key
Unique key can have nulls Primary key cannot have nulls.
In a single table we can create multiple unique keys. In a single table we can have only one primary key.
It creates a non-clustered index by default. It created a clustered index by default.
Both unique keys and primary keys can be referenced by foreign key.
View State:
View state is maintained in page level only.
View state of one page is not visible in another page.
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 page-instance-specific data. (Read more)
Session State:
Session state is maintained in session level.
Session state value is available in all pages within a user session.
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 user-specific data on the server side. (Read more)
Usage
If you want to access the information on different web pages, you can use SessionState- If you want to access from the same page, then you can use Viewstate
Security
Session state provides more security when compared with view state as the data value is stored in server side
Convert .tostring() and variable.tostirng()
The basic difference between them is “Convert.ToString(variable)” handles NULL values even if variable value become null but “variable.ToString()” will not handle NULL values it will throw a NULL reference exception error. So as a good coding practice using “convert” is always safe.
Example
//Returns a null reference exception for str.
string str;
object i = null;
str = i.ToString();
//Returns an empty string for str and does not throw an exception. If you dont
string str;
object i = null;
str = Convert.ToString(i);
Difference between GET and POST Methods?
GET Method ():
1) Data is appended to the URL.
2) Data is not secret.
3) It is a single call system
4) Maximum data that can be sent is 256.
5) Data transmission is faster
6) this is the default method for many browsers
POST Method ():
1) Data is not appended to the URL.
2) Data is Secret
3) it is a two call system.
4) There is no Limit on the amount of data. That is characters any amount of data can be sent.
5) Data transmission is comparatively slow.
6) No default and should be explicitly specified.
Difference between authorization and authentication?
Authorization is a process of allowing or denying resources to particular user or record
Declaration of authorization is
Sometimes authorization allows the unauthorized persons at that time we will use
Authentication means
Authentication is a process where we identify the credentials of user i.e. username, password and create an identity to mention user as an authenticated.
Difference between view state and hidden field?
viewstate is secured hidden field is insecure
Viewstate will store large amount of data but hidden filed will store small amount of data.
Difference between Abstract Class and Interface
In abstract class method can have definition as well as declaration also. But Interface should have only definition.
All the Methods are Public as default and don’t have any access Modifier Controls in interface, whereas for abstract class we can have access modifier for methods.
Abstract class can have constructor or destructor, whereas interface not.
Abstract class can’t be part of multiple inheritance and we can implement multiple interface.
Differences between Array list and Hash table?
Hash table store data as name, value pair. While in array only value is store.
To access value from hash table, you need to pass name. While in array, to access value, you need to pass index number.
you can store different type of data in hash table, say int, string etc. while in array you can store only similar type of data.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment