PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम ACID Properties: Isolation Levels and Durability Guarantee (ACID गुण: आइसोलेशन लेवल्स (अलगाव) और स्थायित्व (Durability)) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Isolation controls how intermediate updates of concurrent transactions remain hidden from one another across four ANSI/ISO SQL isolation levels—Read Uncommitted, Read Committed, Repeatable Read, and Serializable—trading concurrency throughput against read anomalies. Durability guarantees that once a transaction commits, its effects survive power loss and system crashes via Write-Ahead Logging (REDO) and force-log-at-commit.
अध्याय सार: Isolation (अलगाव) यह तय करता है कि एक साथ चलते ट्रांजैक्शन्स के अधूरे बदलाव एक-दूसरे से किस हद तक छिपे रहेंगे, जिसके लिए SQL-92 में चार मानक स्तर (Read Uncommitted से Serializable) दिए गए हैं। Durability (स्थायित्व) सुनिश्चित करती है कि COMMIT के बाद डेटा क्रैश या बिजली जाने पर भी WAL (REDO लॉग) के सहारे सुरक्षित रहे।
ACID Properties: Isolation Levels and Durability Guarantee: Detailed Notes & Architecture (ACID गुण: आइसोलेशन लेवल्स (अलगाव) और स्थायित्व (Durability))
1. Isolation Principle & Concurrency Control Subsystem (आइसोलेशन सिद्धांत और कॉनकरेंसी कंट्रोल घटक)
[EN] Isolation ensures that concurrent execution of multiple transactions yields the same final database state as if they executed sequentially one after another, shielding intermediate uncommitted data from peer transactions. The DBMS Concurrency Control Manager enforces isolation using mechanisms such as Two-Phase Locking (2PL), Timestamp Ordering, Optimistic Concurrency Control, or Multi-Version Concurrency Control (MVCC).
[HI] Isolation सुनिश्चित करता है कि समानांतर (Concurrent) चलते कई ट्रांजैक्शन एक-दूसरे के कार्य में हस्तक्षेप न करें और परिणाम किसी सीरियल क्रम जैसा ही निकले। इसे DBMS का Concurrency Control Manager मुख्यतः लॉकिंग (2PL), टाइमस्टैम्प ऑर्डरिंग या MVCC (स्नैपशॉट वर्ज़न) तकनीकों से लागू करता है।
2. ANSI/ISO SQL-92 Four Isolation Levels & Read Anomalies (SQL-92 के चार आइसोलेशन लेवल्स और रीड समस्याएं)
[EN] SQL-92 standardizes four isolation levels balancing safety and performance: (1) READ UNCOMMITTED allows Dirty Reads, Non-Repeatable Reads, and Phantom Reads; (2) READ COMMITTED prevents Dirty Reads (default in PostgreSQL, Oracle, SQL Server) while allowing Non-Repeatable and Phantom Reads; (3) REPEATABLE READ prevents Dirty and Non-Repeatable Reads while allowing Phantom Reads in pure SQL-92 (though MySQL InnoDB default REPEATABLE READ uses MVCC + Gap/Next-Key locks to prevent phantoms in locking reads); (4) SERIALIZABLE prevents all three anomalies completely.
[HI] SQL-92 में 4 स्तर हैं: (1) READ UNCOMMITTED में Dirty, Non-Repeatable और Phantom तीनों समस्याएं आ सकती हैं। (2) READ COMMITTED में Dirty Read रुक जाता है (यह PostgreSQL/Oracle/SQL Server का डिफ़ॉल्ट है)। (3) REPEATABLE READ में Dirty व Non-Repeatable Read दोनों रुकते हैं (InnoDB/MySQL का डिफ़ॉल्ट)। (4) SERIALIZABLE सबसे कठोर स्तर है जो Phantom Read सहित सभी तीनों विसंगतियों को रोकता है।
3. Phantom Read Anomaly vs Non-Repeatable Read (फैंटम रीड (Phantom Read) बनाम नॉन-रिपीटेबल रीड)
[EN] An Unrepeatable Read happens when T1 reads an existing row twice and sees its column values modified or deleted by a newly committed T2. By contrast, a Phantom Read occurs when T1 re-runs a range predicate query (such as WHERE salary > 50000) and discovers brand-new rows inserted (or deleted) by committed T2—rows that row-level locks on existing records alone cannot lock without range/predicate/next-key locks.
[HI] नॉन-रिपीटेबल रीड में एक ही पहले से मौजूद पंक्ति का मान बदल जाता है, जबकि Phantom Read में कोई रेंज क्वेरी (जैसे WHERE salary > 50000) दोबारा चलाने पर दूसरे कमिटेड ट्रांजैक्शन द्वारा नई डाली गई (INSERT) या हटाई गई पंक्तियाँ 'भूत' की तरह प्रकट हो जाती हैं—जिन्हें रोकने हेतु रेंज/गैप लॉक चाहिए होते हैं।
4. Durability Guarantee: WAL REDO, Force-Log-at-Commit & Checkpoints (स्थायित्व (Durability): WAL REDO और चेकपॉइंट्स)
[EN] Durability guarantees that once COMMIT succeeds and notifies the user, committed updates are permanently preserved despite subsequent OS crashes, power outages, or buffer loss. Under the popular Steal / No-Force buffer policy, dirty pages need not flush synchronously on commit (No-Force), because the Recovery Manager forces the REDO log record <Ti, X, old, new> and COMMIT log record to stable storage BEFORE confirming commit (Force-Log-at-Commit). Periodic Checkpoints limit how far back REDO recovery must scan after crashes, while RAID/backups provide media durability.
[HI] Durability सुनिश्चित करती है कि COMMIT का संदेश मिलने के बाद पावर फेल होने पर भी डेटा नष्ट नहीं होगा। तेज़ गति की No-Force नीति में मुख्य डेटा फाइलों को तुरंत डिस्क पर लिखने के बजाय कमिट से ठीक पहले REDO लॉग व COMMIT रिकॉर्ड को स्थायी लॉग डिस्क पर अनिवार्यतः फ्लश (Force-Log-at-Commit) कर दिया जाता है; चेकपॉइंट्स रिकवरी समय को छोटा रखते हैं।
Syntax, Formula & Technical Example (ACID Properties: Isolation Levels and Durability Guarantee)
-- Setting strict Serializable Isolation & Durability behavior
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
START TRANSACTION;
SELECT COUNT(*) FROM Orders WHERE amount > 1000; -- Acquires range/SSI protection
-- Concurrent INSERT of Orders(amount=2000) is blocked or serialized -> No Phantom!
INSERT INTO AuditLog VALUES (NOW(), 'Checked high-value orders');
COMMIT; -- Forces REDO + COMMIT records to stable WAL disk (Durability)
ACID Properties: Isolation Levels and Durability Guarantee Quick Reference & Comparison Table
| SQL Isolation Level | Anomalies Prevented (vs Permitted) | Default RDBMS / Locking Note |
|---|---|---|
| READ UNCOMMITTED | Permits Dirty Read, Non-Repeatable Read, and Phantom Read | Lowest overhead; no shared read locks |
| READ COMMITTED | Prevents Dirty Read; permits Non-Repeatable & Phantom Reads | Default in PostgreSQL, Oracle, SQL Server |
| REPEATABLE READ | Prevents Dirty & Non-Repeatable Reads; SQL-92 permits Phantoms | Default in MySQL InnoDB (uses MVCC + Gap locks) |
| SERIALIZABLE | Prevents Dirty, Non-Repeatable, and Phantom Reads completely | Highest safety; uses Range locks / SSI / Strict 2PL |
ACID Properties: Isolation Levels and Durability Guarantee Top 20 Bilingual MCQs with Answers
Q1. Which ANSI/ISO SQL-92 isolation level is the weakest and allows Dirty Reads, Non-Repeatable Reads, and Phantom Reads?
(ANSI/ISO SQL-92 का सबसे कमजोर आइसोलेशन लेवल कौन सा है जिसमें Dirty, Non-Repeatable और Phantom तीनों समस्याएं आ सकती हैं?)
(A) READ COMMITTED
(B) SERIALIZABLE
(C) REPEATABLE READ
(D) READ UNCOMMITTED
Correct Answer: (D)
[EN] READ UNCOMMITTED reads uncommitted writes from active transactions, exposing all three read anomalies.
[HI] READ UNCOMMITTED बिना कमिट हुआ डेटा भी पढ़ लेता है, अतः इसमें तीनों समस्याएं संभव हैं।
Q2. Which isolation level is the minimum required by ANSI SQL-92 to strictly prevent Phantom Reads?
(ANSI SQL-92 के अनुसार Phantom Read समस्या को पूरी तरह रोकने के लिए न्यूनतम कौन सा आइसोलेशन लेवल आवश्यक है?)
(A) READ COMMITTED
(B) SERIALIZABLE
(C) REPEATABLE READ
(D) READ UNCOMMITTED
Correct Answer: (B)
[EN] In standard SQL-92, row-level locks at REPEATABLE READ stop updates to existing rows, whereas SERIALIZABLE uses range/predicate protection against newly inserted phantoms.
[HI] मानक SQL-92 में Phantom Read को रोकने के लिए SERIALIZABLE स्तर (रेंज लॉकिंग सहित) आवश्यक होता है।
Q3. What is the default transaction isolation level in PostgreSQL, Oracle, and Microsoft SQL Server?
(PostgreSQL, Oracle और Microsoft SQL Server में डिफ़ॉल्ट ट्रांजैक्शन आइसोलेशन लेवल क्या होता है?)
(A) READ COMMITTED
(B) REPEATABLE READ
(C) READ UNCOMMITTED
(D) SERIALIZABLE
Correct Answer: (A)
[EN] PostgreSQL, Oracle, and SQL Server default to READ COMMITTED, whereas MySQL InnoDB defaults to REPEATABLE READ.
[HI] PostgreSQL, Oracle व SQL Server का डिफ़ॉल्ट READ COMMITTED है (जबकि MySQL InnoDB का डिफ़ॉल्ट REPEATABLE READ है)।
Q4. What differentiates a Phantom Read from an Unrepeatable Read?
(Phantom Read और Unrepeatable Read के बीच क्या मुख्य अंतर है?)
(A) Unrepeatable Read sees a previously read row modified/deleted; Phantom Read sees NEW rows matching a range WHERE clause appear on re-query
(B) Phantom Read happens only on single-row PRIMARY KEY lookups
(C) Phantom Read occurs only in single-user databases
(D) Unrepeatable Read is caused only by uncommitted rollbacks
Correct Answer: (A)
[EN] Phantoms arise from newly inserted (or deleted) rows falling inside a range predicate between two executions of the same query.
[HI] Unrepeatable Read में पुरानी ही पंक्ति का मान बदलता है, जबकि Phantom Read में रेंज क्वेरी दोबारा चलाने पर नई INSERT हुई पंक्तियाँ आ जाती हैं।
Q5. Which mechanism guarantees ACID Durability even under a No-Force buffer policy (where dirty data pages stay in RAM at COMMIT time)?
(No-Force बफर नीति (जहाँ डेटा पेज कमिट के समय भी RAM में रह सकते हैं) के बावजूद ACID Durability किस नियम से सुरक्षित रहती है?)
(A) Force-Log-at-Commit (REDO log records and COMMIT marker flushed to stable disk before COMMIT returns)
(B) Waiting 24 hours before executing COMMIT
(C) Disabling all write locks during COMMIT
(D) Deleting the transaction log immediately on COMMIT
Correct Answer: (A)
[EN] Even if RAM data pages are lost in a crash right after COMMIT, the durable REDO log replays committed changes upon restart.
[HI] कमिट की पुष्टि देने से पहले REDO लॉग व COMMIT रिकॉर्ड डिस्क पर फ्लश हो जाने से क्रैश के बाद भी कमिटेड डेटा रिकवर हो जाता है।
Q6. Which ACID property ensures that concurrent transactions execute without exposing intermediate uncommitted values to each other?
(कौन सा ACID गुण सुनिश्चित करता है कि समानांतर चलते ट्रांजैक्शन एक-दूसरे के अधूरे व अनकमिटेड मान न देखें?)
(A) Durability
(B) Atomicity
(C) Entity Integrity
(D) Isolation
Correct Answer: (D)
[EN] Isolation prevents concurrent interference so transactions perceive serial-like execution.
[HI] Isolation गुण समवर्ती ट्रांजैक्शन्स के बीच अधूरे परिवर्तनों को एक-दूसरे से अलग रखता है।
Q7. How does Write-Ahead Logging (WAL) apply the new value V2 from <Ti, X, V1, V2> during crash recovery for Durability?
(क्रैश रिकवरी के समय Durability बनाए रखने हेतु WAL रिकॉर्ड <Ti, X, V1, V2> से कौन सा मान लागू (REDO) किया जाता है?)
(A) Average of V1 and V2
(B) V1 for committed transactions
(C) V2 (the committed new after-image value) for transactions that have a COMMIT record in the log
(D) V2 for uncommitted crashed transactions
Correct Answer: (C)
[EN] Committed transactions lacking disk data page flushes are REDOne with V2; uncommitted ones are UNDOne with V1.
[HI] जिन ट्रांजैक्शन्स का COMMIT लॉग मिल जाता है, उनमें नया मान V2 REDO करके Durability बहाल की जाती है।
Q8. What is the role of periodic Checkpoints in Durability and Recovery?
(Durability और क्रैश रिकवरी में समय-समय पर लिए जाने वाले Checkpoints की क्या भूमिका है?)
(A) Disabling Isolation locks permanently
(B) Converting 3NF tables into 1NF
(C) Flushing dirty buffer pages and recording active transactions so crash recovery only scans logs from the last checkpoint instead of the beginning of time
(D) Dropping old primary keys automatically
Correct Answer: (C)
[EN] Checkpoints sharply bound REDO recovery scan length and server restart time after failures.
[HI] चेकपॉइंट पर डर्टी पेज डिस्क पर सेव हो जाते हैं जिससे क्रैश के बाद पूरा पुराना लॉग स्कैन नहीं करना पड़ता और रिकवरी तेज़ होती है।
Q9. Under MySQL InnoDB's default REPEATABLE READ, what locking technique prevents phantom rows during locking reads (SELECT ... FOR UPDATE)?
(MySQL InnoDB के डिफ़ॉल्ट REPEATABLE READ में लॉकिंग रीड्स (SELECT ... FOR UPDATE) के दौरान Phantom Read को किस लॉकिंग तकनीक से रोका जाता है?)
(A) Read Uncommitted dirty latches
(B) Disable-WAL mode
(C) Next-Key Locking (combining record locks and gap locks)
(D) Table truncation locks
Correct Answer: (C)
[EN] InnoDB combines index record locks with gap locks on index intervals (Next-Key Locks) to block phantom inserts into queried ranges.
[HI] InnoDB रिकॉर्ड लॉक और गैप लॉक को मिलाकर Next-Key Locking द्वारा रेंज के भीतर नई पंक्तियों के इंसर्ट को रोक देता है।
Q10. Which read anomalies remain possible under the READ COMMITTED isolation level?
(READ COMMITTED आइसोलेशन लेवल में कौन सी रीड समस्याएं अब भी उत्पन्न हो सकती हैं?)
(A) Dirty Reads and Phantom Reads, but never Non-Repeatable Reads
(B) Dirty Reads only
(C) No read anomalies at all
(D) Both Non-Repeatable Reads and Phantom Reads (Dirty Reads are prevented)
Correct Answer: (D)
[EN] READ COMMITTED releases read locks right after reading (or uses per-statement MVCC snapshots), allowing subsequent committed changes between statements.
[HI] READ COMMITTED केवल Dirty Read रोकता है; एक ही ट्रांजैक्शन के दो कथनों के बीच कमिटेड बदलाव आने से Non-Repeatable और Phantom Read हो सकते हैं।
Q11. Why do database servers NOT default to SERIALIZABLE for all workloads?
(डेटाबेस सर्वर सभी वर्कलोड्स के लिए डिफ़ॉल्ट रूप से SERIALIZABLE स्तर का उपयोग क्यों नहीं करते?)
(A) Because SERIALIZABLE violates Atomicity
(B) Because strict locking or serialization aborts reduce concurrency throughput and increase lock contention/deadlocks
(C) Because SQL forbids SERIALIZABLE on indexed tables
(D) Because SERIALIZABLE loses Durability during crashes
Correct Answer: (B)
[EN] Stronger isolation lowers parallel throughput due to blocked threads, range locks, or serialization conflict aborts.
[HI] SERIALIZABLE में कड़े लॉक और कन्फ्लिक्ट अबॉर्ट के कारण समवर्ती गति (Throughput) काफी घट जाती है।
Q12. In SQL, what is the scope of 'SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;' when executed without SESSION/GLOBAL?
(SQL में बिना SESSION/GLOBAL लिखे 'SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;' चलाने का दायरा क्या होता है?)
(A) It applies only to DDL CREATE statements
(B) It applies ONLY to the very next single transaction
(C) It restarts the DBMS server
(D) It permanently alters the database engine for all users forever
Correct Answer: (B)
[EN] Standard SQL SET TRANSACTION alters only the next single transaction, whereas SET SESSION TRANSACTION applies across the connection.
[HI] मानक SQL में SET TRANSACTION केवल अगले एक ही ट्रांजैक्शन पर लागू होता है।
Q13. If a banking DBMS claims Durability, what must survive right after COMMIT returns success to the application?
(यदि कोई बैंकिंग DBMS Durability का दावा करता है, तो COMMIT सफल होते ही क्या सुरक्षित रहना अनिवार्य है?)
(A) Expired network sockets
(B) Only table schema names, not row values
(C) Uncommitted temporary variables inside user RAM
(D) The committed account balances must survive power failure, OS crash, or buffer memory wipe
Correct Answer: (D)
[EN] Once COMMIT is acknowledged, committed updates cannot vanish even if the machine loses power one millisecond later.
[HI] COMMIT की पुष्टि होते ही अगले ही क्षण बिजली चली जाने पर भी कमिट हुआ डेटा वापस मिलना अनिवार्य है।
Q14. Which isolation level typically utilizes Snapshot Isolation / Serializable Snapshot Isolation (SSI) in modern MVCC databases like PostgreSQL 9.1+?
(PostgreSQL 9.1+ जैसे आधुनिक MVCC डेटाबेस में SERIALIZABLE स्तर किस उन्नत तकनीक से बिना रीडर-राइटर ब्लॉकिंग के लागू होता है?)
(A) Strict No-Lock Dirty Paging
(B) Single-Threaded Batch Queueing only
(C) Serializable Snapshot Isolation (SSI)
(D) Plain READ UNCOMMITTED polling
Correct Answer: (C)
[EN] SSI tracks rw-antidependency danger structures on top of MVCC snapshots to achieve true serializability with high concurrency.
[HI] SSI (Serializable Snapshot Isolation) MVCC स्नैपशॉट्स पर कन्फ्लिक्ट ग्राफ जांचकर उच्च कॉनकरेंसी के साथ सीरियलाइजेबिलिटी देता है।
Q15. Which statement is FALSE (NOT true) regarding SQL Isolation Levels and Durability?
(SQL आइसोलेशन लेवल्स और Durability के बारे में कौन सा कथन असत्य (FALSE) है?)
(A) SERIALIZABLE is the strictest standard isolation level
(B) Increasing isolation level generally decreases potential concurrency throughput
(C) Durability relies on non-volatile log storage and media backups/RAID
(D) READ COMMITTED prevents both Dirty Reads and Non-Repeatable Reads according to SQL-92
Correct Answer: (D)
[EN] READ COMMITTED prevents Dirty Reads ONLY; Non-Repeatable Reads remain possible under SQL-92 READ COMMITTED.
[HI] READ COMMITTED केवल Dirty Read रोकता है, Non-Repeatable Read नहीं—अतः पहला कथन असत्य है।
Q16. How does Media Recovery support Durability beyond single-disk WAL logs?
(एकल डिस्क क्रैश होने की स्थिति में Media Recovery Durability को कैसे बचाती है?)
(A) By combining archived full/incremental database backups with archived WAL/redo log files (plus RAID mirroring)
(B) By converting tables to READ UNCOMMITTED
(C) By keeping data solely in L3 CPU cache
(D) By deleting older checkpoints every minute
Correct Answer: (A)
[EN] If the primary data disk suffers physical failure, restoring the backup and replaying archived WAL logs recovers every committed transaction.
[HI] पूरे/इंक्रीमेंटल बैकअप और आर्काइव्ड WAL लॉग्स को रीप्ले करके (तथा RAID मिररिंग से) हार्ड डिस्क खराब होने पर भी कमिटेड डेटा बचाया जाता है।
Q17. Within ACID Properties: Isolation Levels and Durability Guarantee, which sql isolation level directly maps to: "Permits Dirty Read, Non-Repeatable Read, and Phantom Read"?
(ACID Properties: Isolation Levels and Durability Guarantee में कौन सा SQL Isolation Level सीधे "Permits Dirty Read, Non-Repeatable Read, and Phantom Read" से संबंधित है?)
(A) REPEATABLE READ
(B) READ COMMITTED
(C) READ UNCOMMITTED
(D) SERIALIZABLE
Correct Answer: (C)
[EN] In ACID Properties: Isolation Levels and Durability Guarantee, 'READ UNCOMMITTED' handles 'Permits Dirty Read, Non-Repeatable Read, and Phantom Read' (Lowest overhead; no shared read locks).
[HI] ACID Properties: Isolation Levels and Durability Guarantee में 'READ UNCOMMITTED' का कार्य/विवरण 'Permits Dirty Read, Non-Repeatable Read, and Phantom Read' (Lowest overhead; no shared read locks) है।
Q18. Which option accurately describes 'READ COMMITTED' in ACID Properties: Isolation Levels and Durability Guarantee?
(ACID Properties: Isolation Levels and Durability Guarantee के संदर्भ में 'READ COMMITTED' की सही विशेषता कौन सी है?)
(A) Prevents Dirty Read; permits Non-Repeatable & Phantom Reads
(B) Prevents Dirty, Non-Repeatable, and Phantom Reads completely
(C) Prevents Dirty & Non-Repeatable Reads; SQL-92 permits Phantoms
(D) Permits Dirty Read, Non-Repeatable Read, and Phantom Read
Correct Answer: (A)
[EN] 'READ COMMITTED' provides 'Prevents Dirty Read; permits Non-Repeatable & Phantom Reads' — key point: Default in PostgreSQL, Oracle, SQL Server.
[HI] 'READ COMMITTED' का मुख्य विवरण 'Prevents Dirty Read; permits Non-Repeatable & Phantom Reads' है (Default in PostgreSQL, Oracle, SQL Server)।
Q19. In ACID Properties: Isolation Levels and Durability Guarantee, identify the correct parameter for the specification: "Prevents Dirty & Non-Repeatable Reads; SQL-92 permits Phantoms".
(ACID Properties: Isolation Levels and Durability Guarantee में "Prevents Dirty & Non-Repeatable Reads; SQL-92 permits Phantoms" विवरण किस विकल्प के लिए सही है?)
(A) SERIALIZABLE
(B) REPEATABLE READ
(C) READ UNCOMMITTED
(D) READ COMMITTED
Correct Answer: (B)
[EN] 'REPEATABLE READ' corresponds to 'Prevents Dirty & Non-Repeatable Reads; SQL-92 permits Phantoms' (Default in MySQL InnoDB (uses MVCC + Gap locks)).
[HI] 'REPEATABLE READ' का संबंध 'Prevents Dirty & Non-Repeatable Reads; SQL-92 permits Phantoms' (Default in MySQL InnoDB (uses MVCC + Gap locks)) से है।
Q20. Considering ACID Properties: Isolation Levels and Durability Guarantee, what key behavior defines 'SERIALIZABLE'?
(ACID Properties: Isolation Levels and Durability Guarantee में 'SERIALIZABLE' की मुख्य भूमिका या मान क्या है?)
(A) Prevents Dirty Read; permits Non-Repeatable & Phantom Reads
(B) Permits Dirty Read, Non-Repeatable Read, and Phantom Read
(C) Prevents Dirty & Non-Repeatable Reads; SQL-92 permits Phantoms
(D) Prevents Dirty, Non-Repeatable, and Phantom Reads completely
Correct Answer: (D)
[EN] 'SERIALIZABLE' represents 'Prevents Dirty, Non-Repeatable, and Phantom Reads completely' (Highest safety; uses Range locks / SSI / Strict 2PL).
[HI] 'SERIALIZABLE' का अर्थ/मान 'Prevents Dirty, Non-Repeatable, and Phantom Reads completely' है (Highest safety; uses Range locks / SSI / Strict 2PL)।
ACID Properties: Isolation Levels and Durability Guarantee — Exam FAQs
Q1: Why is READ COMMITTED the default in PostgreSQL and Oracle instead of SERIALIZABLE?
PostgreSQL और Oracle में SERIALIZABLE के बजाय READ COMMITTED डिफ़ॉल्ट क्यों होता है?
[EN] READ COMMITTED stops dirty uncommitted reads while providing high parallel throughput with minimal blocking or serialization failures for typical OLTP apps.
[HI] READ COMMITTED डर्टी रीड को रोकते हुए न्यूनतम ब्लॉकिंग के साथ अधिकतम समवर्ती गति (Throughput) देता है, जो सामान्य वेब/OLTP एप्स के लिए उपयुक्त है।
Q2: Does Durability guarantee survival if the physical hard drive completely melts?
क्या केवल लॉग लिख देने से हार्ड डिस्क पूरी तरह जल जाने पर भी Durability बची रहती है?
[EN] Single-disk WAL handles OS/power crashes; physical disk destruction requires RAID mirroring, synchronous replication, or off-disk backups plus archived WAL logs.
[HI] एक डिस्क का WAL पावर क्रैश बचाता है; डिस्क पूरी तरह नष्ट होने से बचाने के लिए RAID मिररिंग, रेप्लिकेशन या बैकअप व आर्काइव्ड लॉग ज़रूरी हैं।
Q3: If REPEATABLE READ stops Non-Repeatable Reads, why can Phantom Reads still occur in SQL-92?
जब REPEATABLE READ पुरानी पंक्तियों के बदलाव रोक देता है, तो SQL-92 में Phantom Read फिर भी क्यों हो सकता है?
[EN] Row-level locks only protect rows that ALREADY existed during the first read; newly inserted rows matching a WHERE range condition weren't locked unless gap/range locks (SERIALIZABLE) are used.
[HI] रो-लेवल लॉक केवल पहले से मौजूद पंक्तियों पर लगते हैं; नई INSERT होने वाली पंक्तियाँ रेंज में आकर जुड़ सकती हैं जब तक कि रेंज/गैप लॉक न लगे हों।
Post a Comment
Post a Comment