1666
GB
What is a phantom read anomaly and what does SERIALIZABLE isolation add beyond REPEATABLE READ to prevent it?
IN
फैंटम रीड विसंगति क्या है और इसे रोकने के लिए सीरियलाइज़ेबल आइसोलेशन रिपीटेबल रीड से परे क्या जोड़ता है?
A
Reading ghost records from deleted tables
हटाई गई तालिकाओं से भूत रिकॉर्ड पढ़ना
B
A phantom record that exists in the log but not the table
एक प्रेत रिकॉर्ड जो लॉग में मौजूद है लेकिन तालिका में नहीं
C
Reading data from a crashed transaction
दुर्घटनाग्रस्त लेनदेन से डेटा पढ़ना
D
Within one transaction executing the same range query twice returns different sets of rows because another committed transaction inserted/deleted rows in the query range; SERIALIZABLE adds range locking (predicate locks) or snapshot validation beyond REPEATABLE READ which only locks existing rows
एक लेन-देन के भीतर एक ही श्रेणी की क्वेरी को दो बार निष्पादित करने से पंक्तियों के अलग-अलग सेट मिलते हैं क्योंकि किसी अन्य प्रतिबद्ध लेनदेन ने क्वेरी सीमा में पंक्तियों को डाला/हटा दिया है; सीरियलाइज़ेबल रिपीटेबल रीड से परे रेंज लॉकिंग (प्रीडिकेट लॉक्स) या स्नैपशॉट सत्यापन जोड़ता है जो केवल मौजूदा पंक्तियों को लॉक करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
Phantom: T1: SELECT WHERE salary>50K -> 10 rows. T2: INSERT salary=60K, commits. T1: SELECT WHERE salary>50K -> 11 rows (new phantom row). REPEATABLE READ locks existing rows but not gaps. SERIALIZABLE: adds gap locks/predicate locks (prevents insertions in the range) or uses MVCC snapshot that excludes T2s insert.
व्याख्या (हिन्दी)
फैंटम: टी1: चयन करें जहां वेतन>50K ->10 पंक्तियाँ। टी2: वेतन डालें=60 हजार, प्रतिबद्ध। टी1: चुनें कि वेतन कहां है> 50K -> 11 पंक्तियाँ (नई प्रेत पंक्ति)। दोहराए जाने योग्य रीड मौजूदा पंक्तियों को लॉक करता है लेकिन अंतराल को नहीं। क्रमबद्ध करने योग्य: गैप लॉक/प्रेडिकेट लॉक जोड़ता है (सीमा में सम्मिलन को रोकता है) या एमवीसीसी स्नैपशॉट का उपयोग करता है जो T2s सम्मिलन को बाहर करता है।