पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 20 के उत्तर और हल FliQi Question Bank app में।
भाषा
प्रश्न 1उत्तर + हल
डेटाबेस प्रबंधन प्रणाली में पुनर्प्राप्ति प्रबंधक (recovery manager) का उद्देश्य क्या है?
What is the purpose of the recovery manager in a database management system?
Aडेटाबेस की बंदिशें (constraints) लागू करनाTo enforce database constraints
Bडेटाबेस के लेन-देन (transactions) सँभालनाTo manage database transactions
Cडेटा की अखंडता (integrity) बनाए रखनाTo ensure data integrity
Dसिस्टम विफल होने के बाद डेटाबेस को सुसंगत (consistent) स्थिति में लौटानाTo restore the database to a consistent state after a system failure
सही उत्तर / Answer: (D)
हल / Solution
पुनर्प्राप्ति प्रबंधक (recovery manager) का काम विफलता के बाद शुरू होता है — वह लॉग पढ़कर प्रतिबद्ध लेन-देन के बदलाव दोबारा लगाता है और अधूरे लेन-देन पलटा देता है, जिससे डेटाबेस सुसंगत स्थिति में लौट आता है। बंदिशें लागू करना बंदिश-जाँच का हिस्सा है और लेन-देन सँभालना लेन-देन प्रबंधक (transaction manager) का काम। विकल्प 3 इतना चौड़ा है कि वह पूरे DBMS पर लागू होता है, इसलिए वह किसी एक अंग का उद्देश्य नहीं बताता।
The recovery manager starts working after a failure. It reads the log, reapplies the changes of committed transactions and rolls back the incomplete ones, so the database is brought back to a consistent state. Enforcing constraints is the job of the constraint checker, and running transactions is the job of the transaction manager. Option 3 is far too broad: keeping data correct is a goal of the whole system, not the purpose of this one component.
प्रश्न 2उत्तर + हल
ARIES लेन-देन की टिकाऊपन (durability) कैसे पक्की करती है?
How does ARIES ensure durability of transactions?
Aचेकपॉइंट से समय-समय पर डेटाबेस की स्थिति सहेजकरBy using checkpoints to periodically save the database state
Bcommit होने तक अद्यतन स्मृति (memory) में रोककरBy buffering updates in memory until the transaction commits
Cअद्यतन तुरंत डेटाबेस पर लागू करकेBy immediately applying updates to the database
Dलेन-देन के सभी बदलावों का लॉग बनाकरBy maintaining a log of all changes made by transactions
सही उत्तर / Answer: (D)
हल / Solution
टिकाऊपन का अर्थ है — commit हो जाने के बाद बदलाव बचा रहे, भले बिजली चली जाए। ARIES यह लॉग से करती है: commit की ख़बर देने से पहले उस लेन-देन के सारे लॉग अभिलेख डिस्क पर ज़बरन लिखे जाते हैं। डेटा पेज बाद में लिखे जाएँ तो भी redo चरण उन्हें लॉग से लौटा देता है। चेकपॉइंट सिर्फ़ पुनर्प्राप्ति छोटी करता है। विकल्प 2 और 3 बफ़र प्रबंधन की नीतियाँ हैं।
Durability means that a committed change survives even a power failure. ARIES gets it from the log: before a commit is reported, all log records of that transaction are forced to disk. The data pages may still be written later, because the redo pass rebuilds them from the log after a crash. Checkpoints only shorten recovery and do not by themselves make changes durable. Options 2 and 3 are buffer-management policies, and ARIES forces neither of them.
प्रश्न 3उत्तर + हल
ARIES में राइट-अहेड लॉगिंग (write-ahead logging, WAL) का मुख्य लाभ क्या है?
What is the primary advantage of using write-ahead logging (WAL) in ARIES?
Aयह पुनर्प्राप्ति का बोझ घटा देती हैIt reduces the overhead of recovery
Bयह पक्का करती है कि बदलाव डेटाबेस पर लगने से पहले डिस्क पर लिख दिए जाएँIt ensures that changes are written to disk before they are applied to the database
Cयह पुनर्प्राप्ति के विश्लेषण चरण को आसान बना देती हैIt simplifies the analysis phase of recovery
Dयह लेन-देन को डिस्क पर कुछ भी लिखे बिना प्रतिबद्ध (commit) होने देती हैIt lets a transaction commit without writing anything to disk
सही उत्तर / Answer: (B)
हल / Solution
WAL का नियम यही है — बदलाव का लॉग अभिलेख पहले स्थायी भंडारण (stable storage) में पहुँचे, डेटा पेज डिस्क पर बाद में जाए। इसी से क्रैश के बाद हर बदलाव को redo या undo करने का सबूत लॉग में बचा रहता है। विकल्प 4 उलटी बात है: commit के समय लॉग ज़बरन डिस्क पर लिखना पड़ता है, वरना टिकाऊपन (durability) नहीं बचेगा। बोझ घटना और विश्लेषण की आसानी बस साथ चलने वाले फ़ायदे हैं।
The write-ahead rule says that the log record for a change must reach stable storage before the changed data page is written to disk. That order guarantees that after a crash the log holds the evidence needed to redo or undo every change. Option 4 is the opposite of the truth, because at commit the log must be forced to disk or durability is lost. Lower recovery cost is only a side effect.
प्रश्न 4उत्तर + हल
ARIES की लॉगिंग रणनीति को इनमें से कौन-सा कथन सही बताता है?
Which of the following statements accurately describes the logging strategy used in ARIES?
Aयह बदले गए डेटा का सिर्फ़ पुराना रूप (before-image) लॉग करती हैIt logs only the before-images of modified data items
Bयह बदले गए डेटा का पुराना और नया रूप (before-image तथा after-image) दोनों लॉग करती हैIt logs both the before-images and after-images of modified data items
Cयह बदले गए डेटा का सिर्फ़ नया रूप (after-image) लॉग करती हैIt logs only the after-images of modified data items
Dयह हर लेन-देन के बदलाव अलग लॉग फ़ाइल में लॉग करती हैIt logs the changes made by each transaction in a separate log file
सही उत्तर / Answer: (B)
हल / Solution
ARIES एक ही लॉग रखती है और हर अद्यतन अभिलेख (update log record) में दो सूचनाएँ डालती है — पुराना रूप (before-image), जिससे undo हो सके, और नया रूप (after-image), जिससे redo हो सके। इसी से वह अधूरे लेन-देन पलटा पाती है और प्रतिबद्ध लेन-देन दोबारा लगा पाती है। सिर्फ़ पुराना रूप होता तो redo असंभव था, सिर्फ़ नया रूप होता तो undo। लेन-देन-वार अलग फ़ाइल ARIES नहीं रखती।
ARIES keeps one sequential log, and every update record in it carries two pieces of information: the before-image, which makes undo possible, and the after-image, which makes redo possible. That is why it can both roll back incomplete transactions and reapply committed ones. With only before-images, as option 1 claims, redo would be impossible, and with only after-images undo would be impossible. ARIES never splits the log into a separate file for each transaction.
प्रश्न 5उत्तर + हल
ARIES पुनर्प्राप्ति एल्गोरिथ्म में विश्लेषण चरण (analysis phase) का उद्देश्य क्या है?
What is the purpose of the analysis phase in the ARIES recovery algorithm?
Aयह तय करना कि लेन-देन किस क्रम में redo किए जाएँTo determine the order in which transactions should be redone
Bपुनर्प्राप्ति शुरू होने से पहले नया चेकपॉइंट (checkpoint) अभिलेख लिखनाTo write a fresh checkpoint record before recovery begins
Cलॉग से बदलाव डेटाबेस पर लागू करनाTo apply changes from the log to the database
Dलॉग का विश्लेषण करके निरसन योग्य लेन-देन की सूची बनानाTo analyze the log and identify the set of transactions to be undone
सही उत्तर / Answer: (D)
हल / Solution
विश्लेषण चरण आख़िरी चेकपॉइंट से लॉग पढ़ता है और दो चीज़ें तैयार करता है — हारे हुए लेन-देन (loser transactions) की सूची, यानी जिन्हें पलटना है, और गंदा पेज तालिका (dirty page table), जिससे redo का आरंभ बिंदु RedoLSN मिलता है। redo का क्रम लेन-देन से नहीं, लॉग के क्रम से तय होता है, इसलिए विकल्प 1 ग़लत है। चेकपॉइंट सामान्य चलन में लिखा जाता है, विश्लेषण में नहीं। और बदलाव लागू करना redo चरण का काम है।
The analysis pass scans the log from the last checkpoint and prepares two things: the list of loser transactions that must be rolled back, and the dirty page table, which gives the RedoLSN where redo should begin. Redo then follows log order, not any per-transaction order, so option 1 is wrong. Checkpoints are written during normal operation, not by this pass. Applying the changes is the redo pass.
प्रश्न 6उत्तर + हल
ARIES पुनर्प्राप्ति एल्गोरिथ्म में पुनःकरण चरण (redo pass) का उद्देश्य क्या है?
What is the purpose of the redo pass in the ARIES recovery algorithm?
Aलॉग का विश्लेषण करके निरसन योग्य लेन-देन पहचाननाTo analyze the log and identify transactions to be undone
Bलॉग में दर्ज बदलाव डेटाबेस पर दोबारा लागू करनाTo apply changes from the log to the database
Cनिरस्त लेन-देन के बदलाव पलटनाTo reverse changes made by aborted transactions
Dडेटाबेस की वर्तमान स्थिति का चेकपॉइंट बनानाTo create a checkpoint of the current database state
सही उत्तर / Answer: (B)
हल / Solution
पुनःकरण चरण में ARIES «इतिहास दोहराती» है (repeating history) — विश्लेषण से मिले RedoLSN से आगे का लॉग पढ़कर हर दर्ज बदलाव डेटा पेज पर दोबारा लागू करती है, चाहे वह लेन-देन प्रतिबद्ध हुआ हो या नहीं। पेज का pageLSN बता देता है कि बदलाव पहले से लगा है, इसलिए एक ही बदलाव दो बार नहीं लगता। विकल्प 1 विश्लेषण चरण है, विकल्प 3 निरसन चरण, और चेकपॉइंट बनाना सामान्य चलन का काम है।
In the redo pass ARIES repeats history. Starting from the RedoLSN found during analysis, it scans the log forward and reapplies every logged update to the data pages, whether or not that transaction later committed. The pageLSN stored on each page tells it whether the update is already present, so nothing is applied twice. Option 1 is the analysis pass and option 3 is the undo pass, while writing a checkpoint is normal runtime work rather than recovery.
प्रश्न 7उत्तर + हल
ARIES में निरसन (undo) के दौरान कौन-से लॉग अभिलेख लिखे जाते हैं, ताकि दूसरी बार क्रैश होने पर वही पलटाव दोबारा न करना पड़े?
In ARIES, which log records are written while undoing a transaction so that the same rollback work is not repeated after a second crash?
Bक्षतिपूर्ति लॉग अभिलेख (compensation log records)Compensation log records
Cचेकपॉइंट (checkpoint)Checkpoint
Dडेटाबेस की शैडो प्रति (shadow copy)Shadow copy of the database
सही उत्तर / Answer: (B)
हल / Solution
ARIES हारे हुए लेन-देन (loser transaction) का बदलाव पलटते समय हर पलटाव के लिए एक क्षतिपूर्ति लॉग अभिलेख (compensation log record, CLR) लिखती है। CLR सिर्फ़ redo होता है, कभी undo नहीं, और उसमें आगे का सूचक (undoNextLSN) रहता है। इसलिए निरसन के बीच दोबारा क्रैश हो जाए तो पलटा हुआ काम दोहराया नहीं जाता। गंदा पेज तालिका और चेकपॉइंट विश्लेषण तथा redo में काम आते हैं, और शैडो प्रति ARIES में होती ही नहीं।
When ARIES rolls back a loser transaction, it writes a compensation log record, or CLR, for every change it undoes. A CLR is redo-only, never undone, and it carries an undoNextLSN pointer to the record still waiting to be rolled back. So if the system crashes again during undo, the rollback already done is not repeated. The dirty page table and checkpoints serve the analysis and redo passes, and ARIES has no shadow copy.
प्रश्न 8उत्तर + हल
ARIES पुनर्प्राप्ति एल्गोरिथ्म में निरसन चरण (undo phase) का उद्देश्य क्या है?
In ARIES recovery algorithm, what is the purpose of the undo phase?
Aलॉग से बदलाव डेटाबेस पर लागू करनाTo apply changes from the log to the database
Bप्रतिबद्ध (committed) लेन-देन के बदलाव दोबारा करनाTo redo changes made by committed transactions
Cनिरस्त (aborted) या अधूरे लेन-देन के बदलाव पलटनाTo undo changes made by aborted or incomplete transactions
Dलॉग का विश्लेषण करके निरसन योग्य लेन-देन की सूची बनानाTo analyze the log and determine the set of transactions to be undone
सही उत्तर / Answer: (C)
हल / Solution
ARIES तीन चरणों में चलती है — विश्लेषण (analysis), पुनःकरण (redo) और निरसन (undo)। निरसन चरण में सिर्फ़ उन लेन-देन (transaction) के बदलाव पलटे जाते हैं जो क्रैश के समय अधूरे थे या निरस्त हो चुके थे; इन्हें हारे हुए लेन-देन (loser transactions) कहते हैं। हर पलटाव का क्षतिपूर्ति अभिलेख (compensation log record, CLR) भी लिखा जाता है। विकल्प 1 और 2 redo चरण का काम हैं, विकल्प 4 विश्लेषण चरण का।
ARIES recovery runs in three passes: analysis, redo and undo. The undo pass rolls back only those transactions that were still incomplete, or had already been aborted, when the crash happened; these are called loser transactions. Each rollback step writes its own compensation log record, so the undo work itself survives another crash. Options 1 and 2 describe the redo pass, and option 4 describes the analysis pass, so none of them fits the undo pass.
प्रश्न 9उत्तर + हल
ARIES किस पुनर्प्राप्ति (recovery) तकनीक पर आधारित है?
Which of the following recovery techniques is ARIES based on?
ARIES की पूरी बनावट राइट-अहेड लॉगिंग (write-ahead logging, WAL) पर खड़ी है। नियम यह है कि बदलाव का लॉग अभिलेख (log record) पहले स्थायी भंडारण में पहुँचे, डेटा पेज डिस्क पर बाद में लिखा जाए। इसी लॉग से क्रैश के बाद redo और undo दोनों हो पाते हैं। चेकपॉइंटिंग मदद करती है, पर आधार नहीं है। शैडो पेजिंग अलग तरीक़ा है, जिसमें लॉग चाहिए ही नहीं। विलंबित अद्यतन (deferred update) में बदलाव commit तक रोके जाते हैं।
ARIES is built on write-ahead logging (WAL). The rule is simple: the log record describing a change must reach stable storage before the changed data page is written to disk. That log is what makes both redo and undo possible after a crash. Checkpointing helps ARIES but is not its foundation. Shadow paging is a different scheme that needs no log at all. Deferred update holds changes back until commit, while ARIES lets dirty pages go to disk earlier.
प्रश्न 10उत्तर + हल
ARIES recovery के दौरान transactions की atomicity कैसे पक्की करता है?
How does ARIES ensure atomicity of transactions during recovery?
Atwo-phase commit protocol इस्तेमाल करकेBy using two-phase commit protocol
Bcommit होने तक updates को buffer में रखकरBy buffering updates until the transaction commits
Cबदलावों का log रखकर और यह पक्का करके कि बदलाव या तो पूरे हटें या पूरे लगेंBy maintaining a log of changes and ensuring that changes are either fully undone or redone
Dmulti-version concurrency control इस्तेमाल करकेBy using multi-version concurrency control
सही उत्तर / Answer: (C)
हल / Solution
atomicity का मतलब है — transaction का काम पूरा दिखे या बिलकुल न दिखे, आधा कभी नहीं। ARIES यह log के सहारे करता है: commit हो चुके transaction के छूटे बदलाव redo चरण पूरे लगा देता है, और अधूरे transaction के बदलाव undo चरण पूरे हटा देता है, हर पलटाव का record भी लिखता जाता है। two-phase commit कई जगह फैले transaction के लिए है, और MVCC concurrency का औज़ार है।
Atomicity means the work of a transaction must be seen completely or not at all, never half way. ARIES achieves this through the log: the redo pass fully applies the missing changes of a committed transaction, while the undo pass fully removes the changes of an unfinished one, recording every reversal as it goes. The two phase commit protocol addresses transactions spread over several sites, and multiversion concurrency control is a concurrency tool.
आगे के 20 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति