-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Query Question: Starts with and internationalization
PostPosted: Wed Apr 08, 2009 3:51 pm 
Newbie

Joined: Tue Apr 07, 2009 9:00 pm
Posts: 9
Let's say I have the following class entities defined: Locale, User, Product, ProductLocales, and UserProduct. Here's the ERD for it: http://docs.google.com/Doc?id=ad2pvck7zk57_0tscm3ggb -- it has a typo, the name and description are varchars not integers.

A user wants to find all products in their locale beginning with "Dog", but in the user's native language. I have a few questions.

1) This search is going to happen frequently, but the User, Product, and Locales table don't get updated often. What's the most efficient way to do this search? Should I just use some custom SQL (where upper(name) like 'DOG%' and locale = 'en_US')? Or should I map to some Java collection? Can and should I cache this? If so, how and how would it invalidate?

2) Since internationalization is required, a search may not match if I convert some column data to upper and match on the upper cased query, right... I'm not that familiar with Internationalization. Would mapping to a collection first and then doing the search help with the internationalization?

I will be using Postgres as the database.

Thanks,
Bradford


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.