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

Data Dictionary and Dynamic Performance Views(数据字典和动态性能视图)

时间:2017-11-05 15:58:39      阅读:264      评论:0      收藏:0      [点我收藏+]

标签:like   type   phi   app   reflect   cal   bms   uri   started   

Overview of the Data Dictionary

Because Oracle Database stores data dictionary data in tables, just like other data, users can query the data with SQL.

Contents of the Data Dictionary

The data dictionary consists of the following types of objects:

  • Base tables

    These underlying tables store information about the database. Only Oracle Database should write to and read these tables. Users rarely access the base tables directly because they are normalized and most data is stored in a cryptic format.

  • Views

    These views decode the base table data into useful information, such as user or table names, using joins and WHERE clauses to simplify the information. These views contain the names and description of all objects in the data dictionary. Some views are accessible to all database users, whereas others are intended for administrators only.

The system-supplied DICTIONARY view contains the names and abbreviated descriptions of all data dictionary views. 

During database operation, Oracle Database reads the data dictionary to ascertain that schema objects exist and that users have proper access to them. Oracle Database also updates the data dictionary continuously to reflect changes in database structures, auditing, grants, and data.

Cache the Data Dictionary for Fast Access

Much of the data dictionary information is in the data dictionary cache because the database constantly requires the information to validate user access and verify the state of schema objects. Parsing information is typically kept in the caches. The COMMENTS columns describing the tables and their columns are not cached in the dictionary cache, but may be cached in the database buffer cache.

 

The V$FIXED_TABLE view contains information about all of the dynamic performance tables and views.

 

For almost every V$ view, a corresponding GV$ view exists. In Oracle Real Application Clusters (Oracle RAC), querying a GV$ view retrieves the V$ view information from all qualified database instances

 

Storage of the Dynamic Performance Views

Dynamic performance views are based on virtual tables built from database memory structures. Thus, they are not conventional tables stored in the database. Read consistency is not guaranteed for the views because the data is updated dynamically.

Because the dynamic performance views are not true tables, the data is dependent on the state of the database and instance. For example, you can query V$INSTANCE and V$BGPROCESS when the database is started but not mounted. However, you cannot query V$DATAFILE until the database has been mounted.

Database Object Metadata

The DBMS_METADATA package provides interfaces for extracting complete definitions of database objects. The definitions can be expressed either as XML or as SQL DDL. Two styles of interface are provided: a flexible, sophisticated interface for programmatic control, and a simplified interface for ad hoc querying.

 

Data Dictionary and Dynamic Performance Views(数据字典和动态性能视图)

标签:like   type   phi   app   reflect   cal   bms   uri   started   

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

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