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
|