问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

access中怎么做data dictionary

发布网友 发布时间:2022-04-11 20:54

我来回答

1个回答

热心网友 时间:2022-04-11 22:23

An important part of an Oracle database is its data dictionary, which is a read-only set of tables that provides administrative metadata about the database. A data dictionary contains information such as the following:
■The definitions of every schema object in the database, including default values for columns and integrity constraint information
■The amount of space allocated for and currently used by the schema objects
■The names of Oracle Database users, privileges and roles granted to users, and auditing information related to users (see "User Accounts" on page 17-1)
The data dictionary is a central part of data management for every Oracle database. For example, the database performs the following actions:
■Accesses the data dictionary to find information about users, schema objects, and storage structures
■Modifies the data dictionary every time that a DDL statement is issued (see "Data Definition Language (DDL) Statements" on page 7-3)
Because Oracle Database stores data dictionary data in tables, just like other data, users can query the data with SQL. For example, users can run SELECT statements to determine their privileges, which tables exist in their schema, which columns are in these tables, whether indexes are built on these columns, and so on.
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.

Typically, data dictionary views are grouped in sets. In many cases, a set consists of three views containing similar information and distinguished from each other by their prefixes, as shown in Table 6–1. By querying the appropriate views, you can access only the information relevant for you.

Not all views sets have three members. For example, the data dictionary contains a DBA_LOCK view but no ALL_LOCK view.
The system-supplied DICTIONARY view contains the names and abbreviated descriptions of all data dictionary
[sql]
SQL> SELECT * FROM DICTIONARY
2 ORDER BY TABLE_NAME;
TABLE_NAME COMMENTS
------------------------------ ----------------------------------------
ALL_ALL_TABLES Description of all object and relational tables accessible to the user
ALL_APPLY Details about each apply process that dequeues from the queue visible to the current user
.
.
.

Views with the Prefix DBA_
Views with the prefix DBA_ show all relevant information in the entire database. DBA_ views are intended only for administrators.
For example, the following query shows information about all objects in the database:
[sql]
SELECT OWNER, OBJECT_NAME, OBJECT_TYPE
FROM DBA_OBJECTS
ORDER BY OWNER, OBJECT_NAME;

Views with the Prefix ALL_
Views with the prefix ALL_ refer to the user's overall perspective of the database. These views return information about schema objects to which the user has access through public or explicit grants of privileges and roles, in addition to schema objects that the user owns.
For example, the following query returns information about all the objects to which you have access:
[sql]
SELECT OWNER, OBJECT_NAME, OBJECT_TYPE
FROM ALL_OBJECTS
ORDER BY OWNER, OBJECT_NAME;

Because the ALL_ views obey the current set of enabled roles, query results depend on which roles are enabled, as shown in the following example:
[sql]
SQL> SET ROLE ALL;
Role set.
SQL> SELECT COUNT(*) FROM ALL_OBJECTS;
COUNT(*)
----------
68295
SQL> SET ROLE NONE;
Role set.
SQL> SELECT COUNT(*) FROM ALL_OBJECTS;
COUNT(*)
----------
53771

Application developers should be cognizant of the effect of roles when using ALL_ views in a stored procere, where roles are not enabled by default.
Views with the Prefix USER_
The views most likely to be of interest to typical database users are those with the prefix USER_. These views:
■Refer to the user's private environment in the database, including metadata about schema objects created by the user, grants made by the user, and so on
■Display only rows pertinent to the user, returning a subset of the information in the ALL_ views
■Has columns identical to the other views, except that the column OWNER is implied
■Can have abbreviated PUBLIC synonyms for convenience
For example, the following query returns all the objects contained in your schema:
[sql]
SELECT OBJECT_NAME, OBJECT_TYPE
FROM USER_OBJECTS
ORDER BY OBJECT_NAME;

The DUAL Table
DUAL is a small table in the data dictionary that Oracle Database and user-written programs can reference to guarantee a known result. The al table is useful when a value must be returned only once, for example, the current date and time. All database users have access to DUAL.
The DUAL table has one column called DUMMY and one row containing the value X. The following example queries DUAL to perform an arithmetical operation:
[sql]
SQL> SELECT ((3*4)+5)/3 FROM DUAL;
((3*4)+5)/3
-----------
5.66666667

