निम्न में से कौन-सी डीबीएमएस (DBMS) का उदाहरण नहीं है?
Which of the following is NOT an example of a DBMS?
- Aएसक्यूएल सर्वर (SQL Server)SQL Server
- Bमाईएसक्यूएल (MySQL)MySQL
- Cमाइक्रोसॉफ्ट आउटलुक (Microsoft Outlook)Microsoft Outlook
- Dमाइक्रोसॉफ्ट एक्सेस (Microsoft Access)Microsoft Access
सही उत्तर / Answer: (C)
हल / Solution
डेटाबेस प्रबंधन प्रणाली (Database Management System, DBMS) वह सॉफ़्टवेयर है जो आँकड़ों को मेज़ों में रखता, जोड़ता और खोजता है। माइक्रोसॉफ्ट आउटलुक ऐसा सॉफ़्टवेयर नहीं है। वह ई-मेल क्लाइंट और निजी सूचना प्रबंधक है, जो मेल, संपर्क और कैलेंडर सँभालता है। बाक़ी तीनों डेटाबेस ही हैं। एसक्यूएल सर्वर और माईएसक्यूएल बड़े रिलेशनल डेटाबेस हैं, और माइक्रोसॉफ्ट एक्सेस छोटे स्तर का डेटाबेस बनाता है। इसलिए सही उत्तर 3 है।
A DBMS is software that stores data in tables and lets you add, link and search it. Microsoft Outlook is not such software. It is an email client and personal information manager that handles mail, contacts and calendars. The other three are genuine databases. SQL Server and MySQL are large relational systems, while Microsoft Access builds small desktop databases. Hence Outlook, option 3, is the odd one out here.
ANSI-standard SQL, WHERE क्लॉज़ के साथ विशेष ऑपरेटरों के उपयोग की अनुमति देता है। किसी एट्रिब्यूट का मान null है या नहीं, यह जाँचने वाला विशेष ऑपरेटर है—
ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause. A special operator used to check whether an attribute value is null is:
- AIS NULL
- BLIKE
- CIN
- DEXISTS
सही उत्तर / Answer: (A)
हल / Solution
NULL का अर्थ है मान मौजूद नहीं या पता नहीं। इसे = से नहीं जाँचा जा सकता, क्योंकि NULL से कोई भी तुलना UNKNOWN देती है। इसलिए WHERE phone IS NULL जैसा लिखना पड़ता है। LIKE पाठ के पैटर्न से मिलान करता है। IN देखता है कि मान किसी सूची में है या नहीं। EXISTS देखता है कि sub query कोई पंक्ति लौटाती है या नहीं। इसलिए उत्तर IS NULL है।
NULL means a value is missing or unknown. It cannot be tested with =, because any comparison with NULL gives UNKNOWN. So we write something like WHERE phone IS NULL. LIKE matches a text pattern. IN checks whether a value is in a list. EXISTS checks whether a sub query returns any row. So the special operator that checks whether an attribute value is null is IS NULL.
यदि कोई entity केवल एक ही lower-level entity set की सदस्य हो सकती है, तो वह constraint क्या कहलाती है?
If an entity can belong to only one lower level entity set, then the constraint is
- ADisjoint
- BPartial
- COverlapping
- DSingle
सही उत्तर / Answer: (A)
हल / Solution
Specialization में disjointness constraint बताती है कि एक entity कितने subclasses में जा सकती है। Disjoint में एक entity अधिक से अधिक एक lower-level entity set में होती है, जैसे Account या तो Savings होगा या Current। Overlapping में वही entity कई subclasses में हो सकती है। Partial तो completeness constraint का प्रकार है, इस प्रश्न से उसका संबंध नहीं। Single कोई मानक नाम नहीं है।
In specialization the disjointness constraint says how many subclasses an entity may belong to. With disjoint, an entity belongs to at most one lower-level entity set, for example an Account is either Savings or Current. With overlapping, the same entity can be in several subclasses. Partial is a kind of completeness constraint, which is a different idea. Single is not a standard term.
किसी table में primary key unique होनी चाहिए ताकि वह हर row की पहचान कर सके। निम्नलिखित में से कौन-सी constraint (बाधा) इस शर्त को दर्शाती है?
Within a table, the primary key must be unique so that it will identify each row. Which of the following constraints exhibits the above criterion?
- Aरेफ़रेंशियल इंटीग्रिटीReferential integrity
- Bएंटिटी इंटीग्रिटीEntity integrity
- Cएनफ़ोर्स्ड इंटीग्रिटीEnforced integrity
- Dडोमेन इंटीग्रिटीDomain integrity
सही उत्तर / Answer: (B)
हल / Solution
Primary key का unique और NOT NULL होना entity integrity कहलाता है। इससे हर row की अलग पहचान पक्की रहती है। Referential integrity foreign key और primary key के मेल की जाँच करती है, एक table के अंदर पहचान की नहीं। Domain integrity देखती है कि हर column में उसके domain के सही मान ही आएँ, जैसे उम्र में अक्षर न हों। Enforced integrity कोई मानक प्रकार नहीं है।
A primary key being unique and NOT NULL is called entity integrity. It keeps the identity of every row certain. Referential integrity checks that foreign keys match primary keys, not identity within one table. Domain integrity checks that each column only holds valid values from its domain, such as no letters in an age column. Enforced integrity is not a standard type. So entity integrity is the constraint described.
RDBMS में बिना किसी शर्त वाला join कहलाता है:
A join in RDBMS without any condition is called:
- ASelf Join (स्व-जोड़)Self Join
- BLeft Outer Join (बायाँ बाहरी जोड़)Left Outer Join
- CRight Outer Join (दायाँ बाहरी जोड़)Right Outer Join
- DCross Join (क्रॉस जोड़)Cross Join
सही उत्तर / Answer: (D)
हल / Solution
Cross join में कोई join शर्त नहीं होती। इसलिए पहली टेबल की हर पंक्ति, दूसरी टेबल की हर पंक्ति से जुड़ जाती है। यह रिलेशनल अलजेब्रा का Cartesian product ही है। पहली टेबल में m और दूसरी में n पंक्तियाँ हों तो नतीजे में m × n पंक्तियाँ आएँगी। Self join में टेबल अपने से जुड़ती है और आम तौर पर शर्त लगती है। Left और right outer join बिना मेल की शर्त के बनते ही नहीं।
A cross join has no join condition. So every row of the first table is paired with every row of the second table. It is the Cartesian product of relational algebra. If the first table has m rows and the second has n rows, the result has m × n rows. In a self join a table is joined with itself, usually with a condition. Left and right outer joins cannot be formed without a matching condition.
निम्नलिखित query कौन-सी तिथि लौटाएगी?
SELECT ADD_MONTHS(TO_DATE('31-01-2026', 'DD-MM-YYYY'), 1) FROM DUAL;
Which date will the following query return?
SELECT ADD_MONTHS(TO_DATE('31-01-2026', 'DD-MM-YYYY'), 1) FROM DUAL;
- A28-02-2026
- B31-02-2026
- C03-03-2026
- D01-03-2026
सही उत्तर / Answer: (A)
हल / Solution
ADD_MONTHS महीना बढ़ाता है, दिन नहीं गिनता। नियम यह है कि दी गई तिथि महीने का अंतिम दिन हो, या अगले महीने में उतने दिन ही न हों, तो परिणाम उस महीने का अंतिम दिन बनता है। यहाँ तिथि जनवरी का अंतिम दिन है और वर्ष साधारण है, इसलिए परिणाम फरवरी का अट्ठाईसवाँ दिन है। इकतीस फरवरी कोई तिथि ही नहीं होती, और तीन मार्च इकतीस दिन जोड़ देने की भूल से आता है।
ADD_MONTHS moves the month forward and does not count days. Its rule is that when the given date is the last day of its month, or when the target month simply has fewer days, the result becomes the last day of that target month. The date here is the last day of January in an ordinary year, so the result is the twenty-eighth of February. A thirty-first of February is not a valid date at all.
इस query में
SELECT dept_id, COUNT(*) FROM employee GROUP BY dept_id ORDER BY ______;
ख़ाली जगह पर निम्नलिखित में से क्या नहीं रखा जा सकता?
In the query
SELECT dept_id, COUNT(*) FROM employee GROUP BY dept_id ORDER BY ______;
which of the following CANNOT be placed in the blank?
- Adept_id
- BCOUNT(*)
- Cename
- DSUM(salary)
सही उत्तर / Answer: (C)
हल / Solution
ORDER BY समूह बनने के बाद चलता है, इसलिए उस समय केवल दो चीज़ें उपलब्ध रहती हैं — GROUP BY वाले column और समूह-फलन के मान। dept_id समूह बनाने वाला column है, तथा गिनती और योग दोनों समूह-फलन हैं, सो ये तीनों चल जाते हैं। ename न समूह बनाने वाला column है और न किसी फलन के भीतर, इसलिए एक समूह में उसके अनेक मान पड़ सकते हैं और क्रम लगाना असंभव हो जाता है — यहीं त्रुटि मिलती है।
ORDER BY runs after grouping, so only two kinds of thing are available at that moment, the GROUP BY columns and the values of group functions. Here dept_id is the grouping column, while the count and the total are both group functions, so all three work. The column ename is neither grouped nor wrapped in a function, so one group may hold many of its values and no ordering is possible, which is where the error arises.
SQL को घोषणात्मक (declarative) भाषा कहा जाता है। इसका सीधा अर्थ क्या है?
SQL is called a declarative language. What does this directly mean?
- Aक्वेरी में बताया जाता है कि कौन-सा परिणाम चाहिए, और उसे पाने का रास्ता DBMS ख़ुद तय करता हैThe query states which result is wanted, and the DBMS itself settles the route to obtain it
- Bक्वेरी में हर चरण क्रमवार बताना पड़ता है कि आँकड़े कैसे पढ़े जाएँThe query must state step by step how the data is to be read
- Cक्वेरी चलाने से पहले उसे किसी procedural भाषा में बदलना पड़ता हैThe query must be rewritten in some procedural language before it can run
- Dक्वेरी में हर बार table का भौतिक क्रम बताना पड़ता हैThe query must state the physical ordering of the table every time
सही उत्तर / Answer: (A)
हल / Solution
घोषणात्मक का अर्थ है — «क्या चाहिए» लिखना, «कैसे लाना है» नहीं। एक ही परिणाम के लिए index से पढ़ा जाए या पूरी table छानी जाए, और join किस ढंग से हो, यह DBMS का भाग ख़ुद चुन लेता है। इसी कारण एक ही परिणाम देने वाली कई भिन्न क्वेरी लिखी जा सकती हैं। चरण-दर-चरण बताना procedural भाषा का लक्षण है, और SQL को चलाने के लिए उसे हाथ से किसी दूसरी भाषा में बदलना नहीं पड़ता।
Declarative means stating what is wanted and not how to fetch it. Whether the rows are read through an index or by scanning the whole table, and in what manner the join is carried out, is chosen by the DBMS itself. This is why several different queries can be written for one and the same result. Spelling out every step is the mark of a procedural language, and SQL needs no hand translation to run.
Oracle में NUMBER प्रकार के स्तंभ की तुलना किसी वर्ण श्रृंखला से की जाए, तो अंतर्निहित रूपांतरण (implicit conversion) किस दिशा में होता है?
In Oracle, when a column of NUMBER type is compared with a character string, in which direction does the implicit conversion take place?
- ANUMBER मान को वर्ण श्रृंखला में बदला जाता हैThe NUMBER value is converted to a character string
- Bदोनों पक्ष DATE में बदले जाते हैंBoth sides are converted to DATE
- Cकोई रूपांतरण नहीं होता और तुलना सदा असत्य रहती हैNo conversion occurs and the comparison is always false
- Dवर्ण श्रृंखला को NUMBER में बदला जाता हैThe character string is converted to NUMBER
सही उत्तर / Answer: (D)
हल / Solution
वर्ण और संख्या की तुलना में Oracle वर्ण श्रृंखला को NUMBER में बदलता है, अर्थात संख्या की ओर झुकाव रहता है। इसी से WHERE sal = '5000' चल जाता है, पर श्रृंखला में अंक न हों तो क्रम-भंग की त्रुटि आती है। उल्टी दिशा नहीं होती, और DATE का यहाँ कोई प्रसंग नहीं। तुलना असत्य भी नहीं रहती। फिर भी भरोसेमंद लेखन में TO_NUMBER जैसे स्पष्ट रूपांतरण लिखना ही अच्छा माना जाता है।
In a comparison between character and numeric data Oracle converts the character string to NUMBER, so the bias is towards the number. This is why WHERE sal = '5000' works, though a string holding non-numeric characters raises a conversion error. The reverse direction does not happen, DATE has no part here, and the comparison is not simply false. Even so, writing an explicit TO_NUMBER is the safer practice.
Oracle database में जब GRANT statement चलाया जाता है, तब चल रहे transaction का क्या होता है?
In an Oracle database, what happens to the transaction in progress when a GRANT statement is executed?
- Aकुछ नहीं; GRANT स्पष्ट COMMIT की प्रतीक्षा करता हैNothing; the GRANT waits for an explicit COMMIT
- BGRANT अपने आप commit हो जाता है, और लंबित transaction भी उसके साथ commit हो जाता हैThe GRANT commits by itself, and the pending transaction is committed along with it
- Cलंबित transaction rollback हो जाता है और GRANT रद्द हो जाता हैThe pending transaction is rolled back and the GRANT is cancelled
- Dtransaction खुला होने पर GRANT नाकाम हो जाता हैThe GRANT fails because a transaction is open
सही उत्तर / Answer: (B)
हल / Solution
Oracle में DDL और DCL statements अपने साथ निहित COMMIT लेकर चलते हैं, इसलिए GRANT तुरंत प्रभावी हो जाता है और उससे पहले के लंबित DML बदलाव भी उसी के साथ स्थायी हो जाते हैं। यही कारण है कि बाद का ROLLBACK किसी GRANT को नहीं पलटता। COMMIT और ROLLBACK जैसे TCL command केवल आँकड़ों के बदलाव सँभालने के लिए ज़रूरी रहते हैं।
In Oracle, DDL and DCL statements carry an implicit COMMIT with them, so a GRANT takes effect at once and the pending DML changes made before it become permanent along with it. This is the reason a later ROLLBACK will not undo a GRANT. TCL commands such as COMMIT and ROLLBACK stay necessary only for handling changes to the data itself.