Unit test is the process by which we can make sure our code is working as our expectation. Actually most of the time we write unit test against frond-end code(ui level, business, dataaccess) and we are not very familiour that in respect of database level.

In many scenarios we write triggers on database tables. Before writing a trigger we need to understand what trigger is and how exactly it works. Because, lack of clear knowledge on triggers can ake your life difficult. Trigger is actually a procedure that runs in response of an event fired due to performing some operations on database tables. The events could be insert, update or delete. Now, the question is how database handles the execution of a trigger when it fires?