Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the different between all these technology

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, can someone please guide what is the purpose, advantages and disadvantages of having different technology in database like store procedure, trigger, preparestatement ? any other new technology i forgot mention ?

thank you very much for guiding
 
Hareesh Ram Chanchali
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
plz be clear in your question..

Explain it for some extent
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alvin,
Note that none of these are new technologies.
Stored procedure - executes on database (you use a CallableStatement to call through JDBC)
Trigger - executes in response to changes in table
Prepared statement - executes SQL through Java/JDBC
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply and sorry for confusing, but when we use it normally ?
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stored Procedures are created in database level. These stored procedures can be called through a callable statement.

When ever any query needs to be executed more than one time but with different parameter in the where clause then prepared statement is a better approach, because the prepared statement is precompiled statement.

A statement object gets compiled for each and every sql statement executed
across the database.

Finally triggers are database objects called by the DB when ever a insert, delete or update on a table is performed.
[ February 28, 2005: Message edited by: Srinivasa Raghavan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic