DBMS Keys in Hindi – Types of Keys with Examples
Database Management System (DBMS) को समझने के लिए keys का concept सबसे ज्यादा जरूरी है। Keys वो तरीके हैं जिनसे हम किसी table (टेबल) के records को uniquely identify कर सकते हैं और अलग-अलग tables के बीच relation बना सकते हैं।
अगर आप DBMS सीख रहे हैं या competitive exam की तैयारी कर रहे हैं तो DBMS Keys का clear concept आपके लिए बहुत उपयोगी होगा। इस आर्टिकल में हम DBMS Keys के types, उनकी परिभाषा (definition), examples और use को आसान Hinglish भाषा में समझेंगे।
DBMS Keys क्या हैं? – DBMS Keys in Hindi
DBMS Keys वो constraints या rules होते हैं जो database में records को uniquely identify करने, data consistency बनाए रखने और tables के बीच relation बनाने का काम करते हैं।
Types of Keys in DBMS
Relational Database (RDBMS) में कई तरह की keys होती हैं। आइए उन्हें एक-एक करके समझते हैं:
1. Primary Key
Primary Key किसी भी table के प्रत्येक record को uniquely identify करने का काम करती है।
- Primary key कभी null नहीं हो सकती।
- इसमें duplicate values allow नहीं होतीं।
- किसी भी table में केवल एक ही primary key हो सकती है।
Primary Key के Types:
Simple Primary Key – जब primary key सिर्फ एक column (field) से बनी हो।
Simple Primary Key Example: Customer_ID column
Composite Primary Key – जब primary key एक से ज्यादा columns से मिलकर बने।
composite primary key Example: (Suit + Value) का combination
Rules of Primary Key:
- हमेशा unique value होनी चाहिए।
- Null value contain नहीं कर सकती।
- एक table में सिर्फ एक primary key होती है।
- Composite primary key में maximum 16 columns तक हो सकते हैं।
2. Foreign Key
Foreign Key किसी table में columns का group होता है जो दूसरे table की primary key को reference करता है।

- इसे referencing key भी कहते हैं।
- इसका use दो tables के बीच relation बनाने के लिए किया जाता है।
- Example: अगर Student table में Roll_Number primary key है और Marks table में वही Roll_Number foreign key है तो दोनों tables link हो जाते हैं।
3. Composite Key
Composite Key तब बनती है जब किसी table में record को uniquely identify करने के लिए एक से ज्यादा attributes (columns) का use किया जाता है।

- Example: Student_ID + Subject_Code मिलकर हर record को uniquely पहचान सकते हैं।
4. Artificial Key
जब किसी table में natural primary key available नहीं होती या बहुत complex होती है, तब system automatically एक artificial key generate करता है।
- इसे surrogate key भी कहते हैं।
- Example: Auto-generated customer number (CUST001, CUST002 …)।
5. Super Key
Super Key वो combination होता है जिसमें एक या एक से ज्यादा columns मिलकर record को uniquely identify करते हैं।
- हर primary key एक super key होती है, लेकिन हर super key primary key नहीं होती।
- Example: (Customer_ID), (Customer_ID + Name) दोनों super keys हो सकते हैं।
6. Candidate Key
Candidate Key वो keys होती हैं जो primary key बनने के लिए candidate (उम्मीदवार) हो सकती हैं।
- Table में एक से ज्यादा candidate keys हो सकती हैं।
- इनमें से किसी एक को primary key चुना जाता है।
- Example: Student table में Roll_Number और Aadhar_Number दोनों candidate keys हो सकते हैं, लेकिन primary key सिर्फ एक बनेगी।
Keys के बीच संबंध (Relationship Between Keys)
- Primary Key → किसी table को uniquely identify करने के लिए चुनी गई key।
- Candidate Key → Primary Key बनने के लिए eligible keys।
- Super Key → Candidate Key + Extra columns वाला set।
- Foreign Key → किसी दूसरे table की primary key का reference।
- Composite Key → Multiple columns से बनी primary key।
- Artificial Key → System generated key।
इन्हें भी पढ़े –
- DBMS क्या है DBMS के प्रकार और कार्य की पूरी जानकारी | DBMS In Hindi
- डेटाबेस यूजर्स क्या है?
- डेटा इंडिपेंडेंस क्या है
- DBMS के लाभ
- Characteristics Of DBMS In Hindi
- डेटा मॉडल क्या है?
- डेटाबेस स्कीमा क्या है
- इंस्टैंस क्या है
- डेटाबेस इंटरफ़ेस क्या है
- डेटाबेस लैंग्वेज क्या है
- Classification of DBMS in Hindi
- Entity Set in DBMS
- DBMS Architecture in Hindi
- Types of Data Models in Hindi
- Attributes in DBMS in Hindi
- Entity Set in DBMS (Hindi)
- Entity Types in DBMS (Hindi)
- Types of Attributes in DBMS
- ER Model in DBMS (E-R मॉडल) क्या है?
- Entities के बीच संबंध
- Domain in DBMS
- Tuples in DBMS
- SQL में Joins क्या हैं?
- Primary Key in DBMS
निष्कर्ष (Conclusion)
DBMS Keys database की backbone हैं। ये न सिर्फ data को uniquely identify करती हैं बल्कि data integrity और consistency बनाए रखने में भी मदद करती हैं। Primary key से लेकर foreign key और candidate key तक, हर key का database design में अलग महत्व है।
अगर आप DBMS को strong करना चाहते हैं तो Keys को अच्छे से समझना जरूरी है क्योंकि ये हर database system की नींव (foundation) होती हैं।