Home Forums SQL Server 7,2000 Globalization Multiple Language Database Design - Additional Columns vs. Additional Tables... RE: Multiple Language Database Design - Additional Columns vs. Additional Tables...

  • I reckon the question should be, why cant we have SQL manage this for us?

    Here would be my ideal scenario:

    Example Schema. Assume we have a 'default culture', (let's say 'en-US') set at the Database Instance level.

    CREATE TABLE Advertisement

    (

    AdvertisementID INT NOT NULL PRIMARY KEY,

    Header NVARCHAR(500),

    Body NVARCHAR(MAX)

    )

    When INSERTing into this table there are 2 ways to handle different cultures:

    - insert to the default culture. no changes for this.. (ie.. INSERT INTO Advertisement (AdvertisementIDm, Header, Body) VALUES (1, 'American Header', 'American Body')).

    - specify a culture string when inserting. i.e:

    SET SESSIONCULTURE 'en-UK'

    GO

    INSERT INTO Advertisement (1, Header, Body) VALUES (1, 'British Header', 'British Body')

    Then, when we select from this table we'd again, have two options

    SELECT * FROM Advertisement WHERE AdvertisementID = 1 --returns default (en-US) value, or;

    SELECT * FROM Advertisement WHERE AdvertisementID = 1 AND @@CultureString == 'en-UK' --returns UK. (or you could do this via a SET SESSION).

    My thinking would be that you woulndt be able to insert a culture-specific value (i.e en-UK) until the default value has been inserted.

    Anybody got any thoughts??

    Cheers,