|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
At present i have one table with name Destination which contain data
in English:-> Destination:-> ------------------------------------------------------------------------------- DestID Name Description ------------------------------------------------------------------------------- where DestId field is Primary key store Destination ID. Name field contain name of destination example any city name. Description field store description of city (like history). Now I want to store Name and Description in other language so suggest/ idea how my table look. Destination:-> ---------------------------------------------------------------------------------------------------------------------------- DestID Name Description GermanName GermanDescription ----------------------------------------------------------------------------------------------------------------------------- or DestinationMaster:->This table store content in English language -------------------------------------------------------------------- DestID Name Description -------------------------------------------------------------------- DestinationGerman:->This table store content in Geraman language ------------------------------------------------------------------- DestID Name Description ------------------------------------------------------------------- DestinationDutch:->This table store content in Dutch language ------------------------------------------------------------------ DestID Name Description ------------------------------------------------------------------ Thanks, Amit Jain |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
..oO(Amit Jain)
>[multiple languages] >Now I want to store Name and Description in other language so suggest/ >idea how my table look. > >Destination:-> >---------------------------------------------------------------------------------------------------------------------------- >DestID Name Description GermanName >GermanDescription >----------------------------------------------------------------------------------------------------------------------------- Bad idea. For adding another language you would have to alter the table structure. >or > >DestinationMaster:->This table store content in English language >-------------------------------------------------------------------- >DestID Name Description >-------------------------------------------------------------------- > >DestinationGerman:->This table store content in Geraman language >------------------------------------------------------------------- >DestID Name Description >------------------------------------------------------------------- > >DestinationDutch:->This table store content in Dutch language >------------------------------------------------------------------ >DestID Name Description >------------------------------------------------------------------ Even worse (IMHO). A third idea: Add a field 'lang' for storing a language code (2 or 5 chars). Make that the primary key together with the DestID field. Then store one record for each language. Micha |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Tue, 18 Sep 2007 22:26:34 +0200, Michael Fesser wrote:
> A third idea: Add a field 'lang' for storing a language code (2 or 5 > chars). Make that the primary key together with the DestID field. Then > store one record for each language. This is the right general plan for the OP. Though for some reason, my brain is nagging me to say "Nope, primary key on DestID only, add another index for the DestID plus LangID" but I can't remember why. -- 6. I will not gloat over my enemies' predicament before killing them. --Peter Anspach's list of things to do as an Evil Overlord |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
..oO(Peter H. Coffin)
>On Tue, 18 Sep 2007 22:26:34 +0200, Michael Fesser wrote: >> A third idea: Add a field 'lang' for storing a language code (2 or 5 >> chars). Make that the primary key together with the DestID field. Then >> store one record for each language. > >This is the right general plan for the OP. > >Though for some reason, my brain is nagging me to say "Nope, primary key >on DestID only, add another index for the DestID plus LangID" but I >can't remember why. PK on DestID only wouldn't be unique anymore. Micha |
|
![]() |
| Outils de la discussion | |
|
|