| From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
|---|---|
| To: | Matt <matthew(dot)berardi(at)weilpublishing(dot)com> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: multiple primary keys and reference |
| Date: | 2002-06-10 14:40:20 |
| Message-ID: | Pine.LNX.4.44.0206101735410.11308-100000@matrix.gatewaynet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
CREATE TABLE Parts(
PartNo varchar(20) NOT NULL,
machtypesid int4 NOT NULL,
BestPrice decimal(100,2),
Comment text,
PRIMARY KEY (PartNo,machtypesid));
CREATE TABLE MachDefs(
defid serial NOT NULL UNIQUE PRIMARY KEY,
Description text,
PartNo varchar(20),
MachTypeID int4 NOT NULL,
FOREIGN KEY (PartNo,MachTypeID) REFERENCES Parts (PartNo,machtypesid));
--
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel: +30-10-8981112
fax: +30-10-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2002-06-10 15:58:00 | Re: multiple primary keys and reference |
| Previous Message | Tom Lane | 2002-06-10 13:56:27 | Re: Efficient DELETE Strategies |