Not sure if this is what your looking for, but I have a similar problem where I have keys and long names for db lookup. When my app starts up, one of the first things that happens is that the first user in triggers a method that creates an xml file pulling all the keys in and their related long names and storing them in the context somewhere, so then the keys can be used for the db searches, and the xml file can be used to get the long names when they are required.
Cheers Simon (];o) <= Very poor attempt at a bald man!! ----- Original Message ----- From: "Becky Norum" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 28, 2003 12:28 PM Subject: [OT] Query design question > My database schema references a number of "lookup" tables. > > For example, > > DATA: > id primary key > category references lookup_category(key) > upload_loc references lookup_upload_location(key) > (etc) > > LOOKUP_CATEGORY: > key primary key > name > description > > LOOKUP_UPLOAD_LOCATION: > key primary key > url > description > > > When doing a search, I create an ArrayList "DATA" beans to hold the > search results. I want the results to display the long name rather than > key for various lookup tables, etc. e.g., "Acousto-Photonic Imaging" > rather than "api". > > Is it a better design to design the query to handle this, e.g. > > SELECT a.id, b.name from data a, lookup_category b > WHERE a.category = b.key; > > Even though an instance of the data bean doesn't now correspond directly > to a DATA table entry? > > or to conduct separate queries. > > The first obviously seems faster. > > I'm sure this is handled by some design pattern.. but I'm not sure where > to look. > > TIA, > > Becky > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

