pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Macken <jmac@nemesis.com.au>
To: pgsql-sql@postgresql.org
Subject: How to set up a simple relational database
Date: Wed, 16 Feb 2000 20:33:47 +1100
Message-ID: <000801bf7860$ee1c7860$ad7d2bcb@jay> (raw)

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






view thread (4+ messages)  latest in thread

Message-ID: <000801bf7860$ee1c7860$ad7d2bcb@jay>
Permalink:  ../000801bf7860$ee1c7860$ad7d2bcb@jay/
Also on:    postgresql.org/message-id/000801bf7860$ee1c7860$ad7d2bcb@jay

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jmac@nemesis.com.au
  Subject: Re: How to set up a simple relational database
  In-Reply-To: <000801bf7860$ee1c7860$ad7d2bcb@jay>
  References: <000801bf7860$ee1c7860$ad7d2bcb@jay>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox