DBMS — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye.

📚 2982 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
2982 questions

Question 1486

EN + हिं Easy
GB In relation R(A,B,C,D,E) with F={A to BC, CD to E, B to D, E to A} what is the attribute closure of E?
IN संबंध R(A,B,C,D,E) के साथ F={A से BC, CD से E, B से D, E से A} में E का गुण समापन क्या है?
E+ = EAB only केवल E+ = EAB
E+ = EA only केवल ई+ = ईए
E+ = EABCD by E to A to BC to D and CD to E (already have E): E determines all attributes in the relation ई+ = ईएबीसीडी ई से ए से बीसी से डी और सीडी से ई (पहले से ही ई है): ई संबंध में सभी विशेषताओं को निर्धारित करता है
E+ = E ई+ = ई
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) E+: Start E. E to A: EA. A to BC: EABC. B to D: EABCD. CD to E: already have E. E+ = ABCDE = all attributes. E is a candidate key.
व्याख्या (हिन्दी) ई+: ई प्रारंभ करें। ई से ए: ईए। ए से बीसी: ईएबीसी। बी से डी: ईएबीसीडी। सीडी से ई: पहले से ही ई है। ई+ = एबीसीडीई = सभी विशेषताएं। ई एक उम्मीदवार कुंजी है.
🎯 Exam Perspective
DBMS के इस प्रश्न को — difficulty level "Easy" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 1487

EN + हिं Easy
GB What is the Armstrong completeness theorem?
IN आर्मस्ट्रांग पूर्णता प्रमेय क्या है?
Armstrongs axioms only work for single-attribute FDs आर्मस्ट्रांग के सिद्धांत केवल एकल-विशेषता एफडी के लिए काम करते हैं
Armstrongs axioms are both sound (only derive valid FDs) and complete (can derive ALL valid FDs) meaning F+ computed by Armstrong axioms exactly equals the set of all FDs logically implied by F आर्मस्ट्रांग के अभिगृहीत ध्वनि (केवल वैध एफडी प्राप्त करते हैं) और पूर्ण (सभी वैध एफडी प्राप्त कर सकते हैं) दोनों हैं, जिसका अर्थ है कि आर्मस्ट्रांग अभिगृहीत द्वारा गणना की गई एफ+ तार्किक रूप से एफ द्वारा निहित सभी एफडी के सेट के बराबर है।
Armstrongs axioms can derive more FDs than actually hold आर्मस्ट्रांग के सिद्धांत वास्तव में पकड़ से अधिक एफडी प्राप्त कर सकते हैं
Armstrongs axioms are incomplete for relations with more than 10 attributes 10 से अधिक विशेषताओं वाले संबंधों के लिए आर्मस्ट्रांग के सिद्धांत अधूरे हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Armstrong completeness theorem: for any set of FDs F, the set of FDs derivable by Armstrong axioms equals F+ (all FDs logically implied by F). Sound: axioms never derive invalid FDs. Complete: axioms can derive ALL valid FDs. This makes Armstrong axioms the definitive basis for FD reasoning.
व्याख्या (हिन्दी) आर्मस्ट्रांग पूर्णता प्रमेय: एफडी एफ के किसी भी सेट के लिए, आर्मस्ट्रांग सिद्धांतों द्वारा व्युत्पन्न एफडी का सेट एफ+ के बराबर होता है (सभी एफडी तार्किक रूप से एफ द्वारा निहित हैं)। ध्वनि: सिद्धांत कभी भी अमान्य एफडी प्राप्त नहीं करते हैं। पूर्ण: सिद्धांत सभी वैध एफडी प्राप्त कर सकते हैं। यह आर्मस्ट्रांग के सिद्धांतों को एफडी तर्क के लिए निश्चित आधार बनाता है।
🎯 Exam Perspective
यह सवाल DBMS category का है — difficulty level "Easy", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 1488

