WebProWorld Dev Forum |
broken images... weird! I am truly exasperated right now as a few people have emailed me saying that none of my images for www.ihomeconnect.com come up. Then, I saw the problem occur on my friend's computer.
Form Submit problem... I've got 2 forms on my site and both have developed a problem. When I first created them - they were both working fine. The data is sent to me via E-mail rather than going to a database.
|
|
 |
Recent
Articles |
Training Underway for Microsoft SQL Server 2005 Microsoft SQL Server 2005 is due to be released later this year, and training has already begun for IT professionals in preparation for it.
How
to Save an Image in a SQL Server Database?
Most web applications have a lot of images used in them. These images are usually
stored in a web server folder and they are accessed by giving the relative path
to the file with respect to the root folder of the website. Synchronize
multiple MySQL Databases with PHP
PIM Team Case Study his article could be very usefull for the owers of web service
businesses. If you are offering e-commerce, hosting, live support or ticketing
web based services...
|
|
|
08.24.05 Performance
Tuning Of A Daffodil DB By
Parveen Aggarwal
This article illustrates the best practices to improve the performance of Daffodil
DB / One$DB JDBC Driver.
This article focuses on how to improve the performance of a Daffodil DB / One$DB
JDBC application using Statement, PreparedStatemnt, CallableStatement and ResultSet
interfaces. Choosing the right statement interfaces and right methods according
to your SQL query plays a vital role in improving the performance of a JDBC Driver.
JDBC Overview
JDBC API provides standard set of interfaces to work with databases like Daffodil
DB / One$DB, Oracle, Derby etc.
Connection interface encapsulates database connection functionality, Statement
interface encapsulates SQL statement representation and execution functionality
whereas ResultSet interface encapsulates retrieving data which comes from the
execution of a SQL query using Statement.
Following are the basic steps to write a JDBC program.
Write
10,000 lines of code in 10 minutes!
Iron Speed Designer – Free
Evaluation |
|
1.Import "java.sql" and "javax.sql" packages. (Import "javax.sql", if advanced
JDBC feature like XA is to be used)
2.Load Daffodil DB JDBC driver (embedded or network JDBC Driver)
3.Establish connection to database using Connection interface
4.Create a Statement
5.Execute the Statement
6.Retrieve results by using ResultSet interface
7.Close Statement and Connection
Choosing right Statement interface:
There are three types of Statement interfaces in JDBC to represent/execute a SQL
query-Statement, PreparedStatement and CallableStatement. Statement is used for
executing static SQL statement with no input and output parameters; PreparedStatement
is used to execute dynamic SQL statement with input parameters whereas CallableStatement
is used to execute dynamic SQL with both input and output parameters. One important
thing to note about PreparedStatement and CallableStatement is that they can also
be used for static SQL statements. However, CallableStatement is mainly meant
for stored procedures.
PreparedStatement gives better performance when compared to Statement because
it is pre-parsed and pre-compiled. This means that compilation and parsing of
such statement is done only once by the database. Afterwards the database reuses
the already parsed and compiled statement. This significantly improves the performance
because whenever a statement has to be executed repeatedly, it doesn't need to
be parsed and compiled time and again. So the overload incurred by parsing and
compiling the same statement can be reduced.
When there is a requirement for single request to process multiple complex statements,
CallableStatement gives better performance as compared to PreparedStatement and
Statement.
To read the full article please visit http://www.daffodildb.com/daffodildb-performance-tuning.html
About the Author:
This article has been contributed by (Mr.) Parveen Aggarwal, Technical Consultant
to DSL India (http://www.daffodildb.com).
With more than 6 years of industry experience in Java and allied technologies,
he has an in-depth understanding of J2EE, J2ME and database management systems.
Parveen is currently working on the concept of data-archiving in embedded databases.
He can be contacted at parveenaggarwal@hotmail.com |