Introduction and use of Oracle Data Dictionary

Source: Internet
Author: User
Chinese name: Data Dictionary English name: datadictionary definition: a set of information about all objects in a database and their relationships. A Data Dictionary defines and describes data items, data structures, data streams, data storage, processing logic, and external entities, the purpose is to give a detailed description of each element in the data flow chart. Data Dictionary

Chinese name: data dictionary English name: data dictionary Definition: a set of information about all objects in a database and their relationships. A Data Dictionary defines and describes data items, data structures, data streams, data storage, processing logic, and external entities, the purpose is to give a detailed description of each element in the data flow chart. Data Dictionary


Chinese name: Data Dictionary

English name: data dictionary

Definition: a set of information about all objects and their relationships in the database.

Data DictionaryDefines and describes data items, data structures, data streams, data storage, processing logic, and external entities. The purpose is to provide detailed descriptions of each element in the data flow chart.


Data Dictionary(Data dictionary) is a directory that you can access to record database and application source Data. An active data dictionary is a data dictionary that can be automatically updated by the DBMS when the database or application structure is modified. A passive data dictionary is a data dictionary that must be updated manually when being modified.


Data DictionaryIt is a reserved space and a database, which is used to store the information database itself.
Information that a data dictionary may contain, for example:
Database Design Materials
Stored SQL Program
User Permissions
User statistics
Information in the database Process
Database growth statistics
Database performance statistics
Data dictionary is a collection of various types of data descriptions in the system. It is the main result of detailed data collection and data analysis.
A data dictionary consists of data items, data structures, data streams, and data storage and processing processes.
Data items are the smallest component of data. Several data items can constitute a data structure. data dictionaries describe the logical content of data streams and data storage by defining data items and data structures.
A data dictionary is a set of data information, that is, a set of definitions of all elements contained in a data flow diagram.
Data Dictionary also has another meaning. It is a tool used in Database Design to describe the design of basic tables in the database, it mainly includes the field name, data type, primary key, foreign key, and so on.
This section is used as a tool for analyzing data dictionaries. The most important purpose of any dictionary is to explain the items that people do not understand. In structural analysis, the role of a data dictionary is to define and describe each component in a data flow chart. In other words, the text set of the definition and interpretation of all the components in the data flow chart is the data dictionary, and a set of closely consistent definitions established in the data dictionary helps improve the communication between analysts and users.


Edit the composition of the data dictionary in this section:
1. Data items
2. Data Structure
3. Data Stream
4. Data Storage
5. handling process
Data Dictionary
Data dictionary is an important part of a database. It stores the information used by the database. for users, it is a set of read-only tables. The data dictionary includes:
1. Information about all schema objects in the database, such as tables, views, clusters, and indexes.
2. How much space is allocated and how much space is currently used.
3. Column default value.
4. Constraints on the integrity of information.
5. User Name.
6. permissions granted to users and roles.
7. Audit information accessed or used by the user.
8. Other generated database information.
A database data dictionary is a group of tables and view structures. They are stored in the SYSTEM tablespace.
The database data dictionary is not only the center of each database. It is also very important to every user. You can use SQL statements to access the database data dictionary.
A collection of data information is a directory that allows users to access and record database and application metadata. It describes the physical and logical information of tables in the database.
Editing this data dictionary is a set of tables and view structures. They are stored in the SYSTEM tablespace.
Database Data dictionary is not only the center of each database, but also very important information for each user. You can use SQL statements to access the database data dictionary.
A data dictionary is a set of data information, that is, a set of definitions of all elements contained in a data flow diagram.
Composition:
1. Data items: a data item is the most basic data element and the smallest meaningful data unit. In a data dictionary, data items are defined with the following features: data item name, number, alias, and description; the length of the data item; the value range of the data item.
2. Data Structure: data items cannot be decomposed, while data structures are data packets that can be further decomposed. A data structure consists of two or more correlated data elements or other data structures. A data structure can be composed of several data elements, several data structures, and several data elements and data structures.
3. Data Stream: a data stream consists of one or more fixed data items. When defining a data stream, it not only describes the name and composition of the data stream, but also specifies its source, destination, and data traffic.
4. Data Storage: data is stored in a data dictionary and only describes the logical storage structure of data, without involving its physical organization.
5. processing process: the definition of processing logic only describes the bottom-layer logic in the data flow chart.


