Jump to content

Triggers & Store Procedures Testing


Recommended Posts

Posted

sarvanasam esukoni pothav ra...sarvanasam esukoni pothav ra...sarvanasam esukoni pothav ra...sarvanasam esukoni pothav ra...

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

  • king420

    19

  • ipaddress0

    12

  • loveindia

    7

  • VenkatD

    6

Top Posters In This Topic

Posted

endi bayya annitlo ide na?

 

oka useful thread ni kuda kampu chestunnav baa

Posted

sarvanasam esukoni pothav ra...

 

sarvansasanam koti rastunnava endi man.... GSB3.gif?1370457845

Posted

Stored Procedures and Triggers two different concepts man...

 

Triggers are like house alarms... In case anything happens, you want them to run... 

 

eg: A new customer comes to facebook, creates a profile and saves it.. After a minute he changes his email id.. So the same customer did an update.. you will have an update trigger on that table (which means when any sort of update happens, you capture it into an another table like an audit table). So then the update creates a new record in the audit table with new email id. so you will have a hold of all updates the customer made... Just imagine if someone modified the data and said I didn't do it... So for those cases, people go with triggers for heavily data oriented structures...

 

inka procedures..

 

procedures are nothing but, how you want to see a set of data... you define all your code inside and since it has coding logic or cannot be written in one single line and also has reusable logic, you will wrap it around a procedure and call that everytime instead of a huge code... Procedures may or may not accept parameters based on your requirements.

 

Eg : Imagine you want to see all your customers based on the country you provide. If you pass USA, you get usa customers, if you pass canada, you get canada customers... that means whatever country you are giving, you are fetching only list of customers from there.. so only your input value is changing and nothing else and it reusable across various countries. so you will wrap that code inside a procedure and give everyone that procedure name to use instead of the code.

 

 

in short...

 

Trigger happens to be on a single table and audit the DML operations... It can written in a format to handle DDL operations as well..

 

Procedures are written on top of tables, to retrieve data in what ever format you need.. GSB3.gif?1370457845

 

 

 

 

Posted

Stored Procedures and Triggers two different concepts man...

 

Triggers are like house alarms... In case anything happens, you want them to run... 

 

eg: A new customer comes to facebook, creates a profile and saves it.. After a minute he changes his email id.. So the same customer did an update.. you will have an update trigger on that table (which means when any sort of update happens, you capture it into an another table like an audit table). So then the update creates a new record in the audit table with new email id. so you will have a hold of all updates the customer made... Just imagine if someone modified the data and said I didn't do it... So for those cases, people go with triggers for heavily data oriented structures...

 

inka procedures..

 

procedures are nothing but, how you want to see a set of data... you define all your code inside and since it has coding logic or cannot be written in one single line and also has reusable logic, you will wrap it around a procedure and call that everytime instead of a huge code... Procedures may or may not accept parameters based on your requirements.

 

Eg : Imagine you want to see all your customers based on the country you provide. If you pass USA, you get usa customers, if you pass canada, you get canada customers... that means whatever country you are giving, you are fetching only list of customers from there.. so only your input value is changing and nothing else and it reusable across various countries. so you will wrap that code inside a procedure and give everyone that procedure name to use instead of the code.

 

 

in short...

 

Trigger happens to be on a single table and audit the DML operations... It can written in a format to handle DDL operations as well..

 

Procedures are written on top of tables, to retrieve data in what ever format you need.. GSB3.gif?1370457845

too much seppinav mayya... ty 9ty4j.gif

 

Posted

too much seppinav mayya... ty 9ty4j.gif

 

no problem ip man... its my duty man.. GSB3.gif?1370457845

×
×
  • Create New...