Introduction to Dependency Issues (240)

本文介绍了数据库中不同类型的模式对象如何通过定义互相引用,并探讨了依赖对象与被引用对象的概念。此外,还讨论了Oracle数据库如何自动记录这些依赖关系以简化数据库管理员的工作,并解释了当依赖对象的状态改变时,如何影响相关联的其他对象的有效性。

Some types of schema objects can reference other objects as part of their definition. For
example, a view is defined by a query that references tables or other views. A
procedure’s body can include SQL statements that reference other objects of a
database. An object that references another object as part of its definition is called a
dependent object, while the object being referenced is a referenced object.

If you alter the definition of a referenced object, dependent objects may or may not
continue to function without error, depending on the type of alteration. For example, if
you drop a table, no view based on the dropped table is usable.

Oracle automatically records dependencies among objects to alleviate the complex job
of dependency management for the database administrator and users. For example, if
you alter a table on which several stored procedures depend, Oracle automatically
recompiles the dependent procedures the next time the procedures are referenced (run
or compiled against).

To manage dependencies among schema objects, all of the schema objects in a
database have a status.
■ Valid schema objects have been compiled and can be immediately used when
referenced.
■ Invalid schema objects must be compiled before they can be used.
■ For procedures, functions, and packages, this means compiling the schema
object.
■ For views, this means that the view must be reparsed, using the current
definition in the data dictionary.
Only dependent objects can be invalid. Tables, sequences, and synonyms are
always valid.
If a view, procedure, function, or package is invalid, Oracle may have attempted to
compile it, but errors relating to the object occurred. For example, when compiling
a view, one of its base tables might not exist, or the correct privileges for the base
table might not be present. When compiling a package, there might be a PL/SQL
or SQL syntax error, or the correct privileges for a referenced object might not be
present. Schema objects with such problems remain invalid.

Oracle automatically tracks specific changes in the database and records the
appropriate status for related objects in the data dictionary.

Status recording is a recursive process. Any change in the status of a referenced object
changes the status not only for directly dependent objects, but also for indirectly
dependent objects.

For example, consider a stored procedure that directly references a view. In effect, the
stored procedure indirectly references the base tables of that view. Therefore, if you
alter a base table, the view is invalidated, which then invalidates the stored procedure.

依赖
1. 如果一个对象的定义中引用了其他对象,那么此对象被称为依赖对象,此对象所引用的对象被称为引用对象
2. 表,序列,和同义词总是处于有效状态

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-983756/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10599713/viewspace-983756/

huaxi@ubuntu:~/repo$ sudo add-apt-repository ppa:deadsnakes/ppa This PPA contains more recent Python versions packaged for Ubuntu. Disclaimer: there's no guarantee of timely updates in case of security problems or other issues. If you want to use them in a security-or-otherwise-critical environment (say, on a production server), you do so at your own risk. Update Note =========== Please use this repository instead of ppa:fkrull/deadsnakes. Reporting Issues ================ Issues can be reported in the master issue tracker at: https://github.com/deadsnakes/issues/issues Supported Ubuntu and Python Versions ==================================== - Ubuntu 20.04 (focal) Python3.5 - Python3.7, Python3.9 - Python3.13 - Ubuntu 22.04 (jammy) Python3.7 - Python3.9, Python3.11 - Python3.13 - Ubuntu 24.04 (noble) Python3.7 - Python3.11, Python3.13 - Note: Python2.7 (focal, jammy), Python 3.8 (focal), Python 3.10 (jammy), Python3.12 (noble) are not provided by deadsnakes as upstream ubuntu provides those packages. Why some packages aren't built: - Note: for focal, older python versions require libssl<1.1 so they are not currently built - Note: for jammy and noble, older python versions requre libssl<3 so they are not currently built - If you need these, reach out to asottile to set up a private ppa The packages may also work on other versions of Ubuntu or Debian, but that is not tested or supported. Packages ======== The packages provided here are loosely based on the debian upstream packages with some modifications to make them more usable as non-default pythons and on ubuntu. As such, the packages follow debian's patterns and often do not include a full python distribution with just `apt install python#.#`. Here is a list of packages that may be useful along with the default install: - `python#.#-dev`: includes development headers for building C extensions - `python#.#-venv`: provides the standard library `venv` module - `python#.#-distutils`: provides the standard library `distutils` module - `python#.#-lib2to3`: provides the `2to3-#.#` utility as well as the standard library `lib2to3` module - `python#.#-gdbm`: provides the standard library `dbm.gnu` module - `python#.#-tk`: provides the standard library `tkinter` module Third-Party Python Modules ========================== Python modules in the official Ubuntu repositories are packaged to work with the Python interpreters from the official repositories. Accordingly, they generally won't work with the Python interpreters from this PPA. As an exception, pure-Python modules for Python 3 will work, but any compiled extension modules won't. To install 3rd-party Python modules, you should use the common Python packaging tools. For an introduction into the Python packaging ecosystem and its tools, refer to the Python Packaging User Guide: https://packaging.python.org/installing/ Sources ======= The package sources are available at: https://github.com/deadsnakes/ Nightly Builds ============== For nightly builds, see ppa:deadsnakes/nightly https://launchpad.net/~deadsnakes/+archive/ubuntu/nightly More info: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa Press [ENTER] to continue or ctrl-c to cancel adding it gpg: keyring `/tmp/tmpcgsx7qod/secring.gpg' created gpg: keyring `/tmp/tmpcgsx7qod/pubring.gpg' created gpg: requesting key 6A755776 from hkp server keyserver.ubuntu.com gpg: /tmp/tmpcgsx7qod/trustdb.gpg: trustdb created gpg: key 6A755776: public key "Launchpad PPA for deadsnakes" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK huaxi@ubuntu:~/repo$ sudo apt update Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial InRelease Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-updates InRelease Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-backports InRelease Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-security InRelease Hit:5 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease Reading package lists... Done Building dependency tree Reading state information... Done 142 packages can be upgraded. Run 'apt list --upgradable' to see them. huaxi@ubuntu:~/repo$ sudo apt install python3.6 python3.6-venv Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python3.6 E: Couldn't find any package by glob 'python3.6' E: Couldn't find any package by regex 'python3.6' E: Unable to locate package python3.6-venv E: Couldn't find any package by glob 'python3.6-venv' E: Couldn't find any package by regex 'python3.6-venv'
09-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值