Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Multilanguage application & database
Here's what I finally came up with:
CREATE TABLE Expressions (
IdExpression NUMBER(5) NOT NULL,
PRIMARY KEY (IdExpression) );
CREATE TABLE Languages (
IdLanguage NUMBER(2) NOT NULL,
IdExpression NUMBER(5) NOT NULL REFERENCES Expressions
(IdExpression),
PRIMARY KEY (IdLanguage) );
CREATE TABLE Translations (
IdExpression NUMBER(5) NOT NULL REFERENCES Expressions
(IdExpression),
IdLanguage NUMBER(2) NOT NULL REFERENCES Languages (IdLanguage),
Translation VARCHAR2(2000) NOT NULL,
PRIMARY KEY (IdExpression, IdLanguage) );
If I have to link an "expression" to another table, I can pass its key without the language (which I get at runtime).
Thanks all for your input!
K
Received on Wed Oct 27 2004 - 03:53:53 CDT