Friday 23 November 2012

Difference between HTTP and HTTPS and Difference between GET and POST methods

1.Difference between HTTP and HTTPS



S.No HTTP HTTPS
1
URL begins with “http://" in case of HTTP
URL begins with “https://” in case of HTTPS.
2 HTTP is unsecured HTTPS is secured.
3 HTTP uses port 80 for communication HTTPS uses port 443 for communication.
4 HTTP operates at Application Layer HTTPS operates at Transport Layer.
5 No encryption is there in HTTP HTTPS uses encryption.
6 No certificates required in HTTP certificates required in HTTPS.
7 Most internet forums will probably fall into this category. Because these are open discussion forums, secured access is generally not required
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 GET POST
1 Post Mechanism:



GET request is sent via URL.
Post Mechanism:



Post request is sent via HTTP request body or we can say internally.
2 Form Default Method:


GET request is the default method.
Form Default Method:


We have to specify POST method within form tag like
3
Security:

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

Since Post request encapsulated name pair values in HTTP request body, so that we can submit sensitive data through POST method.
4
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.
5
Caching or Bookmarking:

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

POST request is not better for caching and bookmarking.
6
SEO:

GET request is SEO friendly.
SEO:

POST request is not SEO friendly.
7
Data Type:

GET request always submits data as TEXT.
Data Type:

POST request has no restriction.
8
Best Example:

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

LOGIN is the best example for POST request.
9
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]
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-www-form-urlencoded
5 Content-Length: 8
6
7 Code=132
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.


What is Inheritance in C#


Creating a new class from existing class is called as inheritance. 

    //All the car properties can be used by the supercar
    class SuperCar : car
    {


    }


When a new class needs same members as an existing class, then instead of creating those members again in new class, the new class can be created from existing class, which is called as inheritance.


Main advantage of inheritance is
reusability of the code.


During inheritance, the class that is inherited is called as base class and the class that does the inheritance is called as derived class and every non private member in base class will become the member of derived class.

If you want the base class members to be accessed by derived class only , you can apply 
access modifier Protected to the base class member.

There are 5
Different types of inheritance.


Syntax

[Access Modifier] class ClassName : baseclassname

{
 


}

C# Inheritance Example


//Example program demonstrates singular inheritance
using System;

namespace ProgramCall
{
    class BaseClass
    {


        //Method to find sum of give  2 numbers
        public int FindSum(int x, int y)
        {
            return (x + y);
        }


        //method to print given 2 numbers
        //When declared protected , can be accessed only from inside the derived class
        //cannot access  with the instance of  derived class
        protected void Print(int x, int y)
        {
            Console.WriteLine("First Number: " + x);
            Console.WriteLine("Second Number: " + y);

        }
    }


    class Derivedclass : BaseClass
    {

        public void Print3numbers(int x, int y, int z)
        {
            Print(x, y); //We can directly call baseclass members
            Console.WriteLine("Third Number: " + z);
        }

    }


    class MainClass
    {

        static void Main(string[] args)
        {
            //Create instance for derived class, so that base class members
            // can also  be accessed
            //This is possible because  derivedclass is inheriting base class

            Derivedclass instance = new Derivedclass();

            instance.Print3numbers(30, 40, 50); //Derived class internally calls base class method.
            int sum = instance.FindSum(30, 40); //calling base class method with derived class instance
            Console.WriteLine("Sum : " + sum);


            Console.Read();
        }

    }
}

Output

First Number: 30
Second Number: 40
Third Number: 50
Sum : 70 


Different Types of Inheritance



Creating a new class from existing class is called as inheritance.

What is Inheritance in C#

Inheritance can be classified to 5 types.

  1. Single Inheritance
  2. Hierarchical Inheritance
  3. Multi Level Inheritance
  4. Hybrid Inheritance
  5. Multiple Inheritance
1. Single Inheritance

when a single derived class is created from a single base class then the inheritance is called as single inheritance.


Different types of inheritance

Single Inheritance Example Program

2. Hierarchical Inheritance

when more than one derived class are created from a single base class, then that inheritance is called as hierarchical inheritance.

Hierarical Inheritance


3. Multi Level Inheritance

when a derived class is created from another derived class, then that inheritance is called as multi level inheritance.

Multi level Inheritance


4. Hybrid Inheritance

Any combination of single, hierarchical and multi level inheritances is called as hybrid inheritance.


Hybrid inheritance in C#


5. Multiple Inheritance

when a derived class is created from more than one base class then that inheritance is called as multiple inheritance. But multiple inheritance is not supported by .net using classes and can be done using interfaces.

Multiple inheritance in C#

  Multiple Inheritance Example

Handling the complexity that causes due to multiple inheritance is very complex. Hence it was not supported in dotnet with class and it can be done with interfaces.

Polymorphism



According to MSDN, Through inheritance, a class can be used as more than one type; it can be used as its own type, any base types, or any interface type if it implements interfaces. This is called polymorphism.

 
In C#, every type is polymorphic. Types can be used as their own type or as a Object instance, because any type automatically treats Object as a base type.


Polymorphism means having more than one form. Overloading and overriding are used to implement polymorphism. Polymorphism is classified into compile time polymorphism or early binding or static binding and Runtime polymorphism or late binding or dynamic binding.

Polymorphism Examples



Compile time Polymorphism or Early Binding

The polymorphism in which compiler identifies which polymorphic form it has to execute at compile time it self is called as compile time polymorphism or early binding.
 
Advantage of early binding is execution will be fast. Because every thing about the method is known to compiler during compilation it self and disadvantage is lack of flexibility.

Examples of early binding are overloaded methods, overloaded operators and overridden methods that are called directly by using derived objects.

Runtime Polymorphism or Late Binding

The polymorphism in which compiler identifies which polymorphic form to execute at runtime but not at compile time is called as runtime polymorphism or late binding.
 
Advantage of late binding is flexibility and disadvantage is execution will be slow as compiler has to get the information about the method to execute at runtime.

Example of late binding is overridden methods that are called using base class object.

Components of .Net Framework



component.jpg
Common Language Runtime
CLR is the heart of .Net Framework.
CLR is one of the key components of .Net Framework. CLR is the core runtime engine in the Microsoft .NET Framework for executing all kinds of applications.

Execution environment for code written in .NET Framework.
The CLR is described as the "execution engine" of .NET. It is this CLR that manages the execution of programs. It provides the environment within which the programs run. The software version
of .NET is actually the CLR version.

The CLR works with every language available for the .NET Framework.
The CLR is a multi-language execution environment. There are currently over 15 compilers being built by Microsoft and other companies producing code that will execute in CLR.

But CLR is not a common compiler for all .NET compatible languages.
We all know that .Net framework supports 70+ languages. But, since CLR is mentioned as the “execution engine” of .Net framework, it is not a common compiler for all language that converts the source code of any language to Machine code or Managed code.

Note: All .Net compatible languages have their own compiler. (i.e.) all 70+ languages have their own compiler.

Common Type System
CTS describes a set of types (Data Types) that can be used in different .Net languages in common. (i.e), CTS ensures that objects written in different .Net languages can interact with each other.
For Communicating between programs written in any .NET complaint language, the types have to be compatible on the basic level.
The common type system supports two general categories of types:
Value types:
Value types directly contain their data, and instances of value types are either allocated on the stack or allocated inline in a structure. Value types can be built-in (implemented by the runtime), user-defined, or enumerations.
Reference types:
Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types. The class types are user-defined classes, boxed value types, and delegates.
Common Language Specification
Common Language Specification is a sub set of CTS.
CLS specifies a set of rules that needs to be adhered or satisfied by all language compilers targeting CLR.
CLS helps in cross language inheritance and cross language debugging.
Common language specification rules:
It describe the minimal and complete set of features to produce code that can be hosted by CLR 
It ensure that products of compilers will work properly in .NET environment 
Sample rules: 
Representation of text strings 
Internal representation of enumerations 
Definition of static members and this is a subset of the CTS which all .NET languages are expected to support.
Microsoft has defined CLS which are nothing but guidelines that language to follow so that it can communicate with other .NET languages in a seamless manner.

