码迷,mamicode.com
首页 > 其他好文 > 详细

Schema Object Dependencies(模式对象依赖关系)

时间:2017-10-31 14:08:31      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:objects   drop   ocs   while   信息   provides   数据   nta   auto   

Some schema objects reference other objects, creating schema object dependencies. For example, a view contains a query that references tables or other views, while a PL/SQL subprogram invokes other subprograms. If the definition of object A references object B, then A is a dependent object with respect to B and B is a referenced object with respect to A.

Oracle Database provides an automatic mechanism to ensure that a dependent object is always up to date with respect to its referenced objects. When a dependent object is created, the database tracks dependencies between the dependent object and its referenced objects. When a referenced object changes in a way that might affect a dependent object, the dependent object is marked invalid. For example, if a user drops a table, no view based on the dropped table is usable.

An invalid dependent object must be recompiled against the new definition of a referenced object before the dependent object is usable. Recompilation occurs automatically when the invalid dependent object is referenced.

As an illustration of how schema objects can create dependencies, the following sample script creates a table test_table and then a procedure that queries this table:

解释:schema 对象的依赖关系由 Oracle 数据库自动维护,当一个 dependent 对象变得无效时,重新编译或者 reference 该对象时,对象变得有效。

注:

详细信息参考:

https://docs.oracle.com/cd/E11882_01/server.112/e40540/tablecls.htm#CNCPT1859 

Schema Object Dependencies 部分说明。

Schema Object Dependencies(模式对象依赖关系)

标签:objects   drop   ocs   while   信息   provides   数据   nta   auto   

原文地址:http://www.cnblogs.com/shulin-peng/p/7760879.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!