What is the role of data dictionary?

What is the role of data dictionary?

If an Oracle Database were a massive, high-tech city, the Data Dictionary would be the central records office. It’s where the city keeps the blueprints for every building, the lists of every citizen, and the permissions for who is allowed to enter which room.

The Data Dictionary is the most critical set of tables in the database. In fact, Oracle couldn't even "find itself" without it.


1. What is the Data Dictionary?

The Data Dictionary is a collection of read-only tables and views that provide "data about the data" (metadata). It describes how the database is structured and how it operates.

  • Where it lives: It is physically stored in the SYSTEM and SYSAUX tablespaces.

  • Who owns it: It is owned by the user SYS.

  • How it’s maintained: You never update it manually. Oracle automatically updates the Data Dictionary every time you run a DDL command (like CREATE TABLE or ALTER USER).


2. What Information Does it Hold?

The Data Dictionary keeps track of everything "under the hood." Its role includes:

  • Object Definitions: The names, types, and locations of all tables, indexes, views, and procedures.

  • Space Allocation: How much space is being used by a table and how much is still free in a tablespace.

  • Security & Permissions: Who are the users? What roles do they have? Who has the right to delete rows from the "Salaries" table?

  • Integrity Constraints: The rules of the data, such as Primary Keys, Foreign Keys, and "Not Null" requirements.


3. How Users Access It: The Three Levels

Because the base tables (like TAB$) are cryptic and dangerous to touch, Oracle provides Views that make the data human-readable. These views follow a specific naming convention:

View PrefixScope of InformationWho can see it?
USER_Objects owned by the current user.Every user.
ALL_Objects the user has permission to see (even if they don't own them).Every user.
DBA_Everything in the entire database.Only Administrators.

Example: To see your own tables, you query USER_TABLES. To see every table in the database, a DBA queries DBA_TABLES.


4. The Data Dictionary Cache (In Memory)

The Data Dictionary is so frequently accessed that Oracle keeps a special "fast-track" copy of it in the SGA, specifically within the Shared Pool. This is called the Data Dictionary Cache (or Row Cache).

When you run a query like SELECT * FROM employees, Oracle immediately hits the cache to ask:

  1. Does the table "employees" actually exist?

  2. Does this user have permission to see it?

  3. Which data files hold the blocks for this table?

If this information wasn't cached in memory, every single query would be slowed down by "metadata" searches on the disk.


5. Static Views vs. Dynamic Performance Views

It's important to distinguish the Data Dictionary from the Dynamic Performance Views (the V$ views):

  • Data Dictionary (DBA_, USER_): Stores "static" information about the database structure. It survives a reboot.

  • Dynamic Views (V$, GV$): Stores "live" information about what is happening right now (like current memory usage or active sessions). These views are cleared when the instance shuts down.


Pro-Tip: The "Dictionary" of the Dictionary

If you ever forget the name of a view, you can query the Data Dictionary's own index! Just run:

SQL
SELECT * FROM DICTIONARY WHERE table_name LIKE '%INDEXES%';

This will show you every view available that relates to indexes.

Looking for servers Rental ?

Call Our Expert :


  • (call for rental enquiries)

Email us :