![]() |
In a Relational Database Management System (RDBMS), a data dictionary is a collection of READ-ONLY tables and views that contain metadata about the database. It typically contains data about all users in the system, their assigned roles and privileges, database objects, their structure, relationship, integrity constraints, default values and storage space details, auditing information, and many more. Since, it is READ-ONLY mode, only SELECT operation can be done on tables in the Data Dictionary. Oracle Data Dictionary StructureOracle DBMS’s data dictionary is comprised of 2 types of objects:
Both these tables and views are owned by SYS. No user should edit it as it can adversely affect the database. Uses of Data DictionaryThe Oracle engine accesses this data dictionary whenever a DDL statement is evaluated. It is essential for any database to function. Its uses include Database administration, Query Optimization, Metadata management, Security and access control, and much more. User Accessible ViewsLet’s see how DBMS users can use these Data Dictionary views.
USER ViewsThe views with the prefix USER generally refer to views that contain data about a particular user’s own object, which includes data about objects created by that user, grants made by that user, and so on. It is generally a subset of ALL_views. It has only data related to the user and has columns similar to other views. Examples:Some Common Views with the prefix USER are: USER_OBJECTS - view that contains data about all objects Example Query To Access the ViewsQuery to print all the objects (name and type) in a user’s scheme Syntax:
Query to print all the data about all Tables owned by the user: SELECT * FROM user_tables;
ALL ViewsViews with the prefix ALL are views that contain data about not only objects owned by the user but also objects with access via public or explicit grants of privileges or roles. Examples:Some Common Views with the prefix ALL are: ALL_OBJECTS - views that contains data about all objects (tables, views, indexes, procedures, etc..) in the database Example: Query to print all the objects (name and type) to which the user has access: SELECT owner, object_name, object_type FROM all_objects;
Query to print all the data about all Tables to which the user has access: SELECT * FROM all_views;
DBA ViewsViews with the prefix DBA are views that are generally accessed only by the Database Administrators or any user who has got the system privilege SELECT ANY TABLE. It will have access to the OWNER column as well. The prefix is generally SYS followed by the table name. The views are similar to the ALL and USER views Example: Query to print all the objects (name and type) in the DataBase: SELECT owner, object_name, object_type FROM sys.dba_objects;
FAQs on Data Dictionary Tables in RDMS1. How can you ensure the data dictionary tables themselves remain consistent and accurate over time, especially in large, dynamic databases?
2. In a distributed database environment, how do you manage the data dictionary tables to ensure synchronization and coherence across different nodes or instances?
3. What are the potential security risks associated with data dictionary tables, and how can these risks be mitigated?
4. How do you handle versioning and historical data in data dictionary tables, especially when schema changes occur frequently?
|
Reffered: https://www.geeksforgeeks.org
DBMS |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |