Re: [SQL] How to set up a simple relational database

From: "Moray McConnachie" <moray(dot)mcconnachie(at)computing-services(dot)oxford(dot)ac(dot)uk>
To: "Chris" <chris(at)bitmead(dot)com>, "James Macken" <jmac(at)nemesis(dot)com(dot)au>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [SQL] How to set up a simple relational database
Date: 2000-02-16 10:34:02
Message-ID: 00da01bf7869$57d32da0$760e01a3@oucs.ox.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Robin Keech 2000-02-16 11:08:28 Auto increment field when updating?
Previous Message Chris 2000-02-16 10:03:45 Re: [SQL] How to set up a simple relational database