Consider the following tables, Loan and Borrower, of a bank.
Query: \[ \pi_{\text{branch\_name}, \text{customer\_name}} (\text{Loan} \bowtie \text{Borrower}) \div \pi_{\text{branch\_name}}(\text{Loan}) \] where \( \bowtie \) denotes natural join. The number of tuples returned by the above relational algebra query is 1 (Answer in integer).
Step 1: Understanding the division operation.
The relational division operation finds the set of customers who have taken loans from all branches appearing in the Loan table.
Step 2: Extracting relevant data.
The distinct branch names from the Loan table are: Banjara Hills, Kondapur, SR Nagar, Balanagar. A customer must have taken loans from all these branches to be included in the result.
Step 3: Identifying customers who satisfy this condition.
By analyzing the Borrower table, we find that the customer Karteek has loans in Banjara Hills (L11), Kondapur (L14), SR Nagar (L22), and Balanagar (L23), satisfying the condition.
Thus, the number of tuples returned by the query is: 1
SNo | NAME | CLASS |
---|---|---|
1 | MOHAN | 6A |
2 | SANJAY | 6B |
3 | YOGESH | 7A |
SNo | NAME | CLASS |
---|---|---|
1 | NARESH | 6B |
2 | SANJAY | 6B |
3 | YOGESH | 7A |
What is the output of HISTORY - SCIENCE?
Sr No. | Name | Course |
1. | Aman | CS |
2. | Ravi | ECO |
3. | Mohit | HIS |
4. | Sanjay | MATH |
Sr.No | Name | Course |
1. | Sanjay | MATH |
2. | Abhay | ENG |
3. | Sita | HINDI |
4. | Aman | CS |
5. | Ravi | ECO |
A regular dodecagon (12-sided regular polygon) is inscribed in a circle of radius \( r \) cm as shown in the figure. The side of the dodecagon is \( d \) cm. All the triangles (numbered 1 to 12 in the figure) are used to form squares of side \( r \) cm, and each numbered triangle is used only once to form a square. The number of squares that can be formed and the number of triangles required to form each square, respectively, are:
In the given figure, the numbers associated with the rectangle, triangle, and ellipse are 1, 2, and 3, respectively. Which one among the given options is the most appropriate combination of \( P \), \( Q \), and \( R \)?
def f(a, b): if (a == 0): return b if (a % 2 == 1): return 2 * f((a - 1) / 2, b) return b + f(a - 1, b) print(f(15, 10))The value printed by the code snippet is 160 (Answer in integer).
Create empty stack S Set x = 0, flag = 0, sum = 0 Push x onto S while (S is not empty){ if (flag equals 0){ Set x = x + 1 Push x onto S } if (x equals 8): Set flag = 1 if (flag equals 1){ x = Pop(S) if (x is odd): Pop(S) Set sum = sum + x } } Output sumThe value of \( sum \) output by a program executing the above pseudocode is: