Data Dictionary in DBMS

Data Dictionary : 

A data dictionary is a centralized repository of information about data such as meaning, relationships to other data, origin, usage, and format. A data dictionary is a file or a set of files that contains a database's metadata. The data dictionary contains records about other objects in the database, such as data ownership, data relationships to other objects, and other data. The data dictionary is a crucial component of any relational database. Ironically, because of its importance, it is invisible to most database users. Typically, only database administrators interact with the data dictionary. In a relational database, the metadata in the data dictionary includes the following:

a. Names of all tables in the database and their owners
b. Names of all indexes and the columns to which the tables in those indexes relate 
c. Constraints defined on tables, including primary keys, foreign-key relationships to      
    other tables, and not-null constraints

For most relational database management systems (RDBMS), the database management system software needs the data dictionary to access the data within a database. For example, the Oracle DB software has to read and write to an Oracle DB.

Types of Data Dictionary:

There are two types of data dictionary – Active and Passive.

1. Active Data Dictionary : An active data dictionary (also called integrated data dictionary) is managed automatically by the database management software. Consistent with the current structure and definition of the database. Most of the relational database management systems contain active data dictionaries that can be derived from their system catalog. Hence there will not be any mismatch between the actual structure and the data dictionary details. Such data dictionary is called active data dictionary.

2. Passive data Dictionary :  In some of the databases, data dictionary is created separately from the current database as entirely new database to store only data dictionary information. Sometimes it is stored as xml, excels or in any other file format. In such case, an effort is required to keep data dictionary in sync with the database objects. This kind of data dictionary is called passive data dictionary. In this case, there is a chance of mismatch with the database objects and the data dictionary. This kind of DD has to be handled with utmost care.

No comments:

Post a Comment