EN + हिं Medium
GB What is the difference between a FD X to Y being satisfied by a relation instance vs being implied by a set of FDs?
IN एफडी एक्स से वाई के संबंध उदाहरण से संतुष्ट होने बनाम एफडी के एक सेट द्वारा निहित होने के बीच क्या अंतर है?
Satisfied by an instance: this specific relation instance happens to have X to Y hold (extensional). Implied by a set F: X to Y holds in EVERY possible instance that satisfies F (intensional) - a much stronger condition capturing the semantics of the schema एक उदाहरण से संतुष्ट: इस विशिष्ट संबंध उदाहरण में एक्स से वाई होल्ड (एक्सटेंशनल) होता है। एक सेट F द्वारा निहित:
They are identical concepts वे समान अवधारणाएँ हैं
Satisfied means X to Y is stored; implied means it is computed संतुष्ट का मतलब है कि एक्स से वाई संग्रहीत है; निहित का अर्थ है कि इसकी गणना की गई है
Implied by F means X to Y is in the FD set F explicitly एफ द्वारा निहित का मतलब है कि एक्स से वाई स्पष्ट रूप से एफडी सेट एफ में है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Extensional (instance-level): X to Y holds in this specific instance r of R. Intensional (schema-level): X to Y is implied by F meaning X to Y is in F+, holds in every valid instance. Schema design uses intensional FDs (what must always hold) not extensional (what happens to hold now).
व्याख्या (हिन्दी) एक्सटेंशनल (उदाहरण-स्तर): स्कीमा डिज़ाइन इंटेंशियल एफडी (जो हमेशा धारण करना चाहिए) का उपयोग करता है न कि एक्सटेंशनल (अब जो धारण करने के लिए होता है) का उपयोग करता है।
🎯 Exam Perspective
यह प्रश्न DBMS की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 1489

EN + हिं Easy
GB Given the FDs F={A to B, B to C, C to D, D to A} what is the canonical cover Fc?
IN एफडी एफ = {ए से बी, बी से सी, सी से डी, डी से ए} को देखते हुए कैनोनिकल कवर एफसी क्या है?
Fc = A to B, B to C, C to D, D to A - each FD is individually necessary (no FD is derivable from the others) since removing any one breaks the cycle एफसी = ए से बी, बी से सी, सी से डी, डी से ए - प्रत्येक एफडी व्यक्तिगत रूप से आवश्यक है (कोई एफडी दूसरों से व्युत्पन्न नहीं है) क्योंकि किसी एक को हटाने से चक्र टूट जाता है
Fc has 1 FD एफसी के पास 1 एफडी है
Fc has 4 FDs (same as F) एफसी के पास 4 एफडी हैं (एफ के समान)
Fc has 2 FDs एफसी के पास 2 एफडी हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Check each FD for redundancy: Remove A to B: Without it, start with A. Apply B to C, C to D, D to A (but cannot derive B from just A). A+ = A. Cannot derive B. So A to B is not redundant. Similarly each FD is individually necessary. Fc = A to B, B to C, C to D, D to A with 4 FDs.
व्याख्या (हिन्दी) अतिरेक के लिए प्रत्येक एफडी की जांच करें: ए से बी हटाएं: इसके बिना, ए से शुरू करें। बी से सी, सी से डी, डी से ए लागू करें (लेकिन सिर्फ ए से बी नहीं निकाला जा सकता)। A+ = A. B की व्युत्पत्ति नहीं की जा सकती। अतः A से B निरर्थक नहीं है। इसी प्रकार प्रत्येक एफडी व्यक्तिगत रूप से आवश्यक है। एफसी = ए से बी, बी से सी, सी से डी, डी से ए 4 एफडी के साथ।
🎯 Exam Perspective
DBMS से जुड़ा यह सवाल — difficulty level "Easy" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 1490

