This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the different between all these technology  RSS feed

 
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
Sheriff
Posts: 37384
531
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!