Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
12Activity
0 of .
Results for:
No results containing your search query
P. 1
Oracle 9i Data Dictionary

Oracle 9i Data Dictionary

Ratings:

5.0

(1)
|Views: 668|Likes:
Published by api-3745527

More info:

Published by: api-3745527 on Oct 17, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Oracle 9i Data Dictionary

Oracle uses the term "Data Dictionary" for its system catalogs. Each Oracle database has its
own set of system tables and views that store information about both the physical and logical
database structure. The data dictionary objects are read-only, meaning that no database
user ever manually modifies them; however, Oracle RDBMS itself automatically updates
data in these objects in response to specific actions. For example, when userACME creates
a new object (table, view, stored procedure, etc.), adds a column or a constraint to a table,
and so forth, the appropriate data dictionary tables are updated behind the scenes at once,
and the corresponding changes are visible through the system views (discussed later in this
chapter).

Oracle's data dictionary consists of hundreds of different views and tables that logically
belong to different categories, but most of them are only of interest to the database
administrators and are beyond the scope of this book. We list only the main object groups in
the information schema and briefly describe the most common objects in each category.

Oracle data dictionary structure
Generally, the data dictionary consists of base tables and user-accessible views.

The base tables contain all database information that is dynamically updated by Oracle
RDBMS. Oracle strictly discourages using those tables even for selects; the database users
normally have no access to them, and even DBAs do not typically query these tables
directly. The information stored in the base tables is cryptic and difficult to understand.

The user-accessible views summarize and display the information stored in the base tables;
they display the information from the base tables in readable and/or simplified form using
joins, column aliases, and so on. Different Oracle users can haveSELECT privileges on
different database views.

Note
All Oracle data dictionary objects belong to a special user calledSYS. Oracle
creates public synonyms to simplify user access to these objects (see
Chapter 4). That means you do not have to, for example, refer to
SYS.DBA_TABLES with the fully qualified name; simply DBA_TABLES will do,
assuming you have appropriate privileges to access the view.

The data dictionary views, in turn, consist of static and dynamic views. The name "static"
denotes that the information in this group of views only changes when a change is made to
the data dictionary (a column is added to a table, a new database user is created, etc.). The
dynamic views are constantly updated while a database is in use; their contents relate
primarily to performance and are not relevant to this book.

Note
The dynamic data dictionary views can be distinguished by the prefixV_$,
and the public synonyms for these views start withV$.
The static views can be divided into three groups. The views in each group are prefixed
USER_, ALL_, or DBA_, as shown in Table 13-2.
Table 13-2: Static View Prefixes
Prefix
Scope
USER
User's view (objects in the user's schema).
Table 13-2: Static View Prefixes
Prefix
Scope
ALL
Expanded user's view (all objects that the user can access).
DBA
Database administrator's view (all objects in all users' schemas).
The set of columns is almost identical across views, that is,USER_TABLES,ALL_TABLES,
andDBA_TABLES have the same columns, exceptUSER_TABLES does not have column
OWNER (which is unnecessary because that view only has information about tables that
belong to the user who queries the view).
Table 13-3 contains information about the most commonly used static views.
Table 13-3: Selected Oracle Data Dictionary views
Data Dictionary View
Contains Information About:
ALL_ALL_TABLES
All object and relational tables accessible to the user.
ALL_CATALOG
All tables, views, synonyms, sequences accessible to the user.
ALL_COL_PRIVS
Grants on columns accessible by the user.
ALL_CONSTRAINTS
Constraint definitions on accessible tables.
ALL_CONS_COLUMNS
Information about columns in constraint definitions accessible
by the user.
ALL_DB_LINKS
Database links accessible to the user.
ALL_INDEXES
Indexes on tables accessible to the user.
ALL_OBJECTS
All objects accessible to the user.
ALL_SEQUENCES
Database sequences accessible to the user.
ALL_SYNONYMS
All synonyms accessible to the user.
ALL_TABLES
Relational tables accessible to the user.
ALL_TAB_COLUMNS
Columns of tables, views, and clusters accessible to the user.
ALL_TRIGGERS
Triggers accessible to the current user.
ALL_USERS
Information about all users of the database visible to the current
user.
ALL_VIEWS
Views accessible to the user.
DBA_ALL_TABLES
All object and relational tables in the database.
DBA_CATALOG
All database tables, views, synonyms, and sequences.
DBA_COL_PRIVS
All grants on columns in the database.
DBA_CONSTRAINTS
Constraint definitions on all tables.
DBA_CONS_COLUMNS
Information about all columns in constraint definitions in the
database.
Table 13-3: Selected Oracle Data Dictionary views
Data Dictionary View
Contains Information About:
DBA_DB_LINKS
All database links in the database.
DBA_INDEXES
All indexes in the database.
DBA_OBJECTS
All database objects.
DBA_SEQUENCES
All sequences in the database.
DBA_SYNONYMS
All synonyms in the database.
DBA_TABLES
All relational tables in the database.
DBA_TAB_COLUMNS
Description of columns of all tables, views, and clusters in the
database.
DBA_TRIGGERS
All triggers in the database.
DBA_USERS
Information about all users of the database.
DBA_VIEWS
All views in the database.
USER_ALL_TABLES
All object and relational tables owned by the user.
USER_CATALOG
Tables, views, synonyms, and sequences owned by the user.
USER_COL_PRIVS
Grants on columns for which the user is the owner, grantor, or
grantee.
USER_CONSTRAINTS
Constraint definitions on user's own tables.
USER_CONS_COLUMNS
Information about columns in constraint definitions owned by the
user.
USER_DB_LINKS
Database links owned by the user.
USER_INDEXES
The user's own indexes.
USER_OBJECTS
Objects owned by the user.
USER_SEQUENCES
The user's own database sequences.
USER_SYNONYMS
The user's private synonyms.
USER_TABLES
The user's own relational tables.
USER_TAB_COLUMNS
Columns of user's tables, views, and clusters.
USER_TRIGGERS
Triggers owned by the user.
USER_USERS
Information about the current user.
USER_VIEWS
The user's own views.
The select privilege forUSER_ andALL_ views (as well as for selectedV$ views) is granted
toPUBLIC by default;DBA_ views are visible to privileged users only.
Oracle data dictionary and SQL99 standards

Activity (12)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Devesh Bhole liked this
tram24 liked this
jaganj liked this
vithajohn liked this
srikanthsree liked this
Nathan_Tick_8110 liked this
psinghdba liked this
thescribe41 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->