FliQi Education App Download
RPSC Programmer — Paper I · प्रश्न-बैंक

RPSC Programmer — Paper I — Programmer DBMS के प्रश्न

1,237 जाँचे हुए प्रश्न · 15 topics · परीक्षा में 40 प्रश्न

Topics

प्रश्न

पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 10 के उत्तर और हल FliQi Question Bank app में।

भाषा
प्रश्न 1उत्तर + हल Recovery Techniques
shadow paging में transaction चलते समय shadow page table का क्या होता है?
What happens to the shadow page table during transaction execution in shadow paging?
  1. Aहर transaction operation के बाद वह बदल दी जाती हैIt is updated after each transaction operation
  2. Btransaction के commit होने तक वह जैसी है वैसी रहती हैIt remains unchanged until the transaction commits
  3. Cहर transaction के लिए वह नए सिरे से बनाई जाती हैIt is recreated for each transaction
  4. Dवह transaction की निर्भरताएँ जानने के लिए इस्तेमाल होती हैIt is used to track transaction dependencies

सही उत्तर / Answer: (B)

हल / Solution
shadow paging में दो page table चलते हैं। transaction जिस पर काम करता है वह current है, उसमें नए पन्नों के पते जुड़ते जाते हैं। shadow table को कोई नहीं छूता, वह commit तक पुरानी जमी हुई हालत की ओर इशारा करती रहती है — abort होते ही उसी पर लौट आते हैं। हर transaction की शुरुआत में shadow एक बार बनती ज़रूर है, पर प्रश्न चलने के दौरान की बात पूछ रहा है, तब वह अछूती रहती है।
Shadow paging works with two page tables. The transaction operates on the current table, and addresses of freshly written pages keep getting added there. Nobody touches the shadow table; until the commit it keeps pointing at the old frozen state, and an abort simply returns to it. A shadow copy is indeed made once at the start of each transaction, but the question asks about the execution period, and during that period the shadow table stays untouched.
प्रश्न 2उत्तर + हल Concurrency Control
Snapshot Isolation में पढ़ने के काम कैसे सँभाले जाते हैं?
In Snapshot Isolation, how are read operations handled?
  1. Aपढ़ने वालों को डेटा का सबसे नया संस्करण मिलता हैReads are allowed to access the most recent version of data
  2. Bटकराने वाले सारे transaction पूरे होने तक पढ़ना रोक दिया जाता हैReads are blocked until all conflicting transactions complete
  3. Cपढ़ने वाले transaction शुरू होने के समय के संगत snapshot से पढ़ते हैंReads access a consistent snapshot of the database at the start of the transaction
  4. Dपढ़ने वाले transaction की हालत देखे बिना किसी भी संस्करण से पढ़ सकते हैंReads are allowed to access any version of data, regardless of transactional state

सही उत्तर / Answer: (C)

हल / Solution
Snapshot Isolation में transaction को शुरुआत में ही एक snapshot मिल जाता है और उसके सारे पढ़ाई-कार्य उसी रूप से होते हैं। बीच में कोई और commit कर दे तो वह बदलाव इस transaction को दिखता नहीं, इसलिए वही query दोबारा चलाने पर भी वही नतीजा आता है। सबसे नया संस्करण देना ग़लत है क्योंकि वह snapshot से बाहर का हो सकता है। पढ़ाई रोकी नहीं जाती, और बिना commit वाले संस्करण कभी नहीं दिखते।
Under Snapshot Isolation a transaction receives its snapshot at the start, and all of its reads are served from that same view. If someone else commits meanwhile, the change stays invisible to this transaction, so rerunning the same query gives the same answer. Handing over the newest version would be wrong, since it may lie outside the snapshot. Reads are never blocked, and uncommitted versions are never shown.
प्रश्न 3उत्तर + हल Transaction Management
एक social media platform पर transaction T1 किसी उपयोगकर्ता की profile पर status update डालता है और transaction T2 उसी उपयोगकर्ता की profile picture पढ़ता है। दोनों के बीच view serializability के बारे में कौन-सा कथन सही है?
In a social media platform, transaction T1 posts a status update on a user's profile, while transaction T2 retrieves the user's profile picture. Which of the following options accurately describes the view serializability between T1 and T2?
  1. Aview serializability तय नहीं की जा सकती।View serializability cannot be determined.
  2. BT1 और T2 view serializable नहीं हैं।T1 and T2 are not view serializable.
  3. CT1 और T2 view serializable हैं।T1 and T2 are view serializable.
  4. Dइस स्थिति में view serializability लागू ही नहीं होती।View serializability is not applicable in this scenario.

