Re: advice on setting up schema sought - Mailing list pgsql-novice

From
Subject Re: advice on setting up schema sought
Date
Msg-id 20060411190754.86197.qmail@web33307.mail.mud.yahoo.com
Whole thread Raw
In response to Re: advice on setting up schema sought  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: advice on setting up schema sought  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-novice

--- Bruno Wolff III <bruno@wolff.to> wrote:

> On Mon, Apr 10, 2006 at 22:30:47 -0700,
>   operationsengineer1@yahoo.com wrote:
> >
> > Daniel, i'm not sure i totally understand your
> > request.  from what i could make of it, though,
> would
> > this workd?
> >
> > t_text
> > text_id (pkey)
> > language_id (fkey)
> > text
> >
> > t_language
> > language_id (pkey)
> > language
> >
> > the foreign key of the t_text table would
> reference
> > the the pkey (primary key) of the t_language.
>
> In the translation table, you need to make the
> primary key a composite of
> text_id and language_id so that only one unique
> combination of the two is
> allowed.

something like so...

t_base_text
text_id (pkey)
language_id (fkey)
base_text (text)

t_language
language_id (pkey)
language (text)

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?

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).

is there a reason one setup is more compelling than
another?

tia...

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

pgsql-novice by date:

Previous
From: Andre Majorel
Date:
Subject: Curses interface
Next
From:
Date:
Subject: Re: Curses interface