|
Posted by Jerry Stuckle on 06/28/05 15:57
madsgormlarsen@gmail.com wrote:
> Should one place all the text in one big table, or is i better to place
> it in several tabels. Should one make 4 colums one for each language,
> or 4 rows one for each language?
>
Think - normalize, normalize, normalize.
Think - 4 columns - one for each language. What happens if you need to
add a fifth language? How much code will you have to change?
Several tables - again, if it's one for each language, how much code
will you have to change? Probably not as much. But in either case you
have to change the database.
One big table - I doubt it will be "big". "Big" in database-ese often
means terabytes. A couple of megabytes is nothing.
I would put things in one table with a layout similar to:
id: integer
language: char(2)
Actual info: text
Integer is not an auto-increment. Rather, it is some id you generate
for each page. The combination of id and language (2 character ICANN
country codes works great in most cases) is used for the primary key.
In you code for a specific page, the id never changes, the language is
based on what they select.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|