Base Class Library
Also called as Framework Class Library.
BCL are similar to header file in other programming languages.
BCL are set of predefined code available for all languages supporting .Net Framework
Developers just need to import the BCL in their language code and use its predefined methods and properties to implement common and complex functions like reading and writing to file, graphic rendering, database interaction, and XML document manipulation.  

Abstract classes




1. They are classes that cannot be instantiated.
2. Either partially implemented, or not at all implemented.
3. One key difference between abstract classes and interfaces is that a class may implement an unlimited number of interfaces,
but may inherit from only one abstract (or any other kind of) class.
4. A class that is derived from an abstract class may still implement interfaces
5. In C#, the abstract modifier is used
6. Any methods that are to be implemented are marked as abstract
7. eg:
abstract class WashingMachine
{
  public WashingMachine()
  {
 // Code to initialize the class goes here.
  }

  abstract public void Wash();
  abstract public void Rinse(int loadSize);
  abstract public long Spin(int speed);
}
8. A class inheriting from this class would have to implement the Wash, Rinse, and Spin methods
9. eg:

class MyWashingMachine : WashingMachine
{
  public MyWashingMachine()
  {
 // Initialization code goes here.  
  }

  override public void Wash()
  {
 // Wash code goes here.
  }

  override public void Rinse(int loadSize)
  {
 // Rinse code goes here.
  }

  override public long Spin(int speed)
  {
 // Spin code goes here.
  }
}
10. When implementing an abstract class, you must implement each abstract (MustOverride) method in that class
11. Each implemented method must receive the same number and type of arguments, and have the same return value, as the method specified in the abstract class.




What are Web Services?





Web services are small units of code designed to handle a limited set of tasks.
An example of a web service can be a small program designed to supply other applications with the latest stock exchange prices.
Another example can be a small program designed to handle credit card payment.

1. Web services use XML based communicating protocols

Web services use the standard web protocols HTTP, XML, SOAP, WSDL, and UDDI.

1. SOAP

SOAP is a protocol specification that defines a uniform way of passing XML-encoded data. In also defines a way to perform remote procedure calls (RPCs) using HTTP as the underlying communication protocol. SOAP (Simple Object Access Protocol) is a lightweight platform and language neutral communication protocol that allows programs to communicate via standard Internet HTTP. SOAP is standardized by the W3C.
2. WSDL

WSDL (Web Services Description Language) is an XML-based language used to define web services and to describe how to access them. WSDL is a suggestion by Ariba, IBM and Microsoft for describing services for the W3C XML Activity on XML Protocols.

Files with the WSDL extension contain web service interfaces expressed in the Web Service Description Language (WSDL). WSDL is a standard XML document type specified by the World Wide Web Consortium (W3C). WSDL files are used to communicate interface information between web service producers and consumers. A WSDL description allows a client to utilize a web service's capabilities without knowledge of the implementation details of the web service.

3. UDDI

UDDI provides a mechanism for clients to dynamically find other web services. UDDI (Universal Description, Discovery and Integration) is a directory service where businesses can register and search for web services. UDDI is a public registry, where one can publish and inquire about web services.

DISCO is a Microsoft technology for publishing and discovering Web Services. DISCO can define a document format along with an interrogation algorithm, making it possible to discover the Web Services exposed on a given server. DISCO makes it possible to discover the capabilities of each Web Service (via documentation) and how to interact with it. To publish a deployed Web Service using DISCO, you simply need to create a .disco file and place it in the vroot along with the other service-related configuration


2. Web services are independent of operating systems
3. Web services are independent of programming languages

Since web services use XML based protocols to communicate with other systems, web services are independent of both operating systems and programming languages.An application calling a web service will always send its requests using XML, and get its answer returned as XML. The calling application will never be concerned about the operating system or the programming language running on the other computer.

Benefits of Web Services

    1. Easier to communicate between applications
    2. Easier to reuse existing services
    3. Easier to distribute information to more consumers
    4. Rapid development

Contents of a WSDL File

A WSDL file contains all of the information necessary for a client to invoke the methods of a web service:

The data types used as method parameters or return values
The individual methods names and signatures (WSDL refers to methods as operations)
The protocols and message formats allowed for each method
The URLs used to access the web service

DISCO File in More Details

