Received: from mailserver.nemesis.com.au ([203.103.211.5]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA82751 for ; Wed, 16 Feb 2000 04:35:01 -0500 (EST) (envelope-from jmac@nemesis.com.au) Received: from bbs.nemesis.com.au (unverified [203.103.211.3]) by mailserver.nemesis.com.au (Vircom SMTPRS 4.2.181) with SMTP id for ; Wed, 16 Feb 2000 20:38:08 +1100 X-ROUTED: Wed, 16 Feb 2000 20:28:20 -0500 X-TCP-IDENTITY: Ghetto Received: from jay [203.43.125.173] by bbs.nemesis.com.au with smtp id BEBMAJAI ; Wed, 16 Feb 2000 20:28:08 -0500 Message-ID: <000801bf7860$ee1c7860$ad7d2bcb@jay> Reply-To: "James Macken" From: "James Macken" To: Subject: How to set up a simple relational database Date: Wed, 16 Feb 2000 20:33:47 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Can someone demonstrate for me how to set up a simple relational database using the psql interactive prompt and two tables. For example: table 1 can be staff member and table 2 can be salary package with a one-to-many relationship (there would be a foreign key in table Staff Member which determined what salary package a staff member had. Can someone show me the commands to create the two tables, establish the relationship between them and query the two tables so that it lists the staff member and his/her wages (using the relationship)? It seems hard to find examples anywhere. James