Re: May I have an assistance on CREATE TABLE Command

From: "Bart Degryse" <Bart(dot)Degryse(at)indicator(dot)be>
To: <pgsql-sql(at)postgresql(dot)org>,<jameskitambara(at)yahoo(dot)co(dot)uk>
Subject: Re: May I have an assistance on CREATE TABLE Command
Date: 2008-09-17 08:36:49
Message-ID: 48D0DDC1.A3DD.0030.0@indicator.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I think (one of) the point(s) of id fields is not to change them. You can update the region_name field (eg a correct a misspelling), but the id stays the same.
That way the district stays connected to the same region.

>>> James Kitambara <jameskitambara(at)yahoo(dot)co(dot)uk> 2008-09-17 8:50 >>>


Hello Mambers of PGSQL-SQL,

I have two tables namely:

REGION (region_id, region_name)
DISTRICT (dist_id, dist_name, region_id (FK))

I would like to have the CREATE TABLE Command which will create these tables in such a way that when REGION table is UPDATED automatical the FOREGN KEY in DISTRICT table is also updated.

I will appriciate for your assistance !

Regards

James Kitambara

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message James Kitambara 2008-09-17 09:13:17 Re: May I have an assistance on CREATE TABLE Command
Previous Message James Kitambara 2008-09-17 06:50:51 May I have an assistance on CREATE TABLE Command