1. The .disco document is an XML document that simply contains links to other resources that describe the Web Service.
Eg:

<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
  <contractRef ref="http://localhost:2585/WebService1/Service.asmx?wsdl" docRef="http://localhost:2585/WebService1/Service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
 
    <!-- reference to other DISCO document -->
  <discoveryRef ref="related-services/default.disco"/>

  <soap address="http://localhost:2585/WebService1/Service.asmx" xmlns:q1="http://tempuri.org/" binding="q1:ServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <soap address="http://localhost:2585/WebService1/Service.asmx" xmlns:q2="http://tempuri.org/" binding="q2:ServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>

2. The main element is contractRef, which belongs to a different namespace than the rest of the DISCO-related elements. contractRef has two attributes, ref and docRef, which point to the WSDL and documentation files for a given Web Service.
<contractRef ref="http://.../Service.asmx?wsdl" docRef="http://.../Service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />

3. The discoveryRef element lets you link the given DISCO document to other DISCO documents.
  This linking allows you to create a Web of related DISCO documents spanning multiple machines and even multiple organizations.
  This is especially useful if the DISCO client utility provides a mechanism to traverse the links. These are the only elements that you have to be concerned about in the DISCO namespace.
 
<discoveryRef ref="related-services/default.disco"/>


Difference between Disco,UDDI,WSDL

1. Disco
The Web Service Discovery Tool (DISCO) is used to discover the URLs of XML Web Services located on a Web server and saves documents related to each XML service on a local disk. The DISCO takes the URL and discovers and produce publishes discovery documents (.wsdl, .xsd, .disco and .dicomap files) as arguments.

2. UDDI
Universal Description, Discovery and Integration (UDDI) is a platform independent framework functioning like a directory that provides a mechanism to locate and register web services on the internet.

3. WSDL
Web Service Discovery Language (WSDL) is a markup language that describes the web service.

1. What is SOAP?
SOAP is an XML-based protocol to let applications exchange information over HTTP.
Or more simple: SOAP is a protocol for accessing a Web Service.
• SOAP stands for Simple Object Access Protocol
• SOAP is a communication protocol
• SOAP is a format for sending messages
• SOAP is designed to communicate via Internet
• SOAP is platform independent
• SOAP is language independent
• SOAP is based on XML
• SOAP is simple and extensible
• SOAP allows you to get around firewalls
• SOAP is a W3C standard
2. What is WSDL?
WSDL is an XML-based language for locating and describing Web services.
• WSDL stands for Web Services Description Language
• WSDL is based on XML
• WSDL is used to describe Web services
• WSDL is used to locate Web services
• WSDL is a W3C standard
3. What is UDDI?
UDDI is a directory service where companies can register and search for Web services.
• UDDI stands for Universal Description, Discovery and Integration
• UDDI is a directory for storing information about web services
• UDDI is a directory of web service interfaces described by WSDL
• UDDI communicates via SOAP
• UDDI is built into the Microsoft .NET platform

 1. Caching WebServices

Often a WebService will return the same results over multiple calls, so it makes sense to cache the information to speed things up a little. Doing so in ASP.NET is as simple as adding a CacheDuration attribute to your WebMethod:

[WebMethod(CacheDuration = 30)]
public ClientData[] GetClientData(int Number)
{
}

You can also specify the CacheDuration using a constant member variable in your class:

private const int CacheTime = 30; // seconds

[WebMethod(CacheDuration = CacheTime)]
public ClientData[] GetClientData(int Number)
{
}
2. Adding Descriptions to your WebMethods

In the default list of WebMethods created when you browse to the .asmx file it's nice to have a description of each method posted. The Description attribute accomplishes this.

[WebMethod(CacheDuration = 30,
Description="Returns an array of Clients.")]
public ClientData[] GetClientData(int Number)
{
}

3. Deploying the WebService

1. We need to create a directory for our service (or use an existing directory) for our .asmx file
2. we need to have the service's assembly in the application's bin/ directory.
1. Either place the .asmx file in a subdirectory on your website and place the assembly in the /bin folder in your website's root.
2. OR place the /bin in the subdirectory containing the .asmx file and mark that directory as an application