Storage of the Data Dictionary
The data dictionary base tables are the first objects created in any Oracle database. All data dictionary tables and views for a database are stored in the SYSTEM tablespace. Because the SYSTEM tablespace is always online when the database is open, the data dictionary is always available when the database is open.
How Oracle Database Uses the Data Dictionary
The Oracle Database user SYS owns all base tables and user-accessible views of the data dictionary. Data in the base tables of the data dictionary is necessary for Oracle Database to function. Therefore, only Oracle Database should write or change data dictionary information. No Oracle Database user should ever alter rows or schema objects contained in the SYS schema because such activity can compromise data integrity. The security administrator must keep strict control of this central account.
Caution:
Altering or manipulating the data in data dictionary tables can permanently and detrimentally affect database operation.
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.
For example, if user hr creates a table named interns, then new rows are added to the data dictionary that reflect the new table, columns, segment, extents, and the privileges that hr has on the table. This new information is visible the next time the dictionary views are queried.
Public Synonyms for Data Dictionary Views
Oracle Database creates public synonyms for many data dictionary views so users can access them conveniently. The security administrator can also create additional public synonyms for schema objects that are used systemwide. Users should avoid naming their own schema objects with the same names as those used for public synonyms.
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.
Other Programs and the Data Dictionary
Data DictionaryOther Oracle Database procts can reference existing views and create additional data dictionary tables or views of their own. Application developers who write programs that refer to the data dictionary should refer to the public synonyms rather than the underlying tables. Synonyms are less likely to change between releases.
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
天将雄师观后感600字 为什么喝酒会降血糖 牛栏山 52度浓香型白酒-购买最佳价格 全兴大曲 52度浓香型白酒-购买最佳价格 笔记本电脑怎么接音箱电脑如何连接外置音箱 笔记本电脑有音箱插孔吗笔记本电脑如何连接喇叭 冰箱压缩机过热启动5秒就停了 周长相等的正方形和圆,其面积比是多少 周长相等的正方形和圆面积比是多少 周长相等的正方形与圆形,边长与半径的比是( ),面积之比是( )。 要有... mysql用一个select 如何一次性统计多张表的行数,分别列出来 java什么时候变成了oracle的了 下载mysql为什么要申请oracle账号 sun为什么会被收购??? 甲骨文收购mysql为什么失败 太阳微的公司发展 甲骨文对商朝历史研究有什么作用 为什么美国的甲骨文公司收购同是美国的Sun公司,还需要欧盟的审查? 为什么欧盟要阻止甲骨文收购SUN 甲骨文为什么放弃收购mysql hibernte 怎么测试数据库链接是否成功 hibernate 查询问题 请问:oracle v$mystat中 statistic#=0是什么呢? ORACLE中v$session这张表中又暴多的SQL*Net message from client事件,并且所属用户 查询条件中使用通配符有哪些 sqlserver 通配符(052000113900001)这是数据库中存的编码。字符串类型的,该怎么使用通配符来查询。 已经链接到了数据库并且没有报错,但是就是不能用insert into语句进行添加 Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'user' doesn't exist mysql中 查询时出现了这样的错误 [Err] 1241 - Operand should contain 1 column(s) python中用insert into向数据库中插入数据,values里面的值是浮点型变量怎么办 将sql数据文件导入oracle应该注意什么 mysql:多表,union,count,group by的问题,求教 blob类型 text哪个性能更好 mysql服务器集中在一个CPU内核上跑 MySQL 5.0,MySQL 5.1,MySQL 5.5分别是在什么时间、什么背景下发布的? 如何打包发布一个带有MySQL数据库的软件 mysql 5.7.18 什么时候发布的 在oracle数据库中删除表后生成的文件怎么删除 Oracle 数据库 如何物理删除 db_recovery_file_dest 的内容 Oracle数据库中的DBF文件不能物理删除是为什么 oracle 怎么删除数据库里面的所有用户下的数据文件 Oracle数据库中删除一个大表的内容而不删除表结构的命令是什么 恶魔化作天使来爱你小说txt全集免费下载 我愿身化恶魔与天使对立与地狱同在与孤独相伴是什么意思? 天使和恶魔的职位从大到小 变态恶魔郑民生落网记:白衣天使化身恶魔,冲进小学砍死8人,后来怎样了? 人是天使化身或是恶魔化身??? 天使与恶魔的传说故事是什么? 她是天使?还是恶魔? 传说中的天使分别是那些哟!有没有人可以告诉我呀!还有与天使相对应的恶魔又有那些呢?