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

From
Subject Re: advice on setting up schema sought
Date
Msg-id 20060411210108.75102.qmail@web33314.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>)
Re: advice on setting up schema sought  ("Daniel McBrearty" <danielmcbrearty@gmail.com>)
List pgsql-novice
> > 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.

like so?

t_translations
language_id (used for table level pkey)
base_text_id (used for table level pkey)
translation (text)

i haven't worked with table level pkeys before.  next
time i get pgadmin3 fired up, i'll look into it.

thanks,

oe1

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

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Indexes slower when used in decending vs. ascending order?
Next
From: Richard Broersma Jr
Date:
Subject: Re: How to query for Interval