सही उत्तर / Answer: (C)

हल / Solution
status update और profile picture दो अलग data item हैं। T1 पहले वाले पर लिखता है, T2 दूसरे को पढ़ता है, इसलिए दोनों के बीच कोई conflicting जोड़ी बनती ही नहीं। ऐसे में इनका कोई भी schedule किसी serial क्रम के बराबर होता है, यानी view serializable है। 'तय नहीं की जा सकती' और 'लागू नहीं होती' दोनों ग़लत हैं, क्योंकि view serializability हर schedule पर लागू होती है और यहाँ आसानी से तय भी हो जाती है।
The status update and the profile picture are two separate data items. T1 writes the first one and T2 reads the second, so no conflicting pair of operations exists between them. Any schedule of these two transactions is therefore equivalent to a serial order, which makes it view serializable. Saying it cannot be determined or does not apply is wrong, because view serializability applies to every schedule and is easy to settle here.
प्रश्न 4उत्तर + हल Query Processing & Query Optimization
क्वेरी optimization में predicate pushdown का उद्देश्य क्या है?
In query optimization, what is the purpose of predicate pushdown?
  1. Aशर्तों को जितना जल्दी हो सके जाँच लेनाTo evaluate predicates as early as possible in the query execution process
  2. Bशर्तों की जाँच बाक़ी सारी क्रियाओं के बाद तक टाल देनाTo postpone predicate evaluation until all other operations have been performed
  3. Cplan से बेकार पड़ी शर्तें हटा देनाTo eliminate redundant predicates from the query execution plan
  4. Dबीच के परिणामों पर शर्तें लगानाTo apply predicates to intermediate query results

सही उत्तर / Answer: (A)

हल / Solution
pushdown का मक़सद है शर्त को plan में जितना जल्दी हो सके लगा देना, यानी join और sort से भी पहले। ऐसा करने पर आगे के चरणों को बहुत कम पंक्तियाँ मिलती हैं और बीच के परिणाम छोटे रह जाते हैं। इसलिए पहला विकल्प सही है। शर्त को अंत तक टालना तो उलटा काम है। बेकार शर्तें हटाना predicate elimination कहलाता है, और बीच के परिणाम पर शर्त लगाना वही देर वाली स्थिति है जिससे बचना है।
The point of pushdown is to apply a condition as early in the plan as possible, even before the joins and sorts. The later steps then receive far fewer rows and the intermediate results stay small, which cuts the cost. Hence option 1. Postponing the condition until the end is the opposite idea. Dropping useless conditions is called predicate elimination, and filtering only the intermediate results is exactly the late evaluation we want to avoid.
प्रश्न 5उत्तर + हल Indexing and Hashing
B+ tree में traversal के दौरान internal node से leaf node तक pointer के पीछे चलने का उद्देश्य क्या है?
During a traversal operation in a B+ tree, what is the purpose of following the pointers from internal nodes to leaf nodes?
  1. Aजिस key की तलाश है उस तक पहुँचनाTo locate the target key
  2. Bपेड़ को दोबारा संतुलित करनाTo rebalance the tree
  3. Cपेड़ में keys की कुल गिनती करनाTo count the total number of keys in the tree
  4. Dkeys को क्रम में दोबारा जमानाTo rearrange the keys in sorted order

सही उत्तर / Answer: (A)

हल / Solution
internal node data नहीं रखते, वे सिर्फ़ रास्ता बताते हैं। हर node पर खोजी जा रही key की तुलना वहाँ रखी keys से होती है और उसी से आगे का pointer चुना जाता है। इसी तरह वह leaf मिल जाता है जहाँ record या उसका pointer पड़ा है। संतुलन insert और delete के समय बनता है, खोज के समय नहीं। गिनती और क्रम जमाना traversal का मक़सद नहीं, क्योंकि leaf पहले से क्रम में हैं।
Internal nodes of a B+ tree hold no data at all, they only point the way. At each node the searched key is compared with the separator keys, and that decides which child pointer to follow. Step by step the walk reaches the leaf holding the record or its pointer. Rebalancing belongs to insert and delete, not to a read. Counting keys or sorting them is not the aim either, since the leaves are already kept in order.
प्रश्न 6उत्तर + हल Integrity Constraints and Codd's Rule
सशर्त अखंडता प्रतिबंध किस स्थिति में सबसे उपयोगी होते हैं?
In what scenario would conditional integrity constraints be most useful?
  1. Aजब कई तालिकाओं में अनोखापन लागू करना होWhen enforcing uniqueness across multiple tables
  2. Bजब कुछ डेटा प्रविष्टियों को दर्ज होने से पहले स्वीकृति चाहिए होWhen certain data entries require approval before being committed
  3. Cजब प्रतिबंध का लागू होना कुछ ख़ास शर्तों के पूरा होने पर निर्भर करता होWhen the integrity constraint depends on specific conditions being met
  4. Dजब जनक-संतान तालिकाओं के बीच रेफरेंशियल इंटीग्रिटी बनानी होWhen ensuring referential integrity between parent-child tables

