Re: [SQL] How to set up a simple relational database - Mailing list pgsql-sql

From Moray McConnachie
Subject Re: [SQL] How to set up a simple relational database
Date
Msg-id 00da01bf7869$57d32da0$760e01a3@oucs.ox.ac.uk
Whole thread Raw
In response to How to set up a simple relational database  ("James Macken" <jmac@nemesis.com.au>)
Responses Re: [SQL] How to set up a simple relational database  (Kovacs Zoltan Sandor <tip@pc10.radnoti-szeged.sulinet.hu>)
List pgsql-sql
> create table staff (name text, packageid int);
> create table package (id int, amount text);
> SELECT * from staff, package where staff.packageid=package.id;


But that omits the "establish the relationship part", by which I
suspect James means "ensure foreign key integrity".
I must I admit I would like to see a simple exposition of that (using
the refint package, presumably) for this example - or is it not worth
it if 7.0 is bringing native foreign key integrity checks?


> James Macken wrote:
> >
> > Can someone demonstrate for me how to set up a simple relational
database
> > using the psql interactive prompt and two tables.




pgsql-sql by date:

Previous
From: Chris
Date:
Subject: Re: [SQL] How to set up a simple relational database
Next
From: Robin Keech
Date:
Subject: Auto increment field when updating?