Jump to content

Triggers & Store Procedures Testing


Recommended Posts

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

  • king420

    19

  • ipaddress0

    12

  • loveindia

    7

  • VenkatD

    6

Top Posters In This Topic

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

 

 

 

good info man

 

ila rojuki oka topic (tech concepts) meeda  rayee GSB3.gif?1370457845
 

Posted

hey atla gadhu atla gadhu nen cheptha...sir naku oka chance eeyara

round up chesi confuse cheste confusion lo chepesta

Posted

ela chesthar mayya in real time? konchem detailed ga seppandi?

help

:3D_Smiles:  technology maaraava 

Posted

hey atla gadhu atla gadhu nen cheptha...sir naku oka chance eeyara

round up chesi confuse cheste confusion lo chepesta

 

GSB3.gif?1370457845  shuru jeyi

Posted

:3D_Smiles:  technology maaraava 

led... aa pani sese vallu leave...anduke naku idea unte seyamani seppar...anduke eeda adigina 

Posted

led... aa pani sese vallu leave...anduke naku idea unte seyamani seppar...anduke eeda adigina 

 

lol ... ft naa contract aa bro ??

Posted

good info man

 

ila rojuki oka topic (tech concepts) meeda  rayee GSB3.gif?1370457845
 

 

rojuki okataaa man....GSB3.gif?1370457845

×
×
  • Create New...