He leído en internet 3 planteamientos:
Código SQL:
Ver originalCREATE TABLE app_product (
Id INT IDENTITY NOT NULL,
Description_es Text,
Description_fr Text,
PRIMARY KEY (Id)
);
Código SQL:
Ver originalCREATE TABLE ref_language (
Code CHAR(2)NOT NULL,
Name VARCHAR(20) NOT NULL,
PRIMARY KEY (Code)
);
CREATE TABLE app_translation (
Id INT IDENTITY NOT NULL,
PRIMARY KEY (Id)
);
CREATE TABLE app_translation_entry (
TranslationId INT NOT NULL,
LanguageCode CHAR(2) NOT NULL,
Text Text NOT NULL,
FOREIGN KEY (TranslationId) REFERENCES app_translation(Id),
FOREIGN KEY (LanguageCode) REFERENCES ref_language(Code)
);
CREATE TABLE app_product (
Id INT IDENTITY NOT NULL,
Description INT NOT NULL,
PRIMARY KEY (Id),
FOREIGN KEY (Description) REFERENCES app_translation(Id)
);
Código SQL:
Ver originalCREATE TABLE ref_language (
Code CHAR(2)NOT NULL,
Name VARCHAR(20) NOT NULL,
PRIMARY KEY (Code)
);
CREATE TABLE app_product (
Id INT IDENTITY NOT NULL,
PRIMARY KEY (Id)
);
CREATE TABLE app_product_translation (
ProductId INT NOT NULL,
LanguageCode CHAR(2) NOT NULL,
Description Text NOT NULL,
FOREIGN KEY (ProductId) REFERENCES app_product(Id),
FOREIGN KEY (LanguageCode) REFERENCES ref_language(Code)
);
Pero cada una tiene sus ventajas y desventajas.