पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 15 के उत्तर और हल FliQi Question Bank app में।
भाषा
प्रश्न 1उत्तर + हल
«NoSQL» नाम को आज सबसे ठीक किस अर्थ में समझा जाता है?
The name 'NoSQL' is today best understood as standing for:
A«Not only SQL» — गैर-relational भंडारों का एक परिवार, जिनमें से बहुत-से अपनी query भाषा भी देते हैं'Not only SQL' - a family of non-relational stores, many of which still provide their own query languages
Bयह नियम कि किसी भी application में SQL का प्रयोग कभी न किया जाएA rule that SQL must never be used in any application
Cकोई एक मानक डेटाबेस उत्पादOne single standard database product
Dडेटा संचय के लिए सरकार द्वारा तय किया गया मानकA government standard for storing data
सही उत्तर / Answer: (A)
हल / Solution
यह नाम शुरू में relational परम्परा के इनकार के रूप में आया, पर आगे «not only SQL» के पाठ पर टिक गया — अर्थात् ऐसे भंडार relational के साथ बैठते हैं, उन्हें मना नहीं करते; उनमें से बहुत-से अपनी query भाषा भी देते हैं। NoSQL एक श्रेणी है, कोई एक उत्पाद नहीं, इसलिए उत्पाद वाला विकल्प ग़लत है, और इसे कोई सरकारी निकाय तय नहीं करता। दोनों प्रकार साथ प्रयोग करने वाले तंत्र सामान्य प्रथा हैं।
The label began as a rejection of the relational default, but it settled into the reading not only SQL, meaning such stores sit beside relational ones instead of banning them; many of them also expose a query language of their own. NoSQL is a category rather than a product, so the single-product choice is wrong, and no government body defines it. Mixed systems that use both kinds together are ordinary practice.
प्रश्न 2उत्तर + हल
कौन-सा कार्यभार NoSQL डेटाबेस चुनने का सबसे मज़बूत कारण बनता है?
Which workload makes the strongest case for choosing a NoSQL database?
Aनियत payroll table, जिसके column कभी नहीं बदलतेA fixed payroll table whose columns never change
Bकुछ हज़ार row का छोटा बहीखाता, जिसमें कड़े द्वि-प्रविष्टि transaction चाहिएA small ledger of a few thousand rows needing strict double-entry transactions
Cबदलते रहने वाले field वाला अर्ध-संरचित विशाल डेटा, जिसे बहुत-से server पर फैलाना हैA very large volume of semi-structured data with fields that keep changing, which must scale out over many servers
Dआठ सम्बन्धित table पर join से बनने वाला मासिक प्रतिवेदनA monthly report built from joins over eight related tables
सही उत्तर / Answer: (C)
हल / Solution
NoSQL तब अपना मोल चुकाता है जब डेटा भारी हो, उसका आकार अनियमित या अभी बदलता हुआ हो, और भार बहुत-सी सामान्य मशीनों पर फैलाना पड़े। कड़े transaction माँगने वाला छोटा बहीखाता, कभी न बदलने वाले column की table, तथा बहुत-से join से बना प्रतिवेदन — इन तीनों को relational इंजन बेहतर सेवा देता है, जो ACID की गारंटी और join के लिए query planner देता है। इसलिए भारी, अनियमित और फैलाने योग्य कार्यभार ही सचमुच NoSQL माँगता है।
NoSQL earns its keep when the data is bulky, its shape is irregular or still evolving, and the load must be spread over many ordinary machines. A small ledger needing strict transactions, a table whose columns never move, and a report built from many joins are all served better by a relational engine, which gives ACID guarantees and a planner for joins. So the bulky, irregular, scale-out workload is the one that truly calls for NoSQL.
प्रश्न 3उत्तर + हल
किस आवश्यकता के लिए NoSQL भंडार के बजाय परम्परागत relational डेटाबेस सामान्यतः बेहतर चुनाव होगा?
For which requirement would a traditional relational database usually be the better choice over a NoSQL store?
Aऐसे अभिलेख, जिनके field एक से दूसरे में बदलते रहते हैंRecords whose set of fields differs from one record to the next
Bअर्ध-संरचित log घटनाओं की बहुत बड़ी धारा संचित करनाStoring a very large stream of semi-structured log events
Cभारी लेखन-भार को बहुत-सी सामान्य मशीनों पर फैलानाSpreading a heavy write load across many commodity servers
Dसुव्यवस्थित डेटा पर कड़े multi-row ACID transaction के साथ जटिल तदर्थ (ad-hoc) joinStrict multi-row ACID transactions together with complex ad-hoc joins over well-structured data
सही उत्तर / Answer: (D)
हल / Solution
बैंक जैसे काम में कई row को एक साथ बदलना होता है या बिलकुल नहीं, और ऐसी query में बहुत-सी table जोड़ने की छूट चाहिए जिनकी किसी ने पहले योजना नहीं बनाई थी। Relational इंजन ठीक इसी के लिए बने हैं — नियत schema और पका हुआ optimiser लेकर। बाक़ी तीन आवश्यकताएँ NoSQL की जानी-मानी ताक़तें गिनाती हैं — अर्ध-संरचित विशाल धाराएँ, सस्ते node पर फैला लेखन-भार, और बदलते field वाले अभिलेख।
Banking-style work needs several rows to change together or not at all, and it needs the freedom to join many tables in queries nobody planned for. Relational engines were built for exactly that, with a fixed schema and a mature optimiser. The other three requirements listed are the classic NoSQL strengths: huge semi-structured streams, write load spread over cheap nodes, and records whose fields vary. None of them favours a relational store.
प्रश्न 4उत्तर + हल
BASE में «soft state» पद का अर्थ क्या है?
In BASE, the phrase 'soft state' means that:
Aडेटा केवल अस्थिर स्मृति में रहता है और पुनरारम्भ पर खो जाता हैThe data is held only in volatile memory and is lost on restart
Bसंचित स्थिति समय के साथ बिना नए निवेश के भी बदल सकती है, क्योंकि प्रतियाँ एक-सी होती रहती हैंThe stored state may change over time without fresh input, as the replicas keep converging
Cडेटा की केवल छपी हुई प्रतियाँ रखी जाती हैंOnly printed copies of the data are retained
Dहर लेखन से पहले schema को गोपित (encrypt) किया जाता हैThe schema is encrypted before every write
सही उत्तर / Answer: (B)
हल / Solution
Soft state अभिसरण की बात है, अस्थिरता की नहीं। अद्यतन फैलने के बीच कोई node पुराना मान थामे रह सकता है, इसलिए वही पठन थोड़ी देर बाद दोहराने पर भिन्न उत्तर दे सकता है, जबकि ग्राहक ने नया कुछ भेजा ही नहीं। अस्थिर स्मृति वाला विकल्प स्मृति में बसे cache का वर्णन है, जो सर्वथा अलग धारणा है। छपी प्रतियाँ डेटाबेस की स्थिति नहीं होतीं, और schema गोपित करने का BASE से कोई सम्बन्ध नहीं।
Soft state is about convergence, not about volatility. One node may still hold an older value while an update is spreading, so the same read repeated a moment later can give a different answer although the client sent nothing new. The claim about volatile memory describes an in-memory cache, a separate idea altogether. Printed copies are not database state, and encrypting the schema has no connection with BASE.
प्रश्न 5उत्तर + हल
ACID और BASE की सोच में मुख्य अन्तर क्या है?
What is the main contrast between the ACID approach and the BASE approach?
AACID हर transaction के बाद डेटा के तुरन्त सुसंगत होने पर अड़ता है, जबकि BASE उपलब्धता और विस्तार के बदले थोड़ी देर की असंगति स्वीकार करता हैACID insists that every transaction leave the data consistent at once, while BASE accepts short-lived inconsistency in exchange for availability and scale
BBASE तुरन्त सुसंगति पर अड़ता है, जबकि ACID उसे पीछे छूटने देता हैBASE insists on immediate consistency, while ACID lets it lag behind
CACID केवल NoSQL भंडारों पर और BASE केवल relational तंत्रों पर लागू होता हैACID applies only to NoSQL stores and BASE only to relational systems
DBASE डेटा का backup लेने की आवश्यकता समाप्त कर देता हैBASE removes the need to take backups of the data
सही उत्तर / Answer: (A)
हल / Solution
ACID पहले शुद्धता बचाता है — transaction या पूरा होकर डेटाबेस को सुसंगत छोड़ता है, या पूरी तरह पलट दिया जाता है। BASE इसे ढीला करता है जिससे समूह चलता रहे और बढ़ता रहे; प्रतियाँ थोड़ी देर असहमत रह सकती हैं और बाद में एक-सी हो जाती हैं। BASE को तुरन्त सुसंगति पर अड़ा बताना दोनों नाम आपस में बदल देता है। ACID relational तंत्रों में पला, और backup परिचालन का कर्तव्य है जिसे कोई model हटा नहीं सकता।
ACID protects correctness first: a transaction either completes and leaves the database consistent, or is undone entirely. BASE loosens that so a cluster can stay up and keep scaling, letting replicas disagree briefly and converge later. Saying that BASE insists on immediate consistency merely swaps the two names. ACID in fact grew up in relational systems, and backups are an operational duty that no consistency model can remove.
प्रश्न 6उत्तर + हल
Eventual consistency क्या सुनिश्चित करती है?
Eventual consistency guarantees that:
Aकोई transaction कभी rollback नहीं हो सकताNo transaction can ever be rolled back
Bहर पठन, लेखन के commit होते ही नवीनतम मान लौटाता हैEvery read returns the newest write the instant it is committed
Cयदि आगे कोई अद्यतन न हो, तो कुछ समय बाद हर प्रति वही मान लौटाएगीIf no further updates are made, every replica will in time return the same value
Dडेटा कभी एक से अधिक node पर प्रतिलिपित नहीं होताData is never copied to more than one node
सही उत्तर / Answer: (C)
हल / Solution
Eventual consistency अन्तिम स्थिति का वचन है, किसी एक क्षण का नहीं — अद्यतन रुकने पर प्रतियाँ एक-सी हो जाती हैं और पठन सहमत हो जाते हैं। अद्यतन फैलने के बीच दो ग्राहक भिन्न मान देख सकते हैं, और इसीलिए commit होते ही नवीनतम मान देने वाला वचन, यानी strong consistency, इससे कड़ा तथा भिन्न है। Rollback transaction का विषय है, और eventual consistency replication को मानकर चलती है, मना नहीं करती।
Eventual consistency is a promise about the end state, not about any single instant: given a pause in updates, the replicas converge and reads agree. While an update is still spreading, two clients may see different values, which is why returning the newest write immediately, that is strong consistency, is a stronger and different guarantee. Rollback is a transaction matter, and eventual consistency presupposes replication rather than forbidding it.
प्रश्न 7उत्तर + हल
NoSQL के सन्दर्भ में BASE किसका संक्षिप्त रूप है?
In the NoSQL context, BASE is an acronym for:
ABackup And Serial Execution
BBinary Atomic Storage Engine
CBalanced Access with Shared Execution
DBasically Available, Soft state, Eventually consistent
सही उत्तर / Answer: (D)
हल / Solution
BASE को ACID के जान-बूझकर बनाए गए प्रतिरूप के तौर पर गढ़ा गया था। Basically available का अर्थ है कि तंत्र के कुछ भाग लड़खड़ाते हुए भी वह अनुरोधों का उत्तर देता रहे; soft state का अर्थ है कि किसी प्रति का मान अद्यतन फैलने के साथ स्वयं बदल सकता है; eventually consistent का अर्थ है कि नए अद्यतन रुक जाने पर प्रतियाँ एक-सी हो जाती हैं। बाक़ी तीन विस्तार गढ़े हुए हैं, डेटाबेस साहित्य में उनका कोई स्थान नहीं।
BASE was coined as a deliberate counterpart to ACID. Basically available means the system answers requests even when parts of it are struggling; soft state means a replica's value may change on its own as updates spread; eventually consistent means the copies converge once updates stop arriving. The remaining three expansions are invented strings with no standing in database literature, and each can be dismissed at once.
प्रश्न 8उत्तर + हल
कोई भंडार network partition के दौरान भी पठन और लेखन स्वीकार करता रहता है, चाहे कुछ प्रतियाँ बासी मान लौटाएँ। CAP की भाषा में उसका वर्गीकरण क्या है?
A store keeps accepting reads and writes during a network partition, even though some replicas may return stale values. In CAP terms it is classified as:
AAP तंत्रAn AP system
BCP तंत्रA CP system
CCA तंत्रA CA system
DACID तंत्रAn ACID system
सही उत्तर / Answer: (A)
हल / Solution
Partition के दौरान हर अनुरोध का उत्तर देना availability बचाता है और partition सह लेना P बचाता है, पर बासी उत्तर का अर्थ है कि कड़ी consistency छोड़ दी गई; ऐसे भंडार को AP कहते हैं। CP भंडार उलटा करता है — consistency बचाने के लिए अल्पमत वाली ओर के अनुरोध ठुकरा या रोक देता है। CA का अर्थ तभी है जब partition कभी हो ही नहीं, और ACID transaction का model है, CAP का वर्ग नहीं।
Answering every request during a partition preserves availability, and tolerating the partition preserves P, but a stale reply means strict consistency has been let go; such a store is called AP. A CP store does the opposite and refuses or blocks requests on the minority side in order to protect consistency. CA is meaningful only where partitions never happen, and ACID is a transaction model rather than a CAP class.
प्रश्न 9उत्तर + हल
वितरित NoSQL भंडार के designer partition tolerance को सामान्यतः अपरिहार्य क्यों मानते हैं?
Why do designers of distributed NoSQL stores normally treat partition tolerance as non-negotiable?
Aक्योंकि ACID के लिए partition tolerance आवश्यक हैBecause ACID requires partition tolerance
Bक्योंकि उसे छोड़ देने से हर query धीमी हो जाएगीBecause dropping it would slow every query down
Cक्योंकि CAP theorem consistency को सिरे से मना करती हैBecause the CAP theorem forbids consistency outright
Dक्योंकि node के बीच का network कभी भी बिगड़ सकता है, और तब भी भंडार को चलना ही हैBecause the network between nodes can always fail, and the store must keep working when it does
सही उत्तर / Answer: (D)
हल / Solution
डेटा जैसे ही कई मशीनों पर रहने लगता है, तार, switch और process बिगड़ सकते हैं, और कोई design इसे मना नहीं कर सकती। Partition tolerance के बिना भंडार पहली बार सन्देश खोने पर ही सही रहना बन्द कर देगा, इसलिए यह गुण मान ही लिया जाता है और असली चुनाव विफलता के दौरान consistency तथा availability के बीच रहता है। गति अलग विषय है, CAP consistency को मना नहीं करती, और ACID partition पर कुछ कहती ही नहीं।
Once data lives on several machines, cables, switches and processes can fail, and no design can forbid that. A store without partition tolerance would stop being correct the first time a message was lost, so the property is simply assumed, and the real choice is between consistency and availability during the failure. Speed is a separate concern, CAP does not forbid consistency, and ACID says nothing about partitions.
प्रश्न 10उत्तर + हल
CAP theorem के बारे में कौन-सा कथन सही है?
Which statement about the CAP theorem is correct?
Aवितरित तंत्र को तीनों गुणों में से एक स्थायी रूप से छोड़ना पड़ता है, चाहे network पूरी तरह स्वस्थ होA distributed system must permanently abandon one of the three properties even when the network is perfectly healthy
Bजब तक network partition वास्तव में चल रहा है, तंत्र को consistency या availability में से एक छोड़नी पड़ती हैWhile a network partition is actually occurring, the system must give up either consistency or availability
CPartition tolerance निश्चिंत होकर छोड़ी जा सकती है, क्योंकि node के बीच सम्पर्क कभी नहीं टूटताPartition tolerance may safely be dropped, because links between nodes never fail
Dयह theorem केवल एकल-node डेटाबेस के व्यवहार का वर्णन करती हैThe theorem describes the behaviour of a single-node database only
सही उत्तर / Answer: (B)
हल / Solution
CAP को प्रायः «तीनों में से कोई दो चुन लो» कहकर ग़लत बताया जाता है। सही पाठ अधिक सीमित है — यह सौदा केवल तब पड़ता है जब partition चल रहा हो, और तब तंत्र को या अनुरोध ठुकराकर consistency रखनी होती है, या सम्भवतः बासी डेटा देकर availability। Network ठीक हो तो भंडार दोनों रह सकता है, इसीलिए स्थायी त्याग वाला कथन ग़लत है। सम्पर्क टूटते हैं, और theorem वितरित तंत्रों की ही है।
CAP is often mis-stated as pick any two of the three. The accurate reading is narrower: the trade-off bites only while a partition is in progress, and the system must then either refuse requests to stay consistent, or answer them with possibly stale data to stay available. When the network is sound a store can be both, so the claim about a permanent sacrifice is wrong. Links do fail, and the theorem concerns distributed systems.
आगे के 15 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
Sharding से अलग, replication का मुख्य प्रयोजन क्या है?
Replication, as distinct from sharding, is used mainly to:
ACollection से दोहराए गए अभिलेख हटानाRemove duplicate records from a collection
Bडेटा को बाँटकर समूह का कुल भंडारण बढ़ानाRaise the total storage of the cluster by dividing the data
Cयह सुनिश्चित करना कि हर transaction serialisable होGuarantee that every transaction is serialisable
Dएक ही डेटा की प्रतियाँ कई node पर रखना, जिससे उपलब्धता और दोष-सहिष्णुता मिलेHold copies of the same data on several nodes, for availability and fault tolerance
Aएक तार्किक डेटासेट को असंयुक्त (disjoint) भागों में बाँटना, और हर भाग को भिन्न node पर रखनाSplitting one logical dataset into disjoint parts, each kept on a different node
Bपूरे डेटासेट की पूरी प्रति हर node पर रखनाKeeping a full copy of the whole dataset on every node
Cकम पढ़े जाने वाले अभिलेखों को संपीडित करनाCompressing the records that are rarely read
DDocument को relational table में बदल देनाConverting documents into relational tables
Horizontal scaling की तुलना में vertical scaling की असली कमी कौन-सी है?
Which is a genuine drawback of vertical scaling when compared with horizontal scaling?
Aयह किसी भी प्रकार की indexing असम्भव बना देती हैIt makes any form of indexing impossible
Bयह डेटा को कई node में बाँटने के लिए विवश करती हैIt forces the dataset to be partitioned across many nodes
Cएक मशीन को हार्डवेयर की सीमा तक ही बड़ा किया जा सकता है, और वह एकल विफलता-बिंदु बनी रहती हैOne machine can be enlarged only up to a hardware ceiling, and it stays a single point of failure
Dइसका उपयोग केवल graph डेटाबेस के साथ हो सकता हैIt can be used only with graph databases
अधिकांश NoSQL भंडार collection के बीच server-side join नहीं देते। इससे कौन-सी design-प्रथा निकलती है?
Most NoSQL stores offer no server-side join across collections. Which design practice follows from this?
Aडेटा को तीसरे सामान्य रूप (third normal form) तक और तोड़ा जाता हैData is decomposed further until it reaches third normal form
Bसम्बन्धित डेटा प्रायः एक ही document में अंतर्निहित कर दिया जाता है, अर्थात् जान-बूझकर denormalise किया जाता हैRelated data is often embedded in one document, that is, deliberately denormalised
CJoin करवाने के लिए और foreign-key constraint घोषित किए जाते हैंMore foreign-key constraints are declared to force the join
Dहर query को nested SQL subquery के रूप में फिर से लिखा जाता हैEvery query is rewritten as a nested SQL subquery
Column-family (wide-column) NoSQL भंडार का सबसे सही वर्णन कौन-सा है?
Which statement best describes a column-family (wide-column) NoSQL store?
Aहर row में बिलकुल वही column होने चाहिए जो table बनाते समय तय हुए थेEvery row must hold exactly the same columns, fixed when the table is created
Bसम्बन्धित column को family में समूहित कर साथ रखा जाता है, और भिन्न row में भिन्न column हो सकते हैंRelated columns are grouped into families and stored together, and different rows may hold different columns
Cडेटा केवल edge से जुड़े node के रूप में रखा जाता हैData is held only as nodes joined by edges
Dहर अभिलेख एक अपारदर्शी blob है, जो कुंजी से पूरा ही निकाला जा सकता हैEach record is one opaque blob that can only be fetched whole by its key