EN + हिं Medium
GB What is an independent set of FDs and why is it important?
IN एफडी का एक स्वतंत्र सेट क्या है और यह महत्वपूर्ण क्यों है?
A set of FDs with no relationships between them एफडी का एक सेट जिनके बीच कोई संबंध नहीं है
A set of FDs involving only independent attributes एफडी का एक सेट जिसमें केवल स्वतंत्र विशेषताएं शामिल हैं
A set of FDs where none of them can be derived from the others - important because it means each FD adds genuine new information about the schema and removing any one would change the closure F+ एफडी का एक सेट जहां उनमें से कोई भी दूसरे से प्राप्त नहीं किया जा सकता है - महत्वपूर्ण है क्योंकि इसका मतलब है कि प्रत्येक एफडी स्कीमा के बारे में वास्तविक नई जानकारी जोड़ता है और किसी एक को हटाने से क्लोजर एफ+ बदल जाएगा
A set of FDs used in database independence testing डेटाबेस स्वतंत्रता परीक्षण में उपयोग की जाने वाली एफडी का एक सेट
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Independent FDs: no FD in the set is derivable from the others. If F = A to B, B to C, A to C: then A to C is not independent (derivable from A to B and B to C). Independent sets are closely related to minimal covers - a minimal cover is an independent set of singleton-RHS FDs equivalent to the original F.
व्याख्या (हिन्दी) स्वतंत्र एफडी: सेट में कोई भी एफडी दूसरों से व्युत्पन्न नहीं है। यदि एफ = ए से बी, बी से सी, ए से सी: तो ए से सी स्वतंत्र नहीं है (ए से बी और बी से सी तक व्युत्पन्न)। स्वतंत्र सेट न्यूनतम कवर से निकटता से संबंधित हैं - एक न्यूनतम कवर मूल एफ के बराबर सिंगलटन-आरएचएस एफडी का एक स्वतंत्र सेट है।
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में DBMS से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 1491

EN + हिं Hard
GB What is the key lemma used to prove that Armstrongs axioms are sound?
IN यह सिद्ध करने के लिए कि आर्मस्ट्रांग के अभिगृहीत सही हैं, मुख्य प्रमेयिका क्या है?
That Armstrong axioms always derive new FDs आर्मस्ट्रांग के सिद्धांत हमेशा नई एफडी प्राप्त करते हैं
For soundness: Reflexivity holds trivially by definition. Augmentation: if t1[X]=t2[X] then t1[XZ]=t2[XZ] which implies t1[Y]=t2[Y] gives t1[YZ]=t2[YZ]. Transitivity: if t1[X]=t2[X] implies t1[Y]=t2[Y] and t1[Y]=t2[Y] implies t1[Z]=t2[Z] then t1[X]=t2[X] implies t1[Z]=t2[Z] सुदृढ़ता के लिए: रिफ्लेक्सिविटी परिभाषा के अनुसार तुच्छ है। वृद्धि: यदि t1[X]=t2[X] तो t1[XZ]=t2[XZ] जिसका अर्थ है t1[Y]=t2[Y] देता है t1[YZ]=t2[YZ]। परिवर्तनशीलता: यदि t1[X]=t2[X] का अर्थ है t1[Y]=t2[Y] और t1[Y]=t2[Y] का अर्थ है t1[Z]=t2[Z] तो t1[X]=t2[X] का अर्थ है t1[Z]=t2[Z]
That all FDs are trivially satisfied कि सभी एफडी तुच्छ रूप से संतुष्ट हैं
That the axioms form a minimal set कि अभिगृहीत एक न्यूनतम समुच्चय बनाते हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Soundness proof (each axiom preserves validity in all relation instances): Reflexivity: Y subset of X means t1[X]=t2[X] immediately implies t1[Y]=t2[Y]. Augmentation: t1[XZ]=t2[XZ] means t1[X]=t2[X] and t1[Z]=t2[Z]. So t1[Y]=t2[Y] and t1[Z]=t2[Z] giving t1[YZ]=t2[YZ]. Transitivity: straightforward chain.
व्याख्या (हिन्दी) सुदृढ़ता प्रमाण (प्रत्येक स्वयंसिद्ध सभी संबंध उदाहरणों में वैधता बरकरार रखता है): रिफ्लेक्सिविटी: संवर्द्धन: t1[XZ]=t2[XZ] का अर्थ है t1[X]=t2[X] और t1[Z]=t2[Z]। तो t1[Y]=t2[Y] और t1[Z]=t2[Z] दे रहे हैं t1[YZ]=t2[YZ]। परिवर्तनशीलता: सीधी श्रृंखला।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो DBMS का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Hard"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 1492

