Performance Tuning of a Daffodil DB / One$DB -JDBC Application

Written by Parveen Aggarwal


This article illustratesrepparttar best practices to improverepparttar 147413 performance of Daffodil DB / One$DB JDBC Driver. This article focuses on how to improverepparttar 147414 performance of a Daffodil DB / One$DB JDBC application using Statement, PreparedStatemnt, CallableStatement and ResultSet interfaces. Choosingrepparttar 147415 right statement interfaces and right methods according to your SQL query plays a vital role in improvingrepparttar 147416 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 fromrepparttar 147417 execution of a SQL query using Statement.

Following arerepparttar 147418 basic steps to write a JDBC program.

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.Executerepparttar 147419 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.

The Printer Cartridge Review

Written by Martin Smith


Years ago computers were huge and their accompanying printers were huge as well. Instead of ink cartridges like those used now, they had toner reservoirs and later toner cartridges. Filling a toner cartridge was not easy and it was messy. The toner cartridges were better. Some printers ran on print wheels and some used ribbons.

Now our computers are more compact andrepparttar printers do more than just print in some cases. Printers use cartridges with self-contained reservoirs. Some can be refilled and it isn't as messy as adding toner was.

There are two types of printer cartridges. Primarily Hewlett-Packard and Epson printers userepparttar 147373 first,repparttar 147374 Piezo Electric. A small crystal is subjected to an electric current that causesrepparttar 147375 crystal to expand about every 5 microseconds (20,000 per second. This expansion causesrepparttar 147376 inkjet ink to be squirted out throughrepparttar 147377 print heads very rapidly and precisely. Piezo Electric has fewer print heads than bubble jet/thermal printers but can do more precise action and tend to last longer.

Bubble jet print cartridges heatrepparttar 147378 ink rapidly into a bubble and is squirted through ink nozzles thousands of times per second. Bubble jet printers are quieter thanrepparttar 147379 Piezo based printers. It gives you extremely high resolution color printing.

Ink jet not megapixel method hasrepparttar 147380 ink squirted through nozzles as they move over a variety of media. Liquid ink in various colors is squirted atrepparttar 147381 paper to create an image. The print head scansrepparttar 147382 page horizontally using a motor assembly that rollsrepparttar 147383 paper in vertical steps.

A strip of an image is printed, thenrepparttar 147384 paper moves on ready forrepparttar 147385 next step. For speed, it doesn't just print a strip acrossrepparttar 147386 page; it prints vertical rows of pixels in each pass.

There are various types of inkjet technology. DOD or drop on demand squirts small drops of in ink ontorepparttar 147387 paper through tiny nozzles. It is like turning a hosepipe on and off 5,000 times per second. The amount of ink dropped onrepparttar 147388 page is controlled byrepparttar 147389 driver software that says which nozzles fire and when. A problem with ink jet technology isrepparttar 147390 tendency forrepparttar 147391 ink to smudge right after printing. This is improving withrepparttar 147392 development of new ink compositions.

Thermal Technology of printing firesrepparttar 147393 ink ontorepparttar 147394 paper. There are three stages in this process. In stage 1repparttar 147395 squirt is started whenrepparttar 147396 ink is heated to create a bubble. Initial pressure burstsrepparttar 147397 bubble and hitsrepparttar 147398 paper. The bubble breaks asrepparttar 147399 heating element cools. The vacuum that is created drawsrepparttar 147400 ink fromrepparttar 147401 reservoir to replacerepparttar 147402 ink that was ejected.

Cont'd on page 2 ==>
 
ImproveHomeLife.com © 2005
Terms of Use