पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 20 के उत्तर और हल FliQi Question Bank app में।
भाषा
प्रश्न 1उत्तर + हल
डोमेन रिलेशनल कैलकुलस (domain relational calculus) में सार्वत्रिक परिमाणक (∀) वाली शर्त इनमें से कौन दर्शाता है?
Which of the following represents a condition using the universal quantifier (∀) in domain relational calculus?
A∃x (R(x))
B∃x (A > 10)
C∀x (A = 10)
D∃x (A = 10)
सही उत्तर / Answer: (C)
हल / Solution
देखना यही है कि शर्त किस परिमाणक से बँधी है। तीसरे विकल्प में ∀ है और उसके भीतर A = 10 की तुलना है, इसलिए वही सार्वत्रिक परिमाणक (universal quantifier) वाली शर्त है — अर्थ यह कि हर मान पर A दस के बराबर हो। बाक़ी विकल्प ∃ से शुरू होते हैं, यानी «कम से कम एक» की बात कहते हैं। पहले विकल्प में तो कोई तुलना ही नहीं, सिर्फ़ सदस्यता है, इसलिए वह शर्त नहीं कहलाएगा।
The point to settle is which quantifier binds the condition. The third choice has the universal quantifier with the comparison A equal to ten inside it, so that is the universal condition, and it says every value has A equal to ten. The remaining choices begin with the existential quantifier and therefore speak of at least one value. The first choice carries no comparison at all, only membership of R, so it is not a condition.
प्रश्न 2उत्तर + हल
डोमेन रिलेशनल कैलकुलस (domain relational calculus) में सिलेक्शन की शर्त (selection condition) को इनमें से कौन दर्शाता है?
Which of the following represents a selection condition in domain relational calculus?
A∃x (A = 10)
B∃x (R(x) ∧ S(x))
C∃x (R(x))
D∀x (R(x))
सही उत्तर / Answer: (A)
हल / Solution
सिलेक्शन की शर्त वह तुलना होती है जो किसी attribute के मान पर लगती है। पहले विकल्प में A = 10 लिखा है, इसलिए वही शर्त दर्शाता है — अर्थ यह कि वे मान लिए जाएँ जिनका A दस के बराबर है। दूसरे विकल्प में इतना ही कहा गया है कि x दोनों रिलेशनों में है, और तीसरे-चौथे में इतना ही कि x, R का सदस्य है। इनमें कोई तुलना नहीं, इसलिए वे सिलेक्शन नहीं, बस परिमाणक वाले व्यंजक हैं।
A selection condition is a comparison placed on the value of an attribute. The first choice carries A equal to ten, so that is the condition, and it keeps only the values whose A is ten. The second choice says no more than that x belongs to both relations, while the third and the fourth say only that x is a member of R. None of them compares a value, so they are plain quantified formulas rather than selections.
प्रश्न 3उत्तर + हल
डोमेन रिलेशनल कैलकुलस (domain relational calculus) में डोमेन चर (domain variable) किसका प्रतिनिधित्व करता है?
In domain relational calculus, what does a domain variable represent?
Aकिसी रिलेशन के एक attribute काAn attribute of a relation
Btuple के एक समुच्चय काA set of tuples
Cकिसी रिलेशन में एक tuple की जगह लेने वाले काA placeholder for a tuple in a relation
Dकिसी रिलेशन पर लगे प्रतिबंध काA constraint on a relation
सही उत्तर / Answer: (A)
हल / Solution
टपल चर (tuple variable) पूरे tuple की जगह खड़ा होता है, पर डोमेन चर (domain variable) सिर्फ़ एक खाने के मानों पर घूमता है — यानी वह किसी एक attribute का प्रतिनिधि है। इसीलिए डोमेन रिलेशनल कैलकुलस का व्यंजक डंडे के पहले हर attribute के लिए अलग चर रखता है। tuple का समुच्चय तो रिलेशन ख़ुद है। tuple की जगह लेने वाला टपल चर है, और प्रतिबंध बिलकुल अलग चीज़ है।
A tuple variable stands for a whole tuple, but a domain variable ranges over the values of a single column, so it represents one attribute of the relation. That is why an expression in domain relational calculus lists a separate variable for each attribute before the bar. A set of tuples is the relation itself. Standing in for a tuple is exactly what a tuple variable does, and a constraint is an altogether different idea.
प्रश्न 4उत्तर + हल
टपल रिलेशनल कैलकुलस (tuple relational calculus) में सार्वत्रिक परिमाणक (∀) वाली शर्त इनमें से कौन दर्शाता है?
Which of the following represents a condition using the universal quantifier (∀) in tuple relational calculus?
A∀t(A > 10)(R)
B∃t(A > 10)(R)
C∃t(A ≠ 10)(R)
D∃t(A = 10)(R)
सही उत्तर / Answer: (A)
हल / Solution
यहाँ सिर्फ़ यह देखना है कि शर्त किस परिमाणक से बँधी है। पहला विकल्प ∀ से शुरू होता है और उसके भीतर A > 10 की तुलना है, इसलिए वही सार्वत्रिक परिमाणक (universal quantifier) वाली शर्त है — अर्थ यह कि R के हर tuple पर A दस से बड़ा हो। बाक़ी तीनों विकल्प ∃ से शुरू होते हैं, यानी वे «कम से कम एक tuple» की बात कहते हैं। भीतर की तुलना बदलने से परिमाणक नहीं बदलता।
The only thing to settle here is which quantifier binds the condition. The first choice opens with the universal quantifier and carries the comparison A greater than ten inside it, so that is the universal condition, and it means every tuple of R has A above ten. The other three choices open with the existential quantifier, so each of them speaks of at least one tuple. Changing the comparison inside does not change the quantifier outside.
प्रश्न 5उत्तर + हल
टपल रिलेशनल कैलकुलस (tuple relational calculus) में प्रोजेक्शन (projection) की क्रिया क्या निकालकर देती है?
What does the projection operation in tuple relational calculus retrieve?
Aकिसी रिलेशन के कुछ चुने हुए attributeA subset of attributes from a relation
Bकिसी रिलेशन के सारे attributeAll attributes from a relation
Cकिसी रिलेशन के कुछ चुने हुए tupleA subset of tuples from a relation
Dकिसी रिलेशन के सारे tupleAll tuples from a relation
सही उत्तर / Answer: (A)
हल / Solution
प्रोजेक्शन का काम column चुनना है, पंक्ति चुनना नहीं। टपल रिलेशनल कैलकुलस (tuple relational calculus) में यह लक्ष्य-सूची (target list) से होता है — डंडे के पहले {t.A, t.B} लिखने पर नतीजे में सिर्फ़ वही दो attribute आते हैं, यानी रिलेशन के कुछ चुने हुए attribute। सारे attribute ले लेने पर प्रोजेक्शन का मतलब ही नहीं रहता। tuple छाँटने का काम शर्त यानी सिलेक्शन करती है, और सारे tuple बिना शर्त वाले व्यंजक से मिलते हैं।
Projection picks columns, not rows. In tuple relational calculus the work is done by the target list: when only two attributes of the tuple variable are written before the bar, just those two appear in the answer, which is a subset of the attributes of the relation. Taking every attribute would leave nothing projected away. Choosing a subset of rows is the job of a selection condition, and all the rows come back when no condition is given.
What does the universal quantifier (∀) represent in tuple relational calculus?
A«कोई ऐसा है» — कम से कम एक tuple"Exists" at least one tuple
B«बराबर है» — किसी ख़ास tuple के"Equals" to a specific tuple
C«सभी के लिए» — सारे tuple"For all" tuples
D«से बड़ा» — किसी तय मान से"Greater than" a specified value
सही उत्तर / Answer: (C)
हल / Solution
सार्वत्रिक परिमाणक (universal quantifier) का चिह्न ∀ है और उसका अर्थ है «सभी के लिए» — शर्त रिलेशन के हर tuple पर खरी उतरनी चाहिए, एक भी छूट जाए तो व्यंजक झूठ हो जाता है। «कम से कम एक» वाली बात अस्तित्व परिमाणक (existential quantifier, ∃) कहता है। बराबरी का काम तुलना संकारक = करता है और «से बड़ा» का >; ये परिमाणक नहीं, संकारक हैं। इसलिए «सभी के लिए» वाला तीसरा विकल्प सही है।
The universal quantifier is written as ∀ and it is read as for all. The condition it guards must hold for every tuple of the relation, and if even one tuple fails, the whole formula becomes false. At least one tuple is what the existential quantifier ∃ states instead. Equality is tested by the comparison operator =, and greater than by >, so neither of those is a quantifier. Hence the choice that reads for all tuples is correct.
प्रश्न 7उत्तर + हल
टपल रिलेशनल कैलकुलस (tuple relational calculus) में जटिल शर्तें आम तौर पर कैसे लिखी जाती हैं?
How are complex conditions typically expressed in tuple relational calculus?
Aसंयोजन (conjunction, AND) और वियोजन (disjunction, OR) लगाकरUsing conjunctions (AND) and disjunctions (OR)
Bसमुच्चयन फलनों (aggregation functions) का उपयोग करकेUsing aggregation functions
Cसिर्फ़ अस्तित्व परिमाणक (existential quantifier, ∃) का उपयोग करकेUsing existential quantifiers (∃) only
Dअंकगणितीय क्रियाओं (arithmetic operations) का उपयोग करकेUsing arithmetic operations
सही उत्तर / Answer: (A)
हल / Solution
टपल रिलेशनल कैलकुलस (tuple relational calculus) तर्क पर टिकी भाषा है, इसलिए उसकी शर्तें तार्किक संकारकों से जुड़ती हैं। छोटी-छोटी तुलनाओं को AND यानी संयोजन और OR यानी वियोजन से मिलाकर, और ज़रूरत पर NOT लगाकर, जितनी चाहें जटिल शर्त बन जाती है। समुच्चयन फलन (aggregation functions) इस कैलकुलस का हिस्सा ही नहीं हैं। सिर्फ़ ∃ से काम नहीं चलता, क्योंकि ∀ भी लगता है। और अंकगणित शर्त के भीतर आता है, शर्तें जोड़ने का तरीक़ा नहीं है।
Tuple relational calculus is a language built on logic, so its conditions are put together with logical connectives. Small comparison atoms are joined by AND and OR, and NOT is added wherever a negation is needed, which is enough to build a condition of any complexity. Aggregation functions are not part of this calculus. The existential quantifier alone does not suffice, since the universal one is used too, and arithmetic sits inside an atom rather than joining atoms.
प्रश्न 8उत्तर + हल
टपल रिलेशनल कैलकुलस (tuple relational calculus) में सिलेक्शन की शर्त (selection condition) को इनमें से कौन दर्शाता है?
Which of the following represents a selection condition in tuple relational calculus?
A∃t(R)
B∀t(R)
Ct(R)
Dt.A = 10
सही उत्तर / Answer: (D)
हल / Solution
टपल रिलेशनल कैलकुलस (tuple relational calculus) में सिलेक्शन की शर्त वह तुलना होती है जो टपल चर (tuple variable) के किसी attribute पर लगती है — जैसे t.A = 10, यानी वे tuple जिनका A दस के बराबर है। ∃t(R) और ∀t(R) तो सिर्फ़ परिमाणक (quantifier) हैं, वे बताते हैं कि चर कहाँ घूमेगा। t(R) इतना ही कहता है कि t, R का tuple है। इन तीनों में कोई तुलना नहीं, इसलिए चौथा विकल्प ही शर्त है।
In tuple relational calculus a selection condition is a comparison written on an attribute of a tuple variable, such as t.A = 10, which keeps the tuples whose A equals ten. The two quantified forms only say how the variable ranges over the relation and restrict no value. Writing R(t) alone states merely that t is a tuple of R. Since none of those three compares anything, the fourth choice is the selection condition here.
प्रश्न 9उत्तर + हल
टपल रिलेशनल कैलकुलस में अस्तित्व परिमाणक (∃) क्या दर्शाता है?
What does the existential quantifier (∃) represent in tuple relational calculus?
Aसभी tuple के लिए"For all" tuples
Bकम से कम एक tuple मौजूद है"Exists" at least one tuple
Cकिसी ख़ास tuple के बराबर है"Equals" to a specific tuple
Dदिए गए मान से बड़ा है"Greater than" a specified value
सही उत्तर / Answer: (B)
हल / Solution
∃ का अर्थ है 'ऐसा कम से कम एक tuple मौजूद है'। इसका पूरा रूप पढ़िए — r में कोई न कोई tuple ऐसा है जिस पर शर्त सही उतरती है। एक भी ऐसा tuple मिल गया तो कथन सच हो जाता है। 'सभी' वाली बात ∀ कहता है, जो बिलकुल अलग और कहीं सख़्त शर्त है। बराबर होना और बड़ा होना तो तुलना संकारक हैं, परिमाणक नहीं। इसलिए दूसरा विकल्प सही है।
The existential quantifier means that at least one such tuple exists. The formula is read as: there is some tuple in the relation for which the predicate is true, and finding a single such tuple already makes the statement true. The idea of all tuples belongs to the universal quantifier, which is a much stronger demand. Equality and greater than are comparison operators rather than quantifiers, so the second choice is right.
प्रश्न 10उत्तर + हल
टपल रिलेशनल कैलकुलस में टपल चर (tuple variable) किसका प्रतिनिधित्व करता है?
In tuple relational calculus, what does a tuple variable represent?
Aरिलेशन के किसी attribute काAn attribute of a relation
Btuple के समुच्चय काA set of tuples
Cरिलेशन के किसी एक tuple के लिए रखे गए स्थान काA placeholder for a tuple in a relation
Dरिलेशन पर लगी किसी बाध्यता काA constraint on a relation
सही उत्तर / Answer: (C)
हल / Solution
टपल चर वह नाम है जो किसी रिलेशन के एक tuple की जगह खड़ा रहता है। instructor पर लिखी क्वेरी में t यही करता है — वह बारी-बारी हर पंक्ति का रूप लेता है और शर्त जाँची जाती है। कोष्ठक में attribute लिखकर उसी पंक्ति का कोई मान पढ़ा जाता है, इसलिए चर ख़ुद attribute नहीं है। वह एक समय में एक ही tuple दर्शाता है, पूरा समुच्चय नहीं, और बाध्यता से तो उसका कोई नाता ही नहीं।
A tuple variable is a name that stands in place of one tuple of a relation. In a query over instructor the variable takes the shape of each row in turn while the condition is tested on it. Writing the variable with an attribute in brackets reads a value of that row, so the variable itself is not an attribute. It holds one tuple at a time, not a whole set, and it is not a constraint.
आगे के 20 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
रिलेशन T(X,Y,Z) में ये tuple हैं: {('apple',5,'red'),('banana',3,'yellow'),('orange',4,'orange')}। प्रोजेक्शन संक्रिया π_{X,Z}(T) का परिणाम क्या होगा?
A relation T(X,Y,Z) has the following tuples: {('apple',5,'red'),('banana',3,'yellow'),('orange',4,'orange')}. What is the result of the projection operation π_{X,Z}(T)?