Re: advice on setting up schema sought
От | Bruno Wolff III |
---|---|
Тема | Re: advice on setting up schema sought |
Дата | |
Msg-id | 20060411202933.GB17919@wolff.to обсуждение исходный текст |
Ответ на | Re: advice on setting up schema sought (<operationsengineer1@yahoo.com>) |
Ответы |
Re: advice on setting up schema sought
|
Список | pgsql-novice |
On Tue, Apr 11, 2006 at 12:07:54 -0700, operationsengineer1@yahoo.com wrote: > > > t_translations > translations_id (pkey - composite of text_id and > language_id with a marker such as "_" inbetween. > otherwise 1 and 11 ("111") can be confused with 11 and > 1 ("111"). unless someone has a better idea (which > they likely do). > translation (text) > > would this be an option? No, you want to use the primary key declaration on the table, not the column. Done that way you can specify more than one column as forming the primary key. > Bruno, do you even need a translations table? > couldn't you just use... > > t_text > text_id (pkey) > is_base (bool) > text (text) > > if the base text is all in one language, then you > wouldn't even need the boolean (as long as that rule > sticks, anyway). This wouldn't solve the primary key issue, but it wouldn't unreasonable to combine the primary text and translations together especially if the primary text was always in a specific language.
В списке pgsql-novice по дате отправления: