Oracle Data Dictionary: - Tables, - Columns, - Users, - Data Files Etc. Metadata
Oracle Data Dictionary: - Tables, - Columns, - Users, - Data Files Etc. Metadata
The Oracle data dictionary is one of the most important components of the Oracle
DBMS.
It contains all information about the structures and objects of the database such as
tables,
columns,
users,
data files etc.
The data stored in the data dictionary are also often called metadata. Although it is
The internal level contains all base tables that are used by the various DBMS
software components and they are normally not accessible by end users.
The external level provides numerous views on these base tables to access
1
Data Dictionary Tables
An installation of an Oracle database always includes the creation of three standard
Oracle users:
SYS This is the owner of all data dictionary tables and views. This user
in the database.
2
Data Dictionary Contains...
The tables and views provided by the data dictionary contain information about
tables, table columns and their data types, integrity constraints, indexes,
3
Viewing the data dictionary
TABLE_NAME COMMENTS
USER_RESOURCE_LIMITS Display resource limit of the user
USER_PASSWORD_LIMITS Display password limits of the user
USER_CATALOG Tables, Views, Synonyms and Sequences owned by the user
ALL_CATALOG All tables, views, synonyms, sequences accessible to the user
USER_CLUSTERS Descriptions of user's own clusters
ALL_CLUSTERS Description of clusters accessible to the user
lists all tables and views of the data dictionary that are accessible to the user. The
selected information includes the name and a short description of each table and
view. Before issuing this query, check the column definitions of DICT[IONARY]
using desc DICT[IONARY] and set the appropriate values for column using the
format command.
4
The query
retrieves the names of all tables owned by the user who issues this command.
10 rows selected.
5
The query
CO WI
SC PRECISIO NULL DEFAULTV CHARACTER_SET_NA
TNAME LN CNAME COLTYPE DT
ALE N S AL ME
O H
GEO 2 STORE_NAME VARCHAR2 15 NULL CHAR_CS
GEO 1 REGION_NAME VARCHAR2 10 NULL CHAR_CS
STORE_INFO 3 DDATE DATE 7 NULL
STORE_INFO 2 SALES NUMBER 22 0 5 NULL
STORE_INFO 1 STORE_NAME VARCHAR2 15 NULL CHAR_CS
EMPINFO 6 STATE VARCHAR2 20 NULL CHAR_CS
EMPINFO 5 CITY VARCHAR2 20 NULL CHAR_CS
EMPINFO 4 AGE NUMBER 22 0 3 NULL
EMPINFO 3 SICIL NUMBER 22 0 5 NULL
EMPINFO 2 LAST VARCHAR2 20 NULL CHAR_CS
6
Data Dictionary Views
The views provided by the data dictionary are divided into three groups:
The group name builds the prefix for each view name. For some views, there are
associated synonyms as given in brackets below.
USER : Tuples in the USER views contain information about objects owned by the
account performing the SQL query (current user)
7
ALL : Rows in the ALL views include rows of the USER views and all
information about objects that are accessible to the current user. The
structure of these views is analogous to the structure of the USER views.
..
8
DBA : The DBA views encompass information about all database objects,
regardless of the owner. Only users with DBA privileges can access these views.