EN + हिं Medium
GB What is the chase algorithm used for in relational theory?
IN संबंधपरक सिद्धांत में चेज़ एल्गोरिदम का उपयोग किस लिए किया जाता है?
Optimizing SQL query execution plans SQL क्वेरी निष्पादन योजनाओं का अनुकूलन
Testing whether a decomposition has the lossless join property and whether functional dependencies are preserved by applying FDs to a canonical table (tableau) परीक्षण करना कि क्या अपघटन में दोषरहित जुड़ाव गुण है और क्या विहित तालिका (झांकी) में एफडी लगाने से कार्यात्मक निर्भरताएं संरक्षित हैं
Computing the closure of attribute sets विशेषता सेटों को बंद करने की गणना करना
Detecting deadlocks in concurrent transactions समवर्ती लेनदेन में गतिरोध का पता लगाना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Chase procedure: starts with a tableau (one row per decomposed relation, with variables for unknown values). Applies FDs to equate variables. Lossless join: chase produces a row with all constants. FD preservation: check if original FDs hold on projected schemas.
व्याख्या (हिन्दी) पीछा करने की प्रक्रिया: एक झांकी से शुरू होती है (प्रति विघटित संबंध में एक पंक्ति, अज्ञात मानों के लिए चर के साथ)। चरों को समान करने के लिए एफडी लागू करता है। दोषरहित जुड़ाव: चेज़ सभी स्थिरांकों के साथ एक पंक्ति उत्पन्न करता है। एफडी संरक्षण: जांचें कि क्या मूल एफडी अनुमानित स्कीमा पर कायम हैं।
🎯 Exam Perspective
DBMS के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 1493

EN + हिं Easy
GB What is the concept of dependency basis in the context of MVDs?
IN एमवीडी के संदर्भ में निर्भरता आधार की अवधारणा क्या है?
A set of FDs that implies all MVDs in the relation एफडी का एक सेट जो संबंध में सभी एमवीडी को दर्शाता है
A collection of all FDs derivable from MVDs एमवीडी से प्राप्त सभी एफडी का संग्रह
For a set of attributes X the dependency basis is the finest partition of (R-X) such that X multidetermines each block; this partitions the other attributes into independent groups that X independently multidetermines विशेषताओं के एक सेट X के लिए निर्भरता का आधार (R-X) का सबसे अच्छा विभाजन है, जैसे कि यह अन्य विशेषताओं को स्वतंत्र समूहों में विभाजित करता है जिन्हें X स्वतंत्र रूप से बहु-निर्धारित करता है
The set of all attributes that appear in MVD left-hand sides एमवीडी में बाईं ओर दिखाई देने वाली सभी विशेषताओं का सेट
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) For MVDs, the dependency basis for X is the finest partition of (R-X) such that X multidetermines each block. This partitions the other attributes into independent groups. Computing it is more complex than FD closure because MVDs interact with each other through union, intersection, difference, and transitivity rules.
व्याख्या (हिन्दी) एमवीडी के लिए, एक्स के लिए निर्भरता का आधार (आर-एक्स) का सबसे अच्छा विभाजन है, जैसे कि एक्स प्रत्येक ब्लॉक को बहुनिर्धारित करता है। यह अन्य विशेषताओं को स्वतंत्र समूहों में विभाजित करता है। इसकी गणना करना एफडी क्लोजर से अधिक जटिल है क्योंकि एमवीडी संघ, प्रतिच्छेदन, अंतर और परिवर्तनशीलता नियमों के माध्यम से एक दूसरे के साथ बातचीत करते हैं।
🎯 Exam Perspective
यह सवाल DBMS category का है — difficulty level "Easy", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 1494

