Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > MySQL > Localization Question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-07, 04:19
eRAZOR eRAZOR is offline
Registered User
 
Join Date: Oct 2007
Posts: 2
Localization Question

Quick question, which of the following two designs would be better in terms of performance (especially when planning to use mysql full text search) for localizing certain columns of a table:

Table item (contains language neutral data)
------------------------------------------
int item_id
int some_value_a
float some_value_b


** Solution A **

Table item_name
----------
int item_id
varchar(255) value_enGB
varchar(255) value_deDE
varchar(255) value_frFR
varchar(255) value_esES


** Solution B **

Table item_name_enGB
----------
int item_id
varchar(255) value


Table item_name_deDE
----------
int item_id
varchar(255) value


Table item_name_frFR
----------
int item_id
varchar(255) value


Table item_name_esES
----------
int item_id
varchar(255) value
Reply With Quote
  #2 (permalink)  
Old 10-26-07, 04:24
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,554
neither

i prefer option C

Table item_name
----------
int item_id
char(2) lang
primary key (item_id,lang)
varchar(255) value
__________________
r937.com | rudy.ca

pre-order my book Simply SQL from Amazon
Reply With Quote
  #3 (permalink)  
Old 10-26-07, 04:26
RBARAER RBARAER is offline
Registered User
 
Join Date: Aug 2004
Location: France
Posts: 754
I would recommend solution C :

Table item_name
----------
int item_id
varchar2(4) language
varchar(255) value

Or D if you want to split the code (I assume there is a language code and a territory code, but you can adapt) :

Table item_name
----------
int item_id
varchar2(2) language
varchar2(2) territory
varchar(255) value

And then a lookup table for the language codes (plus one for the territory codes in solution D).

Regards,

rbaraer
__________________
ORA-000TK : No bind variable detected... Shared Pool Alert code 5 - Nuclear query ready .
Reply With Quote
  #4 (permalink)  
Old 10-26-07, 04:34
eRAZOR eRAZOR is offline
Registered User
 
Join Date: Oct 2007
Posts: 2
But what about the collation? Using C means you need an universal setting for all languages. Furthermore, using C you would end up with a single fulltext index over possible cultures. But correct me if I'm wrong, cross culture searches in web applications are extremely rare. So wouldn't that slow down the FT index unnecessarily?

Last edited by eRAZOR : 10-26-07 at 04:53.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On