This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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)
I agree. Here's the link:
subject: A Question on effeciency
It's not a secret anymore!