EN + हिं Easy
GB What is the correct logical execution order of SQL clauses in a SELECT statement?
IN SELECT स्टेटमेंट में SQL क्लॉज का सही तार्किक निष्पादन क्रम क्या है?
WHERE FROM SELECT GROUP BY HAVING ORDER BY जहां से ऑर्डर लेकर चुनिंदा ग्रुप से
SELECT WHERE FROM HAVING GROUP BY ORDER BY ऑर्डर के अनुसार समूह से कहां का चयन करें
FROM WHERE GROUP BY HAVING SELECT ORDER BY LIMIT जहां से लिमिट के अनुसार ऑर्डर का चयन करके ग्रुप बनाएं
SELECT FROM WHERE GROUP BY HAVING ORDER BY ऑर्डर देकर कहां से ग्रुप चुनें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Logical SQL execution order: FROM (get tables/joins) -> WHERE (filter rows) -> GROUP BY (group rows) -> HAVING (filter groups) -> SELECT (compute output columns) -> ORDER BY (sort) -> LIMIT/OFFSET (paginate).
व्याख्या (हिन्दी) तार्किक एसक्यूएल निष्पादन क्रम: FROM (टेबल/जॉइन प्राप्त करें) -> कहां (फ़िल्टर पंक्तियाँ) -> ग्रुप बाय (समूह पंक्तियाँ) -> हैविंग (फ़िल्टर समूह) -> चयन करें (आउटपुट कॉलम की गणना करें) -> ऑर्डर बाय (सॉर्ट) -> लिमिट/ऑफ़सेट (पेजिनेट)।
🎯 Exam Perspective
यह प्रश्न DBMS की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Easy"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 1495

EN + हिं Medium
GB What is the difference between WHERE and HAVING clauses in SQL?
IN SQL में WHERE और HAVING क्लॉज के बीच क्या अंतर है?
They are identical वे समान हैं
WHERE applies to all tables; HAVING applies only to subqueries WHERE सभी तालिकाओं पर लागू होता है; HAVING केवल उपश्रेणियों पर लागू होता है
WHERE filters individual rows BEFORE grouping; HAVING filters groups AFTER GROUP BY and aggregation - HAVING can reference aggregate functions, WHERE cannot जहां समूहीकरण से पहले अलग-अलग पंक्तियों को फ़िल्टर किया जाता है; GROUP BY और एकत्रीकरण के बाद फिल्टर समूहों का होना - HAVING समग्र कार्यों का संदर्भ दे सकता है, जबकि नहीं
WHERE works with aggregate functions; HAVING does not जहां समग्र कार्यों के साथ काम करता है; होना नहीं है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) WHERE: applied before GROUP BY, filters individual rows based on non-aggregated conditions. HAVING: applied after GROUP BY, filters groups based on aggregate function results (COUNT, SUM, AVG, etc.). You CANNOT use aggregate functions in WHERE.
व्याख्या (हिन्दी) कहां: ग्रुप बाय से पहले लागू किया गया, गैर-एकत्रित स्थितियों के आधार पर अलग-अलग पंक्तियों को फ़िल्टर करता है। HAVING: ग्रुप BY के बाद लागू किया गया, समग्र फ़ंक्शन परिणामों (COUNT, SUM, AVG, आदि) के आधार पर समूहों को फ़िल्टर करता है। आप WHERE में समग्र फ़ंक्शंस का उपयोग नहीं कर सकते।
🎯 Exam Perspective
DBMS से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 1496