सही उत्तर / Answer: (C)

हल / Solution
सशर्त प्रतिबंध हर पंक्ति पर एक जैसा नहीं चलता, वह तभी लागू होता है जब कोई शर्त पूरी हो। जैसे कर्मचारी की श्रेणी स्थायी हो तभी पेंशन वाला स्तंभ भरा जाना ज़रूरी हो। इसलिए तीसरा विकल्प सही है। कई तालिकाओं में अनोखापन एसर्शन या ट्रिगर से सँभाला जाता है। स्वीकृति वाली बात कामकाज की प्रक्रिया है, प्रतिबंध नहीं। जनक-संतान का रिश्ता साधारण विदेशी कुंजी से ही बन जाता है।
A conditional constraint does not apply uniformly to every row; it takes effect only when a stated condition holds, for instance requiring the pension column to be filled only when an employee is marked permanent. That is why option 3 is correct. Uniqueness spanning several tables is handled by assertions or triggers. Requiring approval before data is committed is a workflow matter rather than a constraint, and a plain foreign key already establishes a parent-child link.
प्रश्न 7उत्तर + हल Complex Queries, Triggers, Views and Schema modification
SQL में index fragmentation को कैसे दूर किया जाता है?
How can you address index fragmentation in SQL?
  1. Aindex को नियमित रूप से दोबारा बनाकर (rebuild)By regularly rebuilding indexes
  2. Bindex में और columns जोड़करBy adding more columns to the index
  3. Cindex का schema बदलकरBy modifying the index schema
  4. Dindex statistics को अद्यतन करकेBy updating index statistics

सही उत्तर / Answer: (A)

हल / Solution
Fragmentation का मतलब है कि index के पेज क्रम से नहीं रहे और उनमें ख़ाली जगह बढ़ गई। इसका सीधा इलाज rebuild है, जो पूरे index को नए सिरे से सजा देता है; हल्का बिखराव हो तो reorganize से भी काम चल जाता है। Columns जोड़ने से index और भारी ही होगा, और schema बदलना अलग बात है। Statistics अद्यतन करना ज़रूरी काम है, पर वह optimizer के अंदाज़े सुधारता है, पेजों का बिखराव नहीं मिटाता।
Fragmentation means the index pages are no longer in order and carry a lot of empty space. The direct cure is a rebuild, which lays the whole index out again, while light fragmentation can be cleared by a reorganize. Adding columns would only make the index heavier, and changing the schema is a separate matter. Updating statistics is useful work, but it sharpens the optimizer estimates and does nothing about scattered pages.
प्रश्न 8उत्तर + हल Basic SQL
database में किसी user को अधिकार देने के लिए कौन-सा SQL command चलाया जाता है?
Which SQL command is used to grant privileges to a user in a database?
  1. AGRANT
  2. BALLOW
  3. CPERMISSION
  4. DACCESS

सही उत्तर / Answer: (A)

हल / Solution
अधिकार देने का command GRANT है, इसलिए विकल्प 1 सही है — GRANT SELECT ON student TO ravi; दिया हुआ अधिकार वापस लेना हो तो REVOKE चलाते हैं। बाक़ी तीनों शब्द SQL के command नहीं हैं। GRANT और REVOKE दोनों DCL यानी data control language में आते हैं, जिसका काम यह तय करना है कि कौन किस तालिका पर क्या कर सकता है — पढ़ना, जोड़ना, बदलना या मिटाना।
Privileges are handed out with GRANT, so option 1 is right, as in GRANT SELECT ON student TO ravi; To take a privilege back you run REVOKE instead. The other three words are not SQL commands at all. GRANT and REVOKE belong to DCL, the data control language, whose job is to decide who may do what on which table: read it, insert into it, change it or delete from it.
प्रश्न 9उत्तर + हल Relational Algebra and Relational calculus
रिलेशनल अलजेब्रा में प्रोजेक्शन संक्रिया को कौन-सा संकेतन दर्शाता है?
Which notation represents the projection operation in relational algebra?
  1. Aσ_{condition}(Relation)
  2. Bπ_{attributes}(Relation)
  3. Cρ_{relation}(Attribute)
  4. Dω_{condition}(Relation)

सही उत्तर / Answer: (B)

हल / Solution
प्रोजेक्शन का संकेतन π_{attributes}(Relation) है — पाई के नीचे उन attribute की सूची जो रखनी है, और कोष्ठक में रिलेशन। σ वाला रूप सिलेक्शन का है, जहाँ subscript में शर्त आती है, नामों की सूची नहीं। ρ रीनेम का चिह्न है और वह सिर्फ़ नया नाम देने के काम आता है। ω मानक संक्रियाओं में है ही नहीं। इसलिए attribute चुनने वाले प्रोजेक्शन के लिए दूसरा संकेतन ही सही है।
Projection is written as pi with the list of attributes to keep placed in the subscript and the relation inside the brackets. The sigma form belongs to selection, whose subscript holds a condition rather than a list of column names. The rho form belongs to rename and only supplies new names. The letter omega has no standard meaning in relational algebra, so the second notation is the one that stands for projection.
प्रश्न 10उत्तर + हल Storage and File structure
जब ऐसे डेटा की माँग आती है जो उस समय डेटाबेस buffer में नहीं है, तब क्या होता है?
What happens when a request is made to access data that is not currently in the database buffer?
  1. Aडेटा बैकअप वाली जगह से लाया जाता हैThe data is retrieved from a backup storage location
  2. Bडेटा disk से पढ़कर buffer में लाया जाता हैThe data is retrieved from the disk and loaded into the buffer
  3. Cडेटा दूर के किसी डेटाबेस server से लाया जाता हैThe data is retrieved from a remote database server
  4. Dमाँग ठुकरा दी जाती है और ग़लती का संदेश लौटता हैThe request is rejected, and an error message is returned

सही उत्तर / Answer: (B)

हल / Solution
इसे buffer miss कहते हैं। buffer manager उस block को disk से पढ़ता है, buffer में किसी ख़ाली खाने में रखता है और फिर माँगने वाले को उसका पता देता है। जगह न बची हो तो पहले किसी पुराने पन्ने को हटाया जाता है, और वह बदला हुआ हो तो disk पर लिखा जाता है। बैकअप सिर्फ़ आपदा में खोला जाता है। दूर का server इस बात में आता ही नहीं। माँग ठुकराई नहीं जाती, बस थोड़ी देर लगती है।
This situation is called a buffer miss. The buffer manager reads that block from disk, places it in a free slot of the buffer and then hands the address to whoever asked for it. If no slot is free, an older page is evicted first, and if that page was modified it is written back to disk. A backup is opened only after a disaster. A remote server does not enter the picture, and the request is never rejected.
आगे के 10 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
App खोलिए
प्रश्न 11उत्तर app में Introduction to DBMS
डेटाबेस की निगरानी और चेतावनी में DBA की मुख्य ज़िम्मेदारी क्या है?
What is the primary responsibility of a DBA in database monitoring and alerting?
  1. Aडेटाबेस trigger लिखनाWriting database triggers
  2. Bडेटाबेस replication की सेटिंग करनाConfiguring database replication
  3. Cप्रणाली के संसाधनों के उपयोग और प्रदर्शन के आँकड़ों पर नज़र रखनाMonitoring system resource usage and performance metrics
  4. Dडेटाबेस के पहुँच-नियंत्रण तय करनाDefining database access controls
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 12उत्तर app में Basic of Functional Dependencies and normalization relational database
रिलेशन में super key ढूँढ़ने की प्रक्रिया में क्या-क्या शामिल होता है?
The process of finding super keys in a relation involves:
  1. Aएट्रिब्यूट के सभी संभव संयोजन पहचाननाIdentifying all possible combinations of attributes
  2. Bfunctional dependency तय करनाDetermining functional dependencies
  3. Cफ़ालतू एट्रिब्यूट हटानाEliminating redundant attributes
  4. Dउपरोक्त सभीAll of the above
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 13उत्तर app में Relational Data Model
डेटाबेस स्कीमा का प्रलेखन करने का उद्देश्य क्या है?
What is the purpose of documenting the database schema?
  1. Aडेटाबेस की संरचना का चित्र बनाना।To provide a visual representation of the database structure.
  2. Bस्कीमा में समय-समय पर हुए बदलाव का हिसाब रखना।To track changes made to the database schema over time.
  3. Cइंडेक्स बनाकर डेटाबेस की रफ़्तार बढ़ाना।To optimize database performance through schema indexing.
  4. Dएकरूपता बनाए रखना और संरचना को समझना आसान करना।To ensure consistency and facilitate understanding of the database structure.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 14उत्तर app में The Entity–Relationship Model
