Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A1EF29FA0FF for ; Tue, 31 Oct 2006 13:31:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 38694-10 for ; Tue, 31 Oct 2006 13:31:16 -0400 (AST) X-Greylist: delayed 00:15:33.962732 by SQLgrey- Received: from gatekeeper.daycos.com (outbound.daycos.com [204.26.70.70]) by postgresql.org (Postfix) with ESMTP id 61D899FB278 for ; Tue, 31 Oct 2006 13:31:16 -0400 (AST) Received: by gatekeeper.daycos.com with Internet Mail Service (5.5.2653.19) id ; Tue, 31 Oct 2006 11:15:26 -0600 Message-ID: <031936836C46D611BB1B00508BE7345D04C02E82@gatekeeper.daycos.com> From: Curtis Scheer To: pgsql-sql@postgresql.org Subject: Table Relationships Date: Tue, 31 Oct 2006 11:15:26 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6FD10.282B53B0" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/247 X-Sequence-Number: 26636 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C6FD10.282B53B0 Content-Type: text/plain Given the following two tables: CREATE TABLE public.task ( taskid int4 NOT NULL DEFAULT nextval('task_taskid_seq'::regclass), description varchar, CONSTRAINT pk_taskid PRIMARY KEY (taskid) ) public.users ( userid int4 NOT NULL, username varchar, CONSTRAINT pk_userid PRIMARY KEY (userid) ) I want to record which user "performed the task" and which user "checked the task", I've come up with a few ideas on this but I would like to know what the correct way would be to implement this into my table design. Thanks, Curtis ------_=_NextPart_001_01C6FD10.282B53B0 Content-Type: text/html Content-Transfer-Encoding: quoted-printable

Given the following two = tables:

 

CREATE TABLE = public.task

(

  taskid int4 NOT NULL DEFAULT nextval('task_taskid_seq'::regclass),

  description = varchar,

  CONSTRAINT pk_taskid PRIMARY KEY = (taskid)

)

 

public.users

(

  userid int4 NOT = NULL,

  username = varchar,

  CONSTRAINT pk_userid PRIMARY KEY = (userid)

)

 

 

I want to record which user “performed the = task” and which user “checked the task”, I’ve come up with = a few ideas on this but I would like to know what the correct way would be to implement this into my table design.

 

Thanks,

Curtis

 

 

------_=_NextPart_001_01C6FD10.282B53B0--