posted 13 years ago
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
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
[OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Alvin chew
Ranch Hand
Posts: 834
posted 13 years ago
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 ]
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 ]
Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified

It is sorta covered in the JavaRanch Style Guide. |