ER मॉडल के समुच्चयन (aggregation) संबंध को डेटाबेस schema में बदलते समय, समुच्चित entity में foreign key का होना क्या बताता है?
In converting an aggregation relationship from an ER model to a database schema, what does the existence of a foreign key in the aggregated entity signify?
  1. Aयह एक-से-एक संबंध बताता है।It indicates a one-to-one relationship.
  2. Bयह एक-से-अनेक संबंध बताता है।It indicates a one-to-many relationship.
  3. Cयह अनेक-से-एक संबंध बताता है।It represents a many-to-one relationship.
  4. Dयह अनेक-से-अनेक संबंध बताता है।It represents a many-to-many relationship.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 15उत्तर app में Database Security
निम्नलिखित में से किस पहुँच नियंत्रण मॉडल में उपयोक्ता का अनुमतियों पर सबसे ज़्यादा ज़ोर चलता है?
Which of the following access control models allows users to exercise the most control over access permissions?
  1. Aरोल आधारित पहुँच नियंत्रण (RBAC)Role-Based Access Control (RBAC)
  2. Bअनिवार्य पहुँच नियंत्रण (MAC)Mandatory Access Control (MAC)
  3. Cस्वैच्छिक पहुँच नियंत्रण (DAC)Discretionary Access Control (DAC)
  4. Dगुण आधारित पहुँच नियंत्रण (ABAC)Attribute-Based Access Control (ABAC)
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 16उत्तर app में Recovery Techniques
shadow paging recovery तकनीक की मुख्य विशेषता क्या है?
What is the primary characteristic of the shadow paging recovery technique?
  1. Aइसमें सभी transactions का एक अलग log रखा जाता हैIt involves maintaining a separate log of all transactions
  2. Bयह database के कई संस्करण बनाए रखने पर टिकी हैIt relies on maintaining multiple versions of the database
  3. Cयह recovery के लिए database की एक shadow प्रति इस्तेमाल करती हैIt uses a shadow copy of the database for recovery purposes
  4. Dयह transactions की स्थिति जानने के लिए checkpoints लगाती हैIt employs checkpoints to track the state of transactions
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 17उत्तर app में Concurrency Control
Snapshot Isolation का मुख्य लाभ क्या है?
What is the primary advantage of Snapshot Isolation?
  1. Aदूसरे isolation स्तरों की तुलना में ऊँची concurrencyHigher concurrency compared to other isolation levels
  2. Bएक पंक्ति का एक से ज़्यादा संस्करण रखने की ज़रूरत न पड़नाIt removes the need to store more than one version of a row
  3. Ctransaction के लिए और कड़ी consistency की गारंटीStronger consistency guarantees for transactions
  4. Dडेटा के बदलावों की बढ़ी हुई durabilityIncreased durability of data changes
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 18उत्तर app में Transaction Management
एक healthcare डेटाबेस में transaction T1 किसी मरीज़ का medical record बदलता है और transaction T2 उसी मरीज़ की demographic जानकारी पढ़ता है। दोनों के बीच view serializability की क्या स्थिति है?
In a healthcare database, transaction T1 updates a patient's medical record, while transaction T2 retrieves the patient's demographic information. What is the view serializability between T1 and T2?
  1. AT1 और T2 view serializable हैं।T1 and T2 are view serializable.
  2. Bview serializability तय नहीं की जा सकती।View serializability cannot be determined.
  3. Cइस स्थिति में view serializability लागू ही नहीं होती।View serializability is not applicable in this scenario.
  4. DT1 और T2 view serializable नहीं हैं।T1 and T2 are not view serializable.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 19उत्तर app में Query Processing & Query Optimization
query execution plan क्या होता है?
What is a query execution plan?
  1. Aक्वेरी को parse करने की योजनाA plan for parsing the query
  2. Bक्वेरी को जाँचने की योजनाA plan for validating the query
  3. Cक्वेरी को चलाने की योजनाA plan for executing the query
  4. Dक्वेरी को optimize करने की योजनाA plan for optimizing the query
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 20उत्तर app में Indexing and Hashing
B+ tree में insertion के दौरान अगर कोई leaf node टूटता है, तो keys बनने वाले दोनों node में कैसे बँटती हैं?
In B+ tree insertion, if a leaf node splits, how are the keys distributed between the resulting nodes?
  1. Aबेतरतीब ढंग सेRandomly
  2. Bएक-एक करके बारी-बारीAlternating keys
  3. Cउल्टे क्रम मेंIn reverse sorted order
  4. Dबराबर-बराबरEvenly
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
RPSC Programmer — Paper I Programmer DBMS — topic-वार पूरा अभ्यासFliQi Question Bank app में