Routine application of Data Dictionary

Select * from dictionary;

-- Data Dictionary

A data dictionary is a place where Oracle stores database information. It is used to describe data.

For example, the Creator information, creation time information, tablespace information, and user access permission information of a table.

A database data dictionary is a group of tables and view structures. They are stored in the SYSTEM tablespace.

You can access the data dictionary to view detailed information when you encounter difficulties in performing operations on the data in the database.

You can use SQL statements to access the database data dictionary.

The data dictionary includes:

1. Information about all schema objects in the database, such as tables, views, clusters, and indexes.

2. How much space is allocated and how much space is currently used.

3. Column default value.

4. Constraints on information integrity.

5. Oracle user name.

6. permissions granted to users and roles.

7. Audit information accessed or used by the user.

8. Other generated database information.

Data dictionaries in Oracle are static and dynamic.

1. static data dictionary --> it does not change when users access the data dictionary,

-- For example, a table created by a user

2. The dynamic data dictionary is dependent on the performance of the database and reflects some internal information about the database operation. Therefore, it is not always the same when accessing such data dictionaries.

-- The currently locked object

Static Data Dictionary: This type of data dictionary is mainly composed of tables and views.

The tables in the data dictionary cannot be directly accessed, but the views in the data dictionary can be accessed.

The views in the static data dictionary are divided into three types, which have three prefixes: user _ *, all _ *, and dba _*.

User _*

This view stores information about the objects owned by the current user. (All objects in this user mode)

All _*

This attempt stores the information of objects accessible to the current user. (Compared with user _ *, all _ * does not need to own this object. You only need to have the permission to access this object)

Dba _*

This view stores information about all objects in the database. (The premise is that the current user has the permission to access these databases. Generally, the user must have the Administrator permission)

Bytes -----------------------------------------------------------------------------------------------------------

Select * from dictionary;

-- Query tables owned by the user

-- User_tables mainly describes information about all tables owned by the current user,

---- Mainly includes the table name, tablespace name, and cluster name. Through this view, you can clearly understand what tables can be operated by the current user

Desc user_tables;

Select table_name from user_tables;

Select * from user_tables;

-- Query the indexes owned by the user

Select index_name from user_indexes;

-- Query the views owned by the user

Select view_name from user_views;

-- Query the database objects owned by the user, including tables, views, stored procedures, triggers, packages, indexes, sequences, and JAVA files.

Select object_name from user_objects;

-- Describes information about the current user, including the current user name, account id, account status, tablespace name, and creation time.

Select * from user_users;

Bytes -----------------------------------------------------------------------------------------------------------

-- User _/all:

---- The information listed in all _ is the objects that the current user can access, rather than the objects owned by the current user.

-- Query all tables, processes, and functions of a user.

Select owner, object_name, object_type from all_objects

Bytes -----------------------------------------------------------------------------------------------------------

-- Administrator permissions are required for dba,

-- Query the table space information (the current user must have the DBA role ).

Select * from dba_data_files

Bytes -----------------------------------------------------------------------------------------------------------

Dynamic Data Dictionary

Oracle contains some potential tables and views maintained by system administrators, such as SYS. Since these tables and views are constantly updated when the database is running, therefore, they are called dynamic data dictionaries (or dynamic performance views ). These views provide information about the memory and disk operations, so we can only read-only access them, but not modify them.

In Oracle, these dynamic performance views all start with v $.

V $ access

This view displays the database objects locked in the database and the session objects accessing these objects (session objects ).

Select * from v $ access

V $ session

This view lists the details of the current session.

V $ active_instance

This view mainly describes the information of active instances in the current database. You can still use the select statement to observe this information.

V $ context

This view lists the attributes of the current session. For example, namespace and attribute value

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.