constraints on views

From: Patrice sur GMail <patrice.boivin_at_gmail.com>
Date: Mon, 4 Jul 2011 13:39:37 -0300
Message-ID: <CACH2ED+ojdoSLXP-1mWkFhY_66yAqRNFGUn6CEv-EOQtfxRtyw_at_mail.gmail.com>



I found a schema with over a hundred constraints on views...not tables.

View Constraints Oracle Database does not enforce view constraints. However, you can enforce constraints on views through constraints on base tables.

You can specify only unique, primary key, and foreign key constraints on views, and they are supported only in DISABLE NOVALIDATE mode. You cannot define view constraints on attributes of an object column. http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/clauses002.htm


That passage isn't clear to me -- does it imply that constraints on views can be created but never enforced?
How can that be useful?

If that is the case, I can't understand why someone would create a constraint on a view instead of on the base tables.

No idea how these were created, maybe they were imported from Access or some other environment.

Patrice.

--

http://www.freelists.org/webpage/oracle-l Received on Mon Jul 04 2011 - 11:39:37 CDT

Original text of this message