![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Let's say you have a database of movies. The MySQL sakila database is such a pubicly available sample schema. In that database, there is a film table ( http://dev.mysql.com/doc/sakila/en/s...re-tables-film ) Two of the columns in that table are title and description, defined as VARCHAR(255) and VARCHAR(65535) respectively. But obviously that only allows for title and description in one language. What approach would you use to 'scale' these fields to any number of arbitrary languages? Remove those columns from the base table and create a new table |
#3
| |||
| |||
|
|
metaperl, 31.03.2010 17:09: Let's say you have a database of movies. The MySQL sakila database is such a pubicly available sample schema. In that database, there is a film table ( http://dev.mysql.com/doc/sakila/en/s...re-tables-film ) Two of the columns in that table are title and description, defined as VARCHAR(255) and VARCHAR(65535) respectively. But obviously that only allows for title and description in one language. What approach would you use to 'scale' these fields to any number of arbitrary languages? Remove those columns from the base table and create a new table film_title (film_id, language_id, localized_title, localized_description) |
|
You might want to keep the title column in the film table to record the original title under which it was released in the originating country. |
#4
| |||
| |||
|
|
* * *Consider character sets. *Consider having to represent more than one character set in your database. |
#5
| |||
| |||
|
|
On Mar 31, 3:15*pm, Gene Wirchenko <ge... (AT) ocis (DOT) net> wrote: * * *Consider character sets. *Consider having to represent more than one character set in your database. Well, I would imagine you would just go with a universal character encoding, like utf8 or something. |
#6
| |||
| |||
|
|
Well, I would imagine you would just go with a universal character encoding, like utf8 or something. Some DBMSs do not support it. |
#7
| |||
| |||
|
|
Gene Wirchenko wrote on 31.03.2010 23:31: Well, I would imagine you would just go with a universal character encoding, like utf8 or something. Some DBMSs do not support it. Seriously? Which one? |
#8
| |||
| |||
|
|
metaperl, 31.03.2010 17:09: Let's say you have a database of movies. The MySQL sakila database is such a pubicly available sample schema. There could be more than one title in a language. |
![]() |
| Thread Tools | |
| Display Modes | |
| |