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.

Topic practice 3 questionsPage 1 of 1

Question 42

Open question
DAMCQ2 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 answer

Question 62

Open question
daNAT2 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 answer

Question 26

Open question
DAMCQ1 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