EN + हिं Easy
GB What does the SQL clause NULLIF(expr1, expr2) return?
IN SQL क्लॉज NULLIF(expr1, expr2) क्या लौटाता है?
NULL if expr1 is NULL यदि expr1 शून्य है तो शून्य
0 if either expression is NULL 0 यदि कोई भी अभिव्यक्ति शून्य है
expr2 if expr1 is NULL expr2 यदि expr1 शून्य है
NULL if expr1 equals expr2 (returns expr1 otherwise); used to avoid division-by-zero errors: NULLIF(count, 0) returns NULL instead of causing error when count=0 शून्य यदि expr1, expr2 के बराबर है (अन्यथा expr1 लौटाता है); विभाजन-दर-शून्य त्रुटियों से बचने के लिए उपयोग किया जाता है: NULLIF (गिनती, 0) गिनती = 0 होने पर त्रुटि उत्पन्न करने के बजाय NULL लौटाता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) NULLIF(x, y): returns NULL if x=y, otherwise returns x. Common pattern: NULLIF(denominator, 0) to avoid division by zero - if denominator is 0, returns NULL (NULL/anything = NULL, no error). Inverse of COALESCE.
व्याख्या (हिन्दी) NULLIF(x, y): यदि x=y है तो NULL लौटाता है, अन्यथा x लौटाता है। सामान्य पैटर्न: शून्य से विभाजन से बचने के लिए NULLIF( हर, 0) - यदि हर 0 है, तो शून्य लौटाता है (शून्य/कुछ भी = शून्य, कोई त्रुटि नहीं)। COALESCE का उलटा.
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में DBMS से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 1497

EN + हिं Easy
GB What is the behavior of aggregate functions (SUM, AVG, COUNT, MAX, MIN) with respect to NULL values?
IN NULL मानों के संबंध में समग्र कार्यों (SUM, AVG, COUNT, MAX, MIN) का व्यवहार क्या है?
All aggregate functions include NULL as 0 सभी समग्र कार्यों में NULL को 0 के रूप में शामिल किया गया है
Aggregate functions (except COUNT(*)) IGNORE NULL values - COUNT(*) counts all rows including NULLs; COUNT(column) counts only non-NULL values समग्र कार्य (COUNT(*) को छोड़कर) शून्य मानों को अनदेखा करें - COUNT(*) NULL सहित सभी पंक्तियों को गिनता है; COUNT(कॉलम) केवल गैर-शून्य मानों की गणना करता है
Aggregate functions treat NULL as 0 for SUM and AVG समग्र फ़ंक्शन SUM और AVG के लिए NULL को 0 मानते हैं
Aggregate functions fail when NULL values are present NULL मान मौजूद होने पर समग्र फ़ंक्शन विफल हो जाते हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) NULL handling in aggregates: SUM/AVG/MAX/MIN/COUNT(col) all ignore NULLs. COUNT(*) counts ALL rows regardless of NULLs. AVG ignores NULLs in both numerator and denominator (not the same as treating as 0).
व्याख्या (हिन्दी) समुच्चय में शून्य प्रबंधन: SUM/AVG/MAX/MIN/COUNT(col) सभी शून्य को अनदेखा करते हैं। COUNT(*) शून्य की परवाह किए बिना सभी पंक्तियों की गणना करता है। AVG अंश और हर दोनों में NULL को अनदेखा करता है (0 के रूप में मानने के समान नहीं)।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो DBMS का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 1498

EN + हिं Medium
GB What is the purpose of the SQL WITH clause (Common Table Expression - CTE)?
IN एसक्यूएल विद क्लॉज (कॉमन टेबल एक्सप्रेशन - सीटीई) का उद्देश्य क्या है?
To define transaction boundaries लेन-देन की सीमाओं को परिभाषित करना
To create permanent views in the database डेटाबेस में स्थायी दृश्य बनाने के लिए
To define named temporary result sets that can be referenced multiple times within a query improving readability and enabling recursive queries (WITH RECURSIVE) नामित अस्थायी परिणाम सेट को परिभाषित करने के लिए जिन्हें एक क्वेरी के भीतर कई बार संदर्भित किया जा सकता है, पठनीयता में सुधार और पुनरावर्ती क्वेरी को सक्षम करना (पुनरावर्ती के साथ)
To add comments to SQL queries SQL क्वेरीज़ में टिप्पणियाँ जोड़ने के लिए
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) CTE (WITH clause): defines a named temporary result set scoped to the current query. Benefits: (1) Improves readability by naming complex subqueries, (2) Allows referencing the same subquery multiple times without repetition, (3) Enables recursive queries (WITH RECURSIVE) for hierarchical data.
व्याख्या (हिन्दी) सीटीई (क्लॉज के साथ): वर्तमान क्वेरी के दायरे में नामित अस्थायी परिणाम सेट को परिभाषित करता है। लाभ: (1) जटिल सबक्वेरी का नामकरण करके पठनीयता में सुधार करता है, (2) दोहराव के बिना एक ही सबक्वेरी को कई बार संदर्भित करने की अनुमति देता है, (3) पदानुक्रमित डेटा के लिए पुनरावर्ती क्वेरी (पुनरावर्ती के साथ) सक्षम करता है।
🎯 Exam Perspective
DBMS के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 1499

