Data Dictionary (डेटा डिक्शनरी)
“Data Dictionary” एक centralized repository होती है, जहाँ Database के सभी components — जैसे tables, attributes, indexes, relationships, views, constraints आदि — की पूरी detail रखी जाती है।
Table of Contents
Toggleसरल शब्दों में —
“Data Dictionary एक ऐसी centralized storage है, जो किसी Database के बारे में Metadata को Store करती है।”
Key Points –
यह Actual Data जैसे – Customer Name, Balance, Age को store नहीं करती। यह बताती है कि —
• Data का Format क्या है (जैसे Text, Number, Date आदि),
• उसकी Length कितनी है,
• और Access Permission किसके पास है|
Example (उदाहरण) –
मान लीजिए आपने Paytm में एक Account बनाया है। आपके बारे में Database में निम्न जानकारी है —
• Name : “Rahul Sharma”
• Mobile Number : 9876543210
• KYC Status : Verified
Data Dictionary में इन data fields का record इस तरह store होगा —
• Field Name : Name
• Data Type : VARCHAR(50)
• Length : 50 Characters
• Null Allowed : Yes
• Constraints : Must not contain Numbers
Data Dictionary एक तरह की Guidebook है, जो बताती है, कि Database में डेटा को कैसे store, define और use किया जाएगा।
Purpose of Data Dictionary (उद्देश्य)
Data Dictionary का मुख्य उद्देश्य Database को well-organized, consistent और efficient बनाए रखना होता है। इसके कुछ महत्वपूर्ण उद्देश्य हैं —
- Provide Documentation : हर data element (table, field, view, constraint आदि) की पूरी जानकारी रखता है, जिससे database की structure और design आसानी से समझी जा सके।
- Maintain Consistency : Duplicate या conflicting data entries को रोकता है, जिससे पूरे database में uniformity बनी रहे।
- Ensure Data Integrity : हर field के लिए predefined rules और constraints define करता है — जैसे data type, size, null value allowed है या नहीं।
- Assist Users & Developers : Developers को यह पता चलता है, कि कौन-सा data कहाँ stored है, और उसका format क्या है — जिससे query design और maintenance आसान हो जाती है।
- Simplify Change Management : जब database schema में कोई बदलाव किया जाता है, तो dictionary को update करके पूरे system में consistency बनाए रखी जा सकती है।
- Enhance System Understanding : नए Database Administrator या Developer को system जल्दी और सही तरीके से समझने में मदद करता है।
- Support Performance Monitoring : DBA dictionary की help से performance tuning, indexing और storage optimization कर सकता है।
Types of Data Dictionary (प्रकार)
Data Dictionary दो मुख्य प्रकार की होती है —
- Active Data Dictionary
- Passive Data Dictionary
1. Active Data Dictionary
- यह Database Management System (DBMS) के साथ automatically maintained होती है।
- Database में कोई भी change (जैसे new table बनाना या column जोड़ना) होता है, तो Data Dictionary अपने आप update हो जाती है।
- इसे Integrated Data Dictionary भी कहा जाता है।
Example : Oracle, SQL Server, PostgreSQL जैसे systems में internal data dictionary होती है, जो हर schema change पर update हो जाती है।
2. Passive Data Dictionary
- इसे manually update करना पड़ता है।
- यह DBMS से अलग होती है, यानी system के साथ direct link नहीं होता।
Example : Excel Sheet या Word Document में बनाई गई Data Dictionary।
Components of Data Dictionary (मुख्य घटक)
Data Dictionary के कुछ मुख्य components होते हैं, जो Database structure को define करते हैं :
- Data Elements – जैसे table name, field name, index name आदि।
- Data Attributes – data type, size, format, default value आदि।
- Relationships – एक table दूसरे से कैसे जुड़ा है (1:N, M:N)।
- Constraints – जैसे Primary key, Unique key, Check constraints।
- Security Information – कौन user किस data तक पहुँच सकता है।
- Usage Statistics – किस table को कितनी बार access किया गया।
- Owner/Creator Info – किसने यह table या view बनाया।
Contents of Data Dictionary
Data Dictionary के अंदर हर Database element की detailed information रखी जाती है। नीचे दी गई Table में बताया गया है, कि इसमें कौन-कौन सी जानकारी (contents) होती हैं:
Element | Description (विवरण) |
Table Name | Database में मौजूद table का नाम। |
Field Name | प्रत्येक column या attribute का नाम। |
Data Type | Field में किस प्रकार का data store होगा (जैसे INT, VARCHAR, DATE)। |
Length | Data की अधिकतम लंबाई या size। |
Default Value | अगर value नहीं दी जाती तो कौन सी value store होगी। |
Constraints | जैसे Primary Key, Foreign Key, Not Null आदि rules। |
Owner/User | कौन user या DBA ने यह object बनाया। |
Relationship Info | कौन सी table किस दूसरी table से जुड़ी है। |
Access Privileges | कौन user data को read/write कर सकता है। |
Indexes/Views | Indexes और views की जानकारी जो database performance सुधारते हैं। |
Advantages of Data Dictionary (लाभ)
- Data Consistency is Maintained : Database में data format, field names और naming conventions uniform रहते हैं, जिससे data consistent रहता है।
- Documentation is easier : हर table, attribute, relationship और constraint की detail automatically record हो जाती है, जिससे manual documentation की जरूरत नहीं पड़ती।
- Helps Database Understanding : नए Developers और Database Administrators (DBA) को database structure और design जल्दी समझ में आ जाता है।
- Controls Data Integrity : हर field के लिए predefined rules होते हैं (जैसे data type, length, constraint), जिससे invalid data entry रुकती है।
- Maintenance is Easier : किसी table या schema में change होने पर dictionary के जरिए उसे आसानी से trace और update किया जा सकता है।
- Faster Development Process : Developers को पहले से पता होता है, कि कौन-सा data कहाँ और किस format में stored है, जिससे development speed बढ़ती है।
- Better Communication Among Teams : Developers, Testers और DBAs के बीच clear understanding बनी रहती है, क्योंकि dictionary एक common reference की तरह काम करती है।
- Improved Data Quality : Data standards predefined होने से गलत, duplicate या incomplete data आसानी से detect और filter किया जा सकता है।
- Easy Error Tracing : हर field documented होने के कारण errors जल्दी trace और fix किए जा सकते हैं।
- Simplified Security Management : Dictionary यह बताती है, कि कौन-से user को किस data तक access है — जिससे unauthorized access को रोका जा सकता है।
Disadvantages of Data Dictionary (हानियाँ)
- High Maintenance Cost : Active Data Dictionary को DBMS के साथ लगातार synchronize और maintain करना पड़ता है, जिससे maintenance cost बढ़ती है।
- Increased Complexity : बड़े और enterprise-level databases में dictionary structure बहुत complex और भारी हो सकता है।
- Performance Impact : हर query execution के दौरान dictionary reference होने से database processing थोड़ा slow हो सकता है।
- Security Risk : अगर dictionary file compromise या leak हो जाए तो database का पूरा structure सामने आ सकता है।
- Manual Update Problem : Passive Data Dictionary में manual update करना पड़ता है। अगर user update करना भूल जाए, तो dictionary और actual database में mismatch हो सकता है।
- Storage Space Requirement : Dictionary को अलग से store करने के लिए extra disk space और resources चाहिए होते हैं।
- Need for Training : Non-technical users के लिए dictionary को समझना और manage करना थोड़ा कठिन हो सकता है।
Difference Between Active and Passive Data Dictionary
Basis / Point | Active Data Dictionary | Passive Data Dictionary |
Definition | यह DBMS द्वारा स्वतः update की जाती है। | इसे manually user या DBA द्वारा update करना पड़ता है। |
Maintenance | Automatic maintenance होती है। | Manual maintenance करनी पड़ती है। |
Integration with DBMS | पूरी तरह DBMS के साथ integrated रहती है। | DBMS से अलग होती है। |
Accuracy | High accuracy क्योंकि system खुद update करता है। | कम accuracy क्योंकि user भूल सकता है। |
Update Method | Database में change होने पर auto-update हो जाती है। | Database में change होने पर manually update करनी पड़ती है। |
Error Possibility | बहुत कम — automatic update के कारण। | ज़्यादा — manual update के कारण। |
Speed | Fast — क्योंकि system control में है। | Slow — manual operations की वजह से। |
Example | Oracle, MySQL, SQL Server की internal dictionary। | Excel sheets या documentation tools में बनाई गई dictionary। |
Cost | Implementation और system cost ज़्यादा। | कम लागत, क्योंकि manually maintained होती है। |
Use Case | Large-scale real-time databases में। | Educational या small documentation systems में। |





