On Wed, Jun 14, 2006 at 13:51:50 -0700,
[EMAIL PROTECTED] wrote:
> Starting with this:
>
> create sequence languages_seq increment by 1;
> create table languages (
> id integer primary key default nextval('languages_seq'),
> language_name varchar(100)
> );
> insert into languages (id, langua
On Wed, Jun 14, 2006 at 10:53:36AM +0200, Daniel McBrearty wrote:
> Hi all,
>
> I have a table "phrases" that looks like this :
>
> create table phrases(
> id serial ,
> language integer references langauges(id),
> content text
> );
Might want to avoid bareword 'id' as a field name... it's a gr
[EMAIL PROTECTED] wrote:
Starting with this:
create sequence languages_seq increment by 1;
create table languages (
id integer primary key default nextval('languages_seq'),
language_name varchar(100)
);
(I like specifying my own sequence names, instead of using "serial",
plus
using a d
thanks Susan for your idea.
I thought that was it for a moment, then I saw a problem (I think) -
it works, but gets quite inefficient.
when you have 2 phrases which are a translation, that is just one entry
when you have 3, that is 3
4 => 6
and so on.
In practice we might have 15, 20 language
Starting with this:
create sequence languages_seq increment by 1;
create table languages (
id integer primary key default nextval('languages_seq'),
language_name varchar(100)
);
insert into languages (id, language_name) values (1, 'English');
insert into languages (id, language_name) values (2