Re: May I have an assistance on CREATE TABLE Command - Mailing list pgsql-sql

From Bart Degryse
Subject Re: May I have an assistance on CREATE TABLE Command
Date
Msg-id 48D0DDC1.A3DD.0030.0@indicator.be
Whole thread Raw
In response to May I have an assistance on CREATE TABLE Command  (James Kitambara <jameskitambara@yahoo.co.uk>)
Responses Re: May I have an assistance on CREATE TABLE Command  (James Kitambara <jameskitambara@yahoo.co.uk>)
List 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@yahoo.co.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
 

pgsql-sql by date:

Previous
From: James Kitambara
Date:
Subject: May I have an assistance on CREATE TABLE Command
Next
From: James Kitambara
Date:
Subject: Re: May I have an assistance on CREATE TABLE Command