If you choose to create a separate directory and mark it as an application then Within this directory you need to add the following files and directories:

1. MyService.asmx This file acts as the URL for your service
2. MyService.disco The discovery document for your service
3. web.config Configuration file for your service that overrides default web settings (optional).
4. /bin This directory holds the assembly for your service
5. /bin/MyService.dll The actual service asembly.














LEARN SESSION




1. Web is Stateless,HTTP is a stateless protocol
2. Session provides the facility to store information on server memory.
3. It can support any type of object to store along with our custom object.
4. For every client Session data store separately

Advantages and Disadvantages of Session

Advantages
1. It helps to maintain user states and data to all over the application
2. We can store any kind of object.
3. Stores every client data separately.
4. Session is secure and transparent from user.
Disadvantages
1. Performance overhead in case of large volume of user, because of session data stored in server memory
2. In case of StateServer and SQLServer session mode we need to serialize the object before store
(Overhead involved in serializing and De-Serializing session Data)

Storing and Retrieving values  from Session

1. We can interact with Session State with  System.Web.SessionState.HttpSessionState class
2. Session["UserName"] = txtUser.Text;
3. string str =  Session["UserName"];

Session ID

1. Asp.Net use 120 bit identifier to track each session
2. When client communicate with server, only  session id is transmitted, between them
3. When client hits web site and some information is stored in session.
1. Server creates a unique session ID for that clients and stored in Session State Provider .
2. Again client request For some information with that unique session ID from Server.
3. Server,looks on Session Providers, and retrieve the serialized data from state server and type cast the object

Session Mode

1. InProc (In-Memory Object)
2. StateServer (Aspnet_state.exe)
3. SQLServer (DataBase)
4. Custom (CustomProvider)
5. Off (session will be disabled)

1. InProc (In-Memory Object)
1. This is the default Session mode in asp.net
2. Its stores session Information in Current Application Domain
3. stores session data in a memory object on that application domain
4. This is handled by worker process in application pool
5. So If we restart the server we will lose the session data.
6. Session_Start() -> User Using Appln -> Session_End()
7. When Should we use InProc Session Mode ?
1. It can be very helpful for a small web sites and where the number of user are very less
2. We should avoid InProc in case of Web Garden
8. Advantages and Disadvantages

Advantages
1. It store Session data in memory object of current application domain.
2. So accessing data is very fast and data is easily available.
3. There is not requirements of serialization to store data in InProc Session Mode

DisAdvantages
1. If the worker Process or application domain recycles all session data will be lost.
2. Though its fastest, but more session data and more users can affects performance, because of memory.
3. we can't use it in web Garden scenarios
4. This session mode is not suitable for web farm scenarios also

2. StateServer (Aspnet_state.exe)
1. This is also called Out-Proc session mode
2. StateServer uses a stand-alone Windows Services, which is Independent to IIS and can also run on a separate server
3. This session state is totally managed by aspnet_state.exe
4. This server may runs on the same system, but it's out side of that main  application domain where your web application
  is running
5. This allow if you restart your asp.net process restarted your session data will be alive
6.Advantages and Disadvantages

Advantages
1. Its keeps the data separate from IIS so, any Issue with IIS does not hamper Session data
2. It is useful in web farm and web garden scenarios.
Disadvantages
1. Process is slow due to Serialization and De-Serialization
2. State Server always need to be up and running

3. SQLServer (DataBase)
1. The Session data is serialized and stored in the SQL Server database
2. SQL Server Session mode is more reliable and secure session state management.
3. Its keeps data in a centralized location (database).
4. We should use SQL server session mode when we need to implement Session with some more security.
5. If  there happens to be  frequent server Restart we can implement SQL server
6. This is perfect mode that fits in web farm and web garden scenarios
7. we can use SQL server Session mode when we need to share session between two different application
8. Advantages and Disadvantages

Advantages
1. Session data do not  affected if we restart the IIS.
2. It is the most reliable and secure session management.
3. It keeps data located centrally ,  It can be easily accessible from other application.
4. It is  very useful in web farm and web garden scenarios.
Disadvantages
1. Processing is very slow in nature.
2. Object serialization and de-serialization creates overhead  for application
3. As the session data is handled in different server, so we have to take care of SQL server. It should be always up   and running.

4. Custom (CustomProvider)
1. Custom session gives full control to us to create every thing even session ID
2. can implement custom providers that store session data in other storage mechanisms simply by deriving from
  SessionStateStoreProviderBase Class
3. can also Generate New Session Id by Implementing ISessionIDManager.
4. This are the following methods  are called  during  implementation of Custom Session
1. Initialize()(set the Custom Provider)
2. SetItemExpireCallBack()(to set SessionTimeOut)
3. InitializeRequest()(called on every request)
4. CreateNewStoreData()(to create a new instance of SessionStateStoreData)
5. Advantages and Disadvantages

Advantages
1. We can use some existing Table for the store session data, It is useful when we have to use some old database   rather than SQL Serve
2. It's not depending on IIS , So Restarting web server does not make any effects on session data.
3. We can crate our own algorithm for generating Session ID
Disadvantages
1. Processing of Data is very slow
2. Creating a custom state provider is a low-level task that needs to be handled carefully to ensure security

Session And Cookies

1. Clients use cookies to work with session.
2. because the client needs to present the appropriate session ID with each request
3. We can do it in 2 ways
1. Using Cookies
1. ASP.NET creates a special cookies named ASP.NET_SessionId automatically when the session collection is used
2. This is the default
3. Session ID is transmitted through that cookies
2. Cookie Munging
1. Some older browser doest not support cookies or user may disable cookies in there browser, in that case ASP.Net  
  transmitted session ID  in a specially modified (or munged) URL.
2. When user request for a page on a server, Server  encoded the session id and add it with every  href  link  in page.
  When user click any links ASP.NET decodes that session id and passes it to the page that user requesting. Now the   requesting page can retrieve any session variable. This all happens automatically, if ASP.NET detects that the users  browser does not support cookies.
3. To Implement Cookie Munging we have to make session state cookieless





















What is a Trigger?



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. A trigger is triggered automatically when an associated DML statement is executed.

Syntax of Triggers


The Syntax for creating a trigger is:
 CREATE [OR REPLACE ] TRIGGER trigger_name 
 {BEFORE | AFTER | INSTEAD OF } 
 {INSERT [OR] | UPDATE [OR] | DELETE} 
 [OF col_name] 
 ON table_name 
 [REFERENCING OLD AS o NEW AS n] 
 [FOR EACH ROW] 
 WHEN (condition)  
 BEGIN 
   --- sql statements  
 END; 
  • CREATE [OR REPLACE ] TRIGGER trigger_name - This clause creates a trigger with the given name or overwrites an existing trigger with the same name.
  • {BEFORE | AFTER | INSTEAD OF } - This clause indicates at what time should the trigger get fired. i.e for example: before or after updating a table. INSTEAD OF is used to create a trigger on a view. before and after cannot be used to create a trigger on a view.
  • {INSERT [OR] | UPDATE [OR] | DELETE} - This clause determines the triggering event. More than one triggering events can be used together separated by OR keyword. The trigger gets fired at all the specified triggering event.
  • [OF col_name] - This clause is used with update triggers. This clause is used when you want to trigger an event only when a specific column is updated.
  • CREATE [OR REPLACE ] TRIGGER trigger_name - This clause creates a trigger with the given name or overwrites an existing trigger with the same name.
  • [ON table_name] - This clause identifies the name of the table or view to which the trigger is associated.
  • [REFERENCING OLD AS o NEW AS n] - This clause is used to reference the old and new values of the data being changed. By default, you reference the values as :old.column_name or :new.column_name. The reference names can also be changed from old (or new) to any other user-defined name. You cannot reference old values when inserting a record, or new values when deleting a record, because they do not exist.
  • [FOR EACH ROW] - This clause is used to determine whether a trigger must fire when each row gets affected ( i.e. a Row Level Trigger) or just once when the entire sql statement is executed(i.e.statement level Trigger).
  • WHEN (condition) - This clause is valid only for row level triggers. The trigger is fired only for rows that satisfy the condition specified. 

IE7 Issues Text Indent

                 Unfortunately IE 7 is still widespread among the users hence while theming we have to give special importance to the grea...