Data Science and Artificial Intelligence
GATE DA concept:relational-algebra PYQs
Build your understanding with focused practice from past exam papers.
How to practice concept:relational-algebra
Attempt a question, record the concept and assumptions, then check the available answer. Rework mistakes after revising the relevant concepts. Topic tags can overlap; review the question context.
Questions 1–3 of 3. Imported answers require independent review unless marked reviewed.
Question 42
Open questionDAMCQ2 marksNeeds review
Consider the given relations
,
and
. The relation
has three columns
,
and
. The relation
has three columns
,
and
. The relation
has two columns
and
.Relation
: | | |
|---|---|---|
P1 | Q1 | R1 |
P2 | Q2 | R2 |
P3 | Q3 | R2 |
Relation
: | | |
|---|---|---|
P1 | Q1 | 2 |
P1 | Q2 | 5 |
P2 | Q1 | 6 |
P3 | Q3 | 1 |
Relation
: | |
|---|---|
P1 | T1 |
P3 | T2 |
P4 | T3 |
P4 | NULL |
Consider the relational algebra expression
where
denotes natural join operation.Which of the following options is the correct output for the given expression?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 62
Open questiondaNAT2 marksNeeds review
Consider the following tables, Loan and Borrower, of a bank.
Loan:
loan_num | branch_name | amount |
|---|---|---|
L11 | Banjara Hills | 9000 |
L14 | Kondapur | 5000 |
L15 | SR Nagar | 4000 |
L22 | SR Nagar | 2500 |
L23 | Balanagar | 8000 |
L25 | Kondapur | 7000 |
L19 | SR Nagar | 6500 |
Borrower:
customer_name | loan_num |
|---|---|
And | L11 |
Karteek | L11 |
Karteek | L14 |
Ankita | L15 |
Gopal | L19 |
Karteek | L22 |
Karteek | L23 |
Sunil | L23 |
Sunil | L25 |
Query:
where
denotes natural join.The number of tuples returned by the above relational algebra query is ______
(Answer in integer)
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 26
Open questionDAMCQ1 markNeeds review
Consider a database that includes the following relations:
Defender(name, rating, side, goals)
Forward(name, rating, assists, goals)
Team(name, club, price)
Which ONE of the following relational algebra expressions checks that every name occurring in Team appears in either Defender or Forward, where
denotes the empty set?Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer