This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes A Question on effeciency Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "A Question on effeciency" Watch "A Question on effeciency" New topic

A Question on effeciency

Vernon Gibson
Ranch Hand

Joined: Dec 01, 2000
Posts: 35
I have created a JSP that lists items that are available for purchase. The quantity fields are named using a concatenation of the string "QTY_" and the product number (eg: QTY_03304).
The second part of this process is a JSP that is triggered by the 'Add to cart button'. This JSP receives the quantity fields along with their values and adds them to the cart table using the session id as the key, the 'QTY_nnnnn' string, and the field value.
My question is on retrieval efficiency. Is it better to store the item's description and price on the cart table, or to parse the 'QTY_nnnnnn' values and execute a call to the data bean to retrieve the product records? (i.e. when building a 'view cart' page)
jQuery in Action, 2nd edition
subject: A Question on effeciency
Similar Threads
Problem with a shopping cart application using Stripes
How many text fields to I need (GWT)?
Product Details unable to add to shopping cart
Why doesn't exercise 8-1 from Murach's Java Servlets work for me on IE7?
jsp: hidden field problem