-->
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.  [ 2 posts ] 
Author Message
 Post subject: Best practice of mapping multiple language table attribute
PostPosted: Tue Nov 18, 2003 11:25 am 
Beginner
Beginner

Joined: Sun Nov 16, 2003 9:30 am
Posts: 20
Hi all ,

I have a table, say T_PRODUCT, in which every attribute I will have multiple languages, say ENG_PRODUCT_NAME and CHI_PRODUCT_NAME. But if I map it this way, it seems that it will be difficult to read and maintain. Does anyone has any better suggestion for the mapping ?

Thanks.

Perseus


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 18, 2003 5:37 pm 
Regular
Regular

Joined: Tue Sep 16, 2003 11:35 am
Posts: 93
Location: San Francisco, CA
How about

Code:
TABLE Product {
   id int,
   name int references LocalizedString
}

TABLE LocalizedString {
   id int
}

TABLE LocalizedStringValue {
   id int,
   string int references LocalizedString,
   locale char(2),
   value text
}


Then it would be too hard to write a UserType that encapsulated the LocalizedString table and provided easy access to the string in any language.

Who knows, someone else has probably already figured this out. There might even be a db vendor solution.


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

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.