EN + हिं Medium
GB What is the difference between CHAR(n) and VARCHAR(n) data types?
IN CHAR(n) और VARCHAR(n) डेटा प्रकारों के बीच क्या अंतर है?
They are functionally identical in modern databases वे आधुनिक डेटाबेस में कार्यात्मक रूप से समान हैं
CHAR is for numbers; VARCHAR for text CHAR संख्याओं के लिए है; पाठ के लिए VARCHAR
CHAR(n) is fixed-length (always uses n bytes, padded with spaces if shorter); VARCHAR(n) is variable-length (uses only the space needed plus 1-2 bytes for length storage) CHAR(n) निश्चित-लंबाई है (हमेशा n बाइट्स का उपयोग करता है, यदि छोटा हो तो रिक्त स्थान के साथ गद्देदार); VARCHAR(n) परिवर्तनीय-लंबाई है (लंबाई भंडारण के लिए केवल आवश्यक स्थान प्लस 1-2 बाइट्स का उपयोग करता है)
VARCHAR(n) is always faster than CHAR(n) VARCHAR(n) हमेशा CHAR(n) से तेज़ होता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) CHAR(n): fixed-length, always n characters, shorter strings padded with spaces. VARCHAR(n): variable-length, up to n characters, uses exact length + overhead bytes. CHAR faster for fixed-length data (no length lookup). VARCHAR saves space for variable-length strings.
व्याख्या (हिन्दी) CHAR(n): निश्चित-लंबाई, हमेशा n अक्षर, रिक्त स्थान के साथ गद्देदार छोटी स्ट्रिंग। VARCHAR(n): चर-लंबाई, n वर्णों तक, सटीक लंबाई + ओवरहेड बाइट्स का उपयोग करता है। निश्चित-लंबाई डेटा के लिए CHAR तेज़ (कोई लंबाई लुकअप नहीं)। VARCHAR चर-लंबाई स्ट्रिंग के लिए स्थान बचाता है।
🎯 Exam Perspective
यह सवाल DBMS category का है — difficulty level "Medium", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 1500

EN + हिं Easy
GB What does the SQL CASE expression return when no WHEN condition matches and no ELSE clause is specified?
IN जब कोई WHEN शर्त मेल नहीं खाती है और कोई ELSE क्लॉज निर्दिष्ट नहीं है तो SQL CASE एक्सप्रेशन क्या लौटाता है?
It returns 0 यह 0 लौटाता है
It returns an empty string यह एक खाली स्ट्रिंग लौटाता है
It returns NULL (the CASE expression evaluates to NULL when no WHEN matches and no ELSE is provided) यह NULL लौटाता है (CASE अभिव्यक्ति NULL का मूल्यांकन करती है जब कोई WHEN मेल नहीं खाता है और कोई ELSE प्रदान नहीं किया गया है)
It raises an error यह एक त्रुटि उत्पन्न करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) If no WHEN condition matches in a CASE expression and no ELSE clause is specified, the CASE expression returns NULL. Best practice: always include an ELSE clause to handle unexpected values explicitly.
व्याख्या (हिन्दी) यदि CASE अभिव्यक्ति में कोई WHEN शर्त मेल नहीं खाती है और कोई ELSE खंड निर्दिष्ट नहीं है, तो CASE अभिव्यक्ति NULL लौटाती है। सर्वोत्तम अभ्यास: अप्रत्याशित मानों को स्पष्ट रूप से संभालने के लिए हमेशा एक ELSE खंड शामिल करें।
🎯 Exam Perspective
यह प्रश्न DBMS की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Easy"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।