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
1651
EN + हिं Medium
GB What is the difference between index seek and index scan in query execution plans?
IN क्वेरी निष्पादन योजनाओं में इंडेक्स सीक और इंडेक्स स्कैन के बीच क्या अंतर है?
A
Index scan is always faster than index seek इंडेक्स स्कैन हमेशा इंडेक्स सीक से तेज़ होता है
B
Index seek is for range queries; index scan for equality इंडेक्स सीक रेंज प्रश्नों के लिए है; समानता के लिए सूचकांक स्कैन
C
Index seek: uses the B-tree to navigate directly to the matching key value(s) - O(log n) + matching rows only. Index scan: reads all (or most) leaf pages of the index sequentially - O(index_size). Seek is much faster for selective queries; scan used when large fraction of data is returned or index cannot be used for point lookup इंडेक्स सीक: मिलान कुंजी मान (मानों) - ओ (लॉग एन) + केवल मिलान पंक्तियों पर सीधे नेविगेट करने के लिए बी-ट्री का उपयोग करता है। इंडेक्स स्कैन: इंडेक्स के सभी (या अधिकांश) लीफ पेजों को क्रमिक रूप से पढ़ता है - O(index_size)। चयनात्मक प्रश्नों के लिए सीक बहुत तेज़ है; स्कैन का उपयोग तब किया जाता है जब डेटा का बड़ा हिस्सा लौटाया जाता है या पॉइंट लुकअप के लिए इंडेक्स का उपयोग नहीं किया जा सकता है
D
Index seek is for non-indexed columns; index scan for indexed इंडेक्स सीक गैर-अनुक्रमित कॉलम के लिए है; अनुक्रमित के लिए सूचकांक स्कैन
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Seek: optimizer has a selective predicate (WHERE id=42) -> traverse B-tree from root to leaf O(log n). Fast for selective queries. Scan: predicate is not very selective or no matching index -> read all leaf pages sequentially. For covering index scans, scanning may still be efficient if sequential I/O.
व्याख्या (हिन्दी) खोजें: ऑप्टिमाइज़र के पास एक चयनात्मक विधेय है (जहां आईडी = 42) -> बी-ट्री को जड़ से पत्ती ओ (लॉग एन) तक पार करें। चयनात्मक प्रश्नों के लिए तेज़. स्कैन: विधेय बहुत चयनात्मक नहीं है या कोई मिलान सूचकांक नहीं है -> सभी पत्ती पृष्ठों को क्रमिक रूप से पढ़ें। इंडेक्स स्कैन को कवर करने के लिए, अनुक्रमिक I/O होने पर स्कैनिंग अभी भी कुशल हो सकती है।
1652
EN + हिं Easy
GB What is CREATE INDEX CONCURRENTLY in PostgreSQL and what trade-offs does it involve?
IN PostgreSQL में क्रिएट इंडेक्स समसामयिक रूप से क्या है और इसमें कौन से ट्रेड-ऑफ शामिल हैं?
A
Building an index without holding a table lock (allows concurrent reads AND writes during index build) - trade-offs: takes longer than normal index creation (multiple table scans needed) uses more CPU/I/O cannot be done in a transaction and may fail requiring manual REINDEX टेबल लॉक रखे बिना इंडेक्स बनाना (इंडेक्स निर्माण के दौरान समवर्ती पढ़ने और लिखने की अनुमति देता है) - ट्रेड-ऑफ: सामान्य इंडेक्स निर्माण से अधिक समय लगता है (एकाधिक टेबल स्कैन की आवश्यकता होती है) अधिक सीपीयू/आई/ओ का उपयोग लेनदेन में नहीं किया जा सकता है और मैन्युअल रीइंडेक्स की आवश्यकता विफल हो सकती है
B
Creating an index across multiple concurrent sessions एकाधिक समवर्ती सत्रों में एक सूचकांक बनाना
C
Creating an index that only works for concurrent queries एक सूचकांक बनाना जो केवल समवर्ती प्रश्नों के लिए काम करता है
D
Creating multiple indexes simultaneously एक साथ कई इंडेक्स बनाना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) CREATE INDEX CONCURRENTLY: avoids ACCESS EXCLUSIVE lock. Process: (1) Register index in catalog. (2) First table scan - build initial index. (3) Second scan - incorporate changes from DML during first scan. (4) Final validation. Takes 2-3x longer. Downside: cannot be in transaction, if fails leaves invalid index needing cleanup.
व्याख्या (हिन्दी) समवर्ती रूप से इंडेक्स बनाएं: एक्सेस एक्सक्लूसिव लॉक से बचें। प्रक्रिया: (1) कैटलॉग में सूचकांक पंजीकृत करें। (2) पहला टेबल स्कैन - प्रारंभिक सूचकांक बनाएं। (3) दूसरा स्कैन - पहले स्कैन के दौरान डीएमएल से परिवर्तन शामिल करें। (4) अंतिम सत्यापन. 2-3x अधिक समय लगता है. नकारात्मक पक्ष: लेनदेन में नहीं हो सकता, यदि विफल रहता है तो अमान्य सूचकांक को सफाई की आवश्यकता होती है।
1653
EN + हिं Easy
GB What is a GiST (Generalized Search Tree) index in PostgreSQL and what data types does it support?
IN PostgreSQL में GiST (सामान्यीकृत खोज वृक्ष) सूचकांक क्या है और यह किस डेटा प्रकार का समर्थन करता है?
A
An index for geographic spatial data only केवल भौगोलिक स्थानिक डेटा के लिए एक सूचकांक
B
An extensible index framework that supports a wide variety of data types and query operators beyond equality/comparison: geometric objects text search IP ranges JSON paths custom types - by allowing user-defined key types and split/union/penalty functions एक एक्स्टेंसिबल इंडेक्स फ्रेमवर्क जो समानता/तुलना से परे विभिन्न प्रकार के डेटा प्रकारों और क्वेरी ऑपरेटरों का समर्थन करता है: ज्यामितीय ऑब्जेक्ट टेक्स्ट खोज आईपी रेंज JSON पथ कस्टम प्रकार - उपयोगकर्ता-परिभाषित कुंजी प्रकारों और विभाजन/संघ/दंड कार्यों की अनुमति देकर
C
A special type of B-tree for integers only केवल पूर्णांकों के लिए एक विशेष प्रकार का बी-ट्री
D
A global index that spans multiple tables simultaneously एक वैश्विक सूचकांक जो एक साथ कई तालिकाओं को फैलाता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) GiST (Generalized Search Tree): framework for building balanced tree indexes on any data type. PostgreSQL uses GiST for: 2D geometric types (&&, @>, intersects), full-text search (tsvector), IP ranges (inet, cidr), interval overlaps. User can define custom GiST index types by implementing key functions.
व्याख्या (हिन्दी) GiST (सामान्यीकृत खोज ट्री): किसी भी डेटा प्रकार पर संतुलित ट्री इंडेक्स बनाने के लिए रूपरेखा। PostgreSQL इसके लिए GiST का उपयोग करता है: 2D ज्यामितीय प्रकार (&&, @>, प्रतिच्छेद), पूर्ण-पाठ खोज (tsvector), IP श्रेणियाँ (inet, cidr), अंतराल ओवरलैप। उपयोगकर्ता प्रमुख कार्यों को लागू करके कस्टम जीआईएसटी सूचकांक प्रकारों को परिभाषित कर सकता है।
1654
EN + हिं Easy
GB What is an index hint and when should it be used?
IN इंडेक्स संकेत क्या है और इसका उपयोग कब किया जाना चाहिए?
A
A directive added to a SQL query that forces or suggests the query optimizer to use a specific index instead of choosing one automatically - should be used sparingly when the optimizer consistently makes poor choices due to inaccurate statistics or atypical query patterns SQL क्वेरी में जोड़ा गया एक निर्देश जो क्वेरी ऑप्टिमाइज़र को किसी एक को स्वचालित रूप से चुनने के बजाय एक विशिष्ट इंडेक्स का उपयोग करने के लिए मजबूर करता है या सुझाव देता है - जब ऑप्टिमाइज़र लगातार गलत आंकड़ों या असामान्य क्वेरी पैटर्न के कारण खराब विकल्प बनाता है तो इसका उपयोग कम से कम किया जाना चाहिए।
B
A comment in SQL code suggesting an index SQL कोड में एक टिप्पणी जो एक इंडेक्स का सुझाव देती है
C
An index optimization applied at compile time संकलन समय पर एक सूचकांक अनुकूलन लागू किया गया
D
An automatic suggestion from the DBMS to add new indexes नए इंडेक्स जोड़ने के लिए डीबीएमएस से एक स्वचालित सुझाव
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Index hint: MySQL: SELECT * FROM t USE INDEX (idx_name) WHERE ...; SQL Server: SELECT * FROM t WITH (INDEX(idx_name)) WHERE ...; Oracle: SELECT /*+ INDEX(t idx_name) */ * FROM t WHERE ... Overrides optimizer choice. Use when: optimizer systematically picks wrong index due to bad statistics, very specific workloads with known access patterns. Avoid: hard-coding hints creates maintenance burden.
व्याख्या (हिन्दी) सूचकांक संकेत: MySQL: चयन करें * सूचकांक का उपयोग करने से (idx_name) जहां...; एसक्यूएल सर्वर: चयन करें * टी के साथ (INDEX(idx_name)) कहां...; ओरेकल: SELECT /*+ INDEX(t idx_name) */ * FROM t WHERE... ऑप्टिमाइज़र विकल्प को ओवरराइड करता है। जब उपयोग करें: ऑप्टिमाइज़र खराब आँकड़ों, ज्ञात पहुँच पैटर्न के साथ बहुत विशिष्ट कार्यभार के कारण व्यवस्थित रूप से गलत सूचकांक चुनता है। बचें: हार्ड-कोडिंग संकेत रखरखाव का बोझ पैदा करते हैं।
1655
EN + हिं Medium
GB What is the adaptive hash index (AHI) in MySQL InnoDB and how does it work?
IN MySQL InnoDB में एडाप्टिव हैश इंडेक्स (AHI) क्या है और यह कैसे काम करता है?
A
A manually configured hash index मैन्युअल रूप से कॉन्फ़िगर किया गया हैश इंडेक्स
B
An automatically built in-memory hash index that InnoDB creates on top of frequently accessed B-tree index pages - when InnoDB detects that the same index lookups are performed repeatedly it builds a hash index for those values enabling O(1) lookup vs O(log n) B-tree traversal एक स्वचालित रूप से निर्मित इन-मेमोरी हैश इंडेक्स जिसे InnoDB अक्सर एक्सेस किए गए B-ट्री इंडेक्स पेजों के शीर्ष पर बनाता है - जब InnoDB पता लगाता है कि एक ही इंडेक्स लुकअप बार-बार किया जाता है तो यह उन मानों के लिए एक हैश इंडेक्स बनाता है जो O(1) लुकअप बनाम O(लॉग एन) B-ट्री ट्रैवर्सल को सक्षम करता है।
C
A hash index that adapts to changing data distributions एक हैश इंडेक्स जो बदलते डेटा वितरण के अनुकूल होता है
D
A persistent hash index stored on disk डिस्क पर संग्रहीत एक सतत हैश इंडेक्स
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Adaptive Hash Index: InnoDB monitors index access patterns. If it detects frequent repeated lookups of specific key values on a B-tree index, it automatically builds an in-memory hash table for those values. Lookup becomes O(1) instead of O(log n). Can be disabled (innodb_adaptive_hash_index=OFF) if contention on the AHI latch becomes a bottleneck.
व्याख्या (हिन्दी) अनुकूली हैश इंडेक्स: InnoDB इंडेक्स एक्सेस पैटर्न की निगरानी करता है। यदि यह बी-ट्री इंडेक्स पर विशिष्ट कुंजी मानों के बार-बार दोहराए जाने वाले लुकअप का पता लगाता है, तो यह स्वचालित रूप से उन मानों के लिए इन-मेमोरी हैश तालिका बनाता है। लुकअप O(लॉग एन) के बजाय O(1) हो जाता है। यदि AHI लैच पर विवाद एक बाधा बन जाता है तो इसे अक्षम किया जा सकता है (innodb_adaptive_hash_index=OFF)।
1656
EN + हिं Hard
GB What is index compression and how does it reduce storage and improve performance?
IN इंडेक्स कम्प्रेशन क्या है और यह स्टोरेज को कैसे कम करता है और प्रदर्शन में सुधार करता है?
A
Using fewer indexes to reduce storage भंडारण कम करने के लिए कम अनुक्रमणिका का उपयोग करना
B
A technique that reduces the storage size of index entries by: prefix compression (storing only the suffix that differs from the previous key for sorted keys) dictionary compression (replacing repeated values with integer codes) or key compression - smaller index means more pages fit in buffer pool improving cache efficiency and reducing I/O एक तकनीक जो सूचकांक प्रविष्टियों के भंडारण आकार को कम कर देती है: उपसर्ग संपीड़न (केवल प्रत्यय को संग्रहीत करना जो सॉर्ट की गई कुंजी के लिए पिछली कुंजी से भिन्न होता है) शब्दकोश संपीड़न (पूर्णांक कोड के साथ दोहराए गए मानों को बदलना) या कुंजी संपीड़न - छोटे सूचकांक का मतलब है कि बफर पूल में अधिक पृष्ठ फिट होते हैं, कैश दक्षता में सुधार होता है और I/O कम होता है
C
Compressing the entire table to save space स्थान बचाने के लिए संपूर्ण तालिका को संपीड़ित करना
D
Removing duplicate rows from the indexed table अनुक्रमित तालिका से डुप्लिकेट पंक्तियाँ हटाना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Index compression techniques: (1) Prefix compression (key prefix elision): sorted B-tree keys share common prefixes - store full prefix once, then only the unique suffix for each key. (2) Dictionary encoding: replace repeated values with small integer codes. Benefits: index pages hold more entries (better fan-out), more pages fit in buffer pool (fewer I/O). Used in columnar indexes and InnoDB page compression.
व्याख्या (हिन्दी) सूचकांक संपीड़न तकनीक: (1) उपसर्ग संपीड़न (कुंजी उपसर्ग एलिसन): क्रमबद्ध बी-ट्री कुंजियाँ सामान्य उपसर्ग साझा करती हैं - पूर्ण उपसर्ग को एक बार संग्रहीत करें, फिर प्रत्येक कुंजी के लिए केवल अद्वितीय प्रत्यय। (2) शब्दकोश एन्कोडिंग: दोहराए गए मानों को छोटे पूर्णांक कोड से बदलें। लाभ: सूचकांक पृष्ठों में अधिक प्रविष्टियाँ होती हैं (बेहतर फैन-आउट), अधिक पृष्ठ बफर पूल में फिट होते हैं (कम I/O)। स्तंभ अनुक्रमणिका और InnoDB पृष्ठ संपीड़न में उपयोग किया जाता है।
1657
EN + हिं Medium
GB What is the difference between a primary index and a secondary index?
IN प्राथमिक सूचकांक और द्वितीयक सूचकांक के बीच क्या अंतर है?
A
Secondary indexes are always slower than primary indexes द्वितीयक सूचकांक हमेशा प्राथमिक सूचकांक की तुलना में धीमे होते हैं
B
A primary index is built on the primary key and determines the physical order of data (clustered); secondary indexes are built on non-primary key columns and do not determine physical data order (non-clustered in most DBMS) - secondary indexes reference the primary key to locate actual rows एक प्राथमिक सूचकांक प्राथमिक कुंजी पर बनाया गया है और डेटा (क्लस्टर) का भौतिक क्रम निर्धारित करता है; द्वितीयक सूचकांक गैर-प्राथमिक कुंजी स्तंभों पर बनाए जाते हैं और भौतिक डेटा क्रम निर्धारित नहीं करते हैं (अधिकांश डीबीएमएस में गैर-क्लस्टर) - द्वितीयक सूचकांक वास्तविक पंक्तियों का पता लगाने के लिए प्राथमिक कुंजी का संदर्भ देते हैं
C
Primary indexes can only be on single columns प्राथमिक सूचकांक केवल एकल कॉलम पर हो सकते हैं
D
They are identical in structure वे संरचना में समान हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Primary index (clustered/primary key index): defines physical data order, one per table, uniquely identifies rows. Secondary index: built on any other column(s), does not determine physical storage, points to primary key (or ROWID/heap pointer). MySQL InnoDB: secondary indexes contain primary key values as row locators (not heap pointers), enabling efficient PK lookup after secondary index scan.
व्याख्या (हिन्दी) प्राथमिक सूचकांक (संकुल/प्राथमिक कुंजी सूचकांक): भौतिक डेटा क्रम को परिभाषित करता है, प्रति तालिका एक, विशिष्ट रूप से पंक्तियों की पहचान करता है। द्वितीयक सूचकांक: किसी अन्य कॉलम पर निर्मित, भौतिक भंडारण निर्धारित नहीं करता है, प्राथमिक कुंजी (या ROWID/हीप पॉइंटर) को इंगित करता है। MySQL InnoDB: सेकेंडरी इंडेक्स में पंक्ति लोकेटर (हीप पॉइंटर्स नहीं) के रूप में प्राथमिक कुंजी मान होते हैं, जो सेकेंडरी इंडेक्स स्कैन के बाद कुशल PK लुकअप को सक्षम करता है।
1658
EN + हिं Easy
GB What is the column store index (columnstore index) in SQL Server and what is its primary use case?
IN SQL सर्वर में कॉलम स्टोर इंडेक्स (कॉलमस्टोर इंडेक्स) क्या है और इसका प्राथमिक उपयोग मामला क्या है?
A
A special index type that stores data by column rather than by row enabling high compression and vectorized batch processing - primarily used for OLAP/analytical workloads where queries aggregate over large datasets and touch only a few columns एक विशेष सूचकांक प्रकार जो उच्च संपीड़न और वेक्टरकृत बैच प्रोसेसिंग को सक्षम करने के लिए पंक्ति के बजाय कॉलम द्वारा डेटा संग्रहीत करता है - मुख्य रूप से ओएलएपी/विश्लेषणात्मक वर्कलोड के लिए उपयोग किया जाता है जहां क्वेरी बड़े डेटासेट पर एकत्र होती हैं और केवल कुछ कॉलम को छूती हैं
B
An index that references columns in other tables एक सूचकांक जो अन्य तालिकाओं में स्तंभों का संदर्भ देता है
C
An index that sorts columns alphabetically एक सूचकांक जो स्तंभों को वर्णानुक्रम में क्रमबद्ध करता है
D
An index that compresses column names एक सूचकांक जो स्तंभ नामों को संपीड़ित करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) SQL Server columnstore index: stores each column separately using compression (RLE, dictionary). Queries that aggregate only a few columns of a large table read only those columns. Batch mode processing: processes 64-900 rows at a time using SIMD/vectorized operations. 10-100x faster for analytics. Can be combined with rowstore for HTAP workloads (clustered columnstore + nonclustered rowstore).
व्याख्या (हिन्दी) SQL सर्वर कॉलमस्टोर इंडेक्स: संपीड़न (आरएलई, डिक्शनरी) का उपयोग करके प्रत्येक कॉलम को अलग से संग्रहीत करता है। वे क्वेरीज़ जो किसी बड़ी तालिका के केवल कुछ स्तंभों को एकत्रित करती हैं, केवल उन्हीं स्तंभों को पढ़ती हैं। बैच मोड प्रसंस्करण: SIMD/वेक्टरीकृत संचालन का उपयोग करके एक समय में 64-900 पंक्तियों को संसाधित करता है। एनालिटिक्स के लिए 10-100 गुना तेज। HTAP वर्कलोड (क्लस्टर्ड कॉलमस्टोर + नॉनक्लस्टर्ड रोस्टोर) के लिए रोस्टोर के साथ जोड़ा जा सकता है।
1659
EN + हिं Easy
GB What is index maintenance overhead and how should DBAs manage it in production systems?
IN सूचकांक रखरखाव ओवरहेड क्या है और डीबीए को इसे उत्पादन प्रणालियों में कैसे प्रबंधित करना चाहिए?
A
The cost of creating new indexes नए सूचकांक बनाने की लागत
B
The cost of reading from indexes अनुक्रमणिका से पढ़ने की लागत
C
The cost of updating indexes on every INSERT/UPDATE/DELETE which includes: additional I/O for each index page write, page splits causing fragmentation, and potential index bloat - managed by: choosing indexes carefully (only create indexes that pay off) rebuilding fragmented indexes (ALTER INDEX REBUILD) and reorganizing (ALTER INDEX REORGANIZE) on a scheduled basis प्रत्येक INSERT/UPDATE/DELETE पर इंडेक्स को अपडेट करने की लागत जिसमें शामिल है: प्रत्येक इंडेक्स पेज लिखने के लिए अतिरिक्त I/O, पृष्ठ विभाजन के कारण विखंडन, और संभावित इंडेक्स ब्लोट - द्वारा प्रबंधित: इंडेक्स को सावधानीपूर्वक चुनना (केवल ऐसे इंडेक्स बनाएं जो भुगतान करते हैं) खंडित इंडेक्स का पुनर्निर्माण (ALTER INDEX REBUILD) और एक निर्धारित आधार पर पुनर्गठित करना (ALTER INDEX REORGANIZE)
D
Indexes that require manual maintenance ऐसे सूचकांक जिन्हें मैन्युअल रखरखाव की आवश्यकता होती है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Index maintenance overhead: every write to a table incurs write amplification for each index. Management strategies: (1) Monitor index usage (sys.dm_db_index_usage_stats in SQL Server) - drop unused indexes. (2) Monitor fragmentation - rebuild (fast but locks) or reorganize (online, slower) based on fragmentation level. (3) Schedule maintenance during off-peak hours. (4) Use fill factor to delay page splits.
व्याख्या (हिन्दी) सूचकांक रखरखाव ओवरहेड: तालिका में प्रत्येक लेखन प्रत्येक सूचकांक के लिए लेखन प्रवर्धन को लागू करता है। प्रबंधन रणनीतियाँ: (1) इंडेक्स उपयोग की निगरानी करें (SQL सर्वर में sys.dm_db_index_usage_stats) - अप्रयुक्त इंडेक्स को हटा दें। (2) विखंडन की निगरानी करें - विखंडन स्तर के आधार पर पुनर्निर्माण (तेज़ लेकिन लॉक) या पुनर्गठित (ऑनलाइन, धीमा)। (3) ऑफ-पीक घंटों के दौरान रखरखाव शेड्यूल करें। (4) पृष्ठ विभाजन में देरी के लिए भरण कारक का उपयोग करें।
1660
EN + हिं Medium
GB What is the Atomicity property of ACID transactions and how is it implemented by the DBMS?
IN ACID लेनदेन की एटोमिसिटी संपत्ति क्या है और इसे DBMS द्वारा कैसे कार्यान्वित किया जाता है?
A
Atomicity means each statement is its own transaction परमाणुता का अर्थ है कि प्रत्येक कथन अपना स्वयं का लेनदेन है
B
Transactions are processed by a single atomic CPU लेन-देन एकल परमाणु सीपीयू द्वारा संसाधित किए जाते हैं
C
All operations in a transaction either ALL complete successfully (COMMIT) or ALL are undone (ROLLBACK) - implemented via the undo log: before each change the original value is written to the undo log enabling complete rollback if the transaction fails or is explicitly rolled back लेन-देन में सभी ऑपरेशन या तो सभी सफलतापूर्वक पूर्ण (COMMIT) या सभी पूर्ववत (रोलबैक) - पूर्ववत लॉग के माध्यम से कार्यान्वित किए जाते हैं: प्रत्येक परिवर्तन से पहले मूल मान को पूर्ववत लॉग में लिखा जाता है, यदि लेनदेन विफल हो जाता है या स्पष्ट रूप से वापस रोल किया जाता है तो पूर्ण रोलबैक सक्षम होता है।
D
Transactions execute at the atomic CPU instruction level लेनदेन परमाणु सीपीयू अनुदेश स्तर पर निष्पादित होते हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Atomicity implementation: DBMS maintains undo/rollback log with before-images of modified data. If ROLLBACK: apply undo log in reverse order to restore original values. If COMMIT: make changes permanent, discard undo log entries. Crash during transaction: recovery applies undo log during restart.
व्याख्या (हिन्दी) एटोमिसिटी कार्यान्वयन: डीबीएमएस संशोधित डेटा की पूर्व-छवियों के साथ पूर्ववत/रोलबैक लॉग बनाए रखता है। यदि रोलबैक: मूल मानों को पुनर्स्थापित करने के लिए रिवर्स ऑर्डर में लॉग को पूर्ववत करें लागू करें। यदि प्रतिबद्ध हैं: परिवर्तनों को स्थायी बनाएं, लॉग प्रविष्टियों को पूर्ववत करें। लेन-देन के दौरान क्रैश: पुनर्प्राप्ति पुनरारंभ के दौरान लॉग को पूर्ववत करने पर लागू होती है।
1661
EN + हिं Easy
GB What is the Consistency property in ACID and who is responsible for defining the constraints that must hold?
IN ACID में संगति संपत्ति क्या है और उन बाधाओं को परिभाषित करने के लिए कौन जिम्मेदार है जो अवश्य होनी चाहिए?
A
Consistency only applies to financial transactions संगति केवल वित्तीय लेनदेन पर लागू होती है
B
Consistency means the transaction takes the database from one valid state to another - the DBMS enforces defined constraints (PK FK CHECK NOT NULL) but the APPLICATION is responsible for ensuring business-level constraints are upheld (the DB only enforces what it knows about) संगति का मतलब है कि लेनदेन डेटाबेस को एक वैध स्थिति से दूसरे में ले जाता है - डीबीएमएस परिभाषित बाधाओं को लागू करता है (पीके एफके चेक शून्य नहीं है) लेकिन एप्लिकेशन यह सुनिश्चित करने के लिए ज़िम्मेदार है कि व्यवसाय-स्तरीय बाधाओं को बरकरार रखा गया है (डीबी केवल वही लागू करता है जिसके बारे में वह जानता है)
C
Consistency is maintained automatically without any constraints बिना किसी बाधा के निरंतरता स्वचालित रूप से बनी रहती है
D
The DBMS is solely responsible for all consistency डीबीएमएस सभी स्थिरता के लिए पूरी तरह जिम्मेदार है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Consistency is a shared responsibility: DBMS enforces: schema constraints (NOT NULL, UNIQUE, FK, CHECK). Application must ensure: business rules beyond schema (e.g., ensuring order total = sum of line items, managing multi-table business invariants). The DBMS cannot know all business rules.
व्याख्या (हिन्दी) संगति एक साझा जिम्मेदारी है: डीबीएमएस लागू करता है: स्कीमा बाधाएं (शून्य नहीं, अद्वितीय, एफके, चेक)। एप्लिकेशन को यह सुनिश्चित करना होगा: स्कीमा से परे व्यावसायिक नियम (उदाहरण के लिए, कुल ऑर्डर सुनिश्चित करना = लाइन आइटम का योग, मल्टी-टेबल बिजनेस इनवेरिएंट का प्रबंधन करना)। DBMS सभी व्यावसायिक नियमों को नहीं जान सकता।
1662
EN + हिं Easy
GB What is the Isolation property and what is the trade-off between stronger isolation levels and performance?
IN अलगाव संपत्ति क्या है और मजबूत अलगाव स्तर और प्रदर्शन के बीच क्या तालमेल है?
A
Higher isolation always improves performance उच्च अलगाव हमेशा प्रदर्शन में सुधार करता है
B
Isolation ensures concurrent transactions execute as if they were serial; stronger isolation (SERIALIZABLE) prevents more anomalies but requires more locking/MVCC overhead reducing concurrency and throughput. Weaker isolation (READ COMMITTED) allows more anomalies but permits higher concurrency अलगाव सुनिश्चित करता है कि समवर्ती लेनदेन ऐसे निष्पादित हों जैसे कि वे क्रमबद्ध हों; मजबूत अलगाव (सीरियलाइज़ेबल) अधिक विसंगतियों को रोकता है लेकिन संगामिति और थ्रूपुट को कम करने के लिए अधिक लॉकिंग/एमवीसीसी ओवरहेड की आवश्यकता होती है। कमजोर अलगाव (प्रतिबद्ध पढ़ें) अधिक विसंगतियों की अनुमति देता है लेकिन उच्च समवर्तीता की अनुमति देता है
C
Isolation only applies to reads not writes अलगाव केवल पढ़ने पर लागू होता है, लिखने पर नहीं
D
Isolation eliminates all transaction conflicts अलगाव सभी लेन-देन संबंधी विवादों को समाप्त कर देता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Isolation trade-off: SERIALIZABLE prevents all anomalies (dirty read, non-repeatable read, phantom read) via range locks or snapshot isolation, but highest lock contention / lowest throughput. READ UNCOMMITTED: no isolation, maximum concurrency but allows dirty reads. Most systems use READ COMMITTED as default.
व्याख्या (हिन्दी) आइसोलेशन ट्रेड-ऑफ: सीरियलाइज़ेबल रेंज लॉक या स्नैपशॉट आइसोलेशन के माध्यम से सभी विसंगतियों (गंदी रीड, नॉन-रिपीटेबल रीड, फैंटम रीड) को रोकता है, लेकिन उच्चतम लॉक कंटेंट / सबसे कम थ्रूपुट को रोकता है। अप्रतिबद्ध पढ़ें: कोई अलगाव नहीं, अधिकतम समवर्ती लेकिन गंदे पढ़ने की अनुमति देता है। अधिकांश सिस्टम डिफ़ॉल्ट रूप से READ COMMITTED का उपयोग करते हैं।
1663
EN + हिं Medium
GB What is the Durability property and how does Write-Ahead Logging (WAL) implement it?
IN टिकाऊपन गुण क्या है और राइट-अहेड लॉगिंग (वाल) इसे कैसे कार्यान्वित करता है?
A
Once a transaction is committed its changes persist even through system crashes; WAL implements this by writing log records to disk BEFORE applying changes to the database ensuring that committed changes can be replayed during recovery even if the data pages were not yet flushed एक बार लेन-देन हो जाने के बाद सिस्टम क्रैश होने पर भी इसमें परिवर्तन जारी रहता है; वाल डेटाबेस में परिवर्तन लागू करने से पहले डिस्क पर लॉग रिकॉर्ड लिखकर इसे लागू करता है, यह सुनिश्चित करता है कि पुनर्प्राप्ति के दौरान किए गए परिवर्तनों को फिर से दोहराया जा सकता है, भले ही डेटा पेज अभी तक फ्लश न किए गए हों।
B
Data is backed up to a remote server डेटा का बैकअप रिमोट सर्वर पर किया जाता है
C
Durability means data is stored in RAID for redundancy टिकाऊपन का मतलब है कि डेटा को अतिरेक के लिए RAID में संग्रहीत किया जाता है
D
Durability requires storing data in at least three locations स्थायित्व के लिए कम से कम तीन स्थानों पर डेटा संग्रहीत करने की आवश्यकता होती है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) WAL/WAL protocol: log record for each change written to stable storage (disk flush) before the corresponding change is applied to the database. On COMMIT: log record is force-written to disk. On crash: log is read forward (redo committed transactions) and backward (undo uncommitted). Guarantees committed data survives crashes.
व्याख्या (हिन्दी) वाल/वाल प्रोटोकॉल: डेटाबेस पर संबंधित परिवर्तन लागू होने से पहले स्थिर भंडारण (डिस्क फ्लश) में लिखे गए प्रत्येक परिवर्तन के लिए लॉग रिकॉर्ड। COMMIT पर: लॉग रिकॉर्ड डिस्क पर बलपूर्वक लिखा जाता है। क्रैश होने पर: लॉग को आगे पढ़ा जाता है (प्रतिबद्ध लेनदेन को फिर से करें) और पीछे (अप्रतिबद्ध लेनदेन को पूर्ववत करें)। गारंटी देता है कि प्रतिबद्ध डेटा क्रैश होने से बच जाता है।
1664
EN + हिं Easy
GB What is a dirty read anomaly and which isolation level(s) allow it?
IN गंदी पढ़ी जाने वाली विसंगति क्या है और कौन सा अलगाव स्तर इसकी अनुमति देता है?
A
Reading uncommitted changes of another concurrent transaction - if that other transaction later rolls back the read data never existed. Only READ UNCOMMITTED isolation level allows dirty reads; all higher levels prevent them किसी अन्य समवर्ती लेन-देन के अप्रतिबद्ध परिवर्तनों को पढ़ना - यदि वह अन्य लेन-देन बाद में वापस आ जाता है तो पढ़ा गया डेटा कभी अस्तित्व में नहीं था। केवल पढ़ें अप्रतिबद्ध अलगाव स्तर गंदे पढ़ने की अनुमति देता है; सभी उच्च स्तर उन्हें रोकते हैं
B
Reading the same row twice with different values एक ही पंक्ति को अलग-अलग मानों के साथ दो बार पढ़ना
C
Reading data that contains incorrect values गलत मान वाले डेटा को पढ़ना
D
Reading rows that were inserted by another transaction उन पंक्तियों को पढ़ना जो किसी अन्य लेनदेन द्वारा डाली गई थीं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Dirty read: T1 updates row, T2 reads T1s uncommitted update, T1 rolls back. T2 has read a value that never officially existed. Allowed by: READ UNCOMMITTED. Prevented by: READ COMMITTED, REPEATABLE READ, SERIALIZABLE. READ UNCOMMITTED is rarely used in practice due to dirty read risk.
व्याख्या (हिन्दी) गंदा पढ़ा: T1 अद्यतन पंक्ति, T2 पढ़ता है T1s अप्रतिबद्ध अद्यतन, T1 रोल बैक। T2 ने एक ऐसा मान पढ़ा है जो आधिकारिक तौर पर कभी अस्तित्व में नहीं था। द्वारा अनुमति: अप्रतिबद्ध पढ़ें। द्वारा रोका गया: पढ़ने के लिए प्रतिबद्ध, दोहराने योग्य पढ़ने योग्य, क्रमबद्ध करने योग्य। रीड अनकमिटेड का उपयोग गंदे रीड जोखिम के कारण व्यवहार में शायद ही कभी किया जाता है।
1665
EN + हिं Easy
GB What is a non-repeatable read and which isolation level prevents it?
IN नॉन-रिपीटेबल रीड क्या है और कौन सा अलगाव स्तर इसे रोकता है?
A
Within one transaction reading the same row twice returns different values because another committed transaction modified that row between the two reads; prevented by REPEATABLE READ and SERIALIZABLE isolation levels एक लेनदेन के भीतर एक ही पंक्ति को दो बार पढ़ने से अलग-अलग मान मिलते हैं क्योंकि एक अन्य प्रतिबद्ध लेनदेन ने दो पंक्तियों के बीच उस पंक्ति को संशोधित किया है; दोहराए जाने योग्य पढ़ने और क्रमबद्ध अलगाव स्तरों द्वारा रोका गया
B
A read that always returns the same value regardless of changes एक रीड जो परिवर्तनों की परवाह किए बिना हमेशा समान मान लौटाता है
C
Reading a NULL value from a NOT NULL column NOT NULL कॉलम से NULL मान पढ़ना
D
Reading from a table that no longer exists ऐसी तालिका से पढ़ना जो अब मौजूद नहीं है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Non-repeatable read: T1 reads salary of row 42 = $50K. T2 updates salary of row 42 to $60K and commits. T1 re-reads salary of row 42 = $60K (different value). Prevented by: REPEATABLE READ (hold read locks on accessed rows), SERIALIZABLE. Allowed by: READ UNCOMMITTED, READ COMMITTED.
व्याख्या (हिन्दी) गैर-दोहराने योग्य पाठ: T1 पंक्ति 42 का वेतन = $50K पढ़ता है। T2 पंक्ति 42 के वेतन को $60K तक अद्यतन करता है और प्रतिबद्ध करता है। T1 पंक्ति 42 का वेतन पुनः पढ़ता है = $60K (अलग मूल्य)। इसके द्वारा रोका गया: दोहराने योग्य पढ़ने योग्य (पहुँचे गए पंक्तियों पर पढ़ने योग्य ताले को दबाए रखें), क्रमबद्ध करने योग्य। द्वारा अनुमति: अप्रतिबद्ध पढ़ें, प्रतिबद्ध पढ़ें।
1651–1665 of 2982