Re: Prevent update of Non Key fields

From: Yoram zilberberg <elric_dm_at_netvision.net.il>
Date: 1996/04/18
Message-ID: <NEWTNews.829886377.13130.elric_dm_at_dialup.netvision.net.il>#1/1


In Article<31753CB8.41C6_at_austin.ibm.com>, <rp_at_austin.ibm.com> write:
> Path: news.NetVision.net.il!psinntp!psinntp!psinntp!howland.reston.ans.net!newsjunkie.ans.net!newsfeeds.ans.net!news-m01.ny.us.ibm.net!ausnews.austin.ibm.com!usenet
> From: RP <rp_at_austin.ibm.com>
> Newsgroups: comp.databases.oracle
> Subject: Prevent update of Non Key fields
> Date: Wed, 17 Apr 1996 18:47:20 +0000
> Organization: IBM
> Lines: 10
> Message-ID: <31753CB8.41C6_at_austin.ibm.com>
> NNTP-Posting-Host: corsair.austin.ibm.com
> Mime-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> X-Mailer: Mozilla 2.01 (X11; I; AIX 2)
>
> Hi everyone,
> In a table I want to prevent update of the non-primary key
> columns. The table has keys referenced by other tables as foreign key.
> That way I can restrict updation of the primary key columns. But one can
> easily change the non-key columns. Is there a way to restrict this.
>
> Any reply will be greatly appreciated.
> Thanks.
>
> RP.

 To begin with remeber that it is best to have the FK point only to the parent table PK column(s). this way you don't have to warry about it.
 The best way to secure the access to a partial set of the rest of the columns is by using a DataBase Trigger.

Yoram Z. Received on Thu Apr 18 1996 - 00:00:00 CEST

Original text of this message