Filter by year

Relational Algebra questions

Q42

GATE DA 2026 DARelational Query LanguagesMCQ2 marks−2/3 if wrong

Report a problem with Q42

What is wrong?
Consider the given relations XX, YY and ZZ. The relation XX has three columns PP, QQ and RR. The relation YY has three columns PP, QQ and SS. The relation ZZ has two columns PP and TT.

XX
PPQQRR
P1Q1R1
P2Q2R2
P3Q3R2
YY
PPQQSS
P1Q12
P1Q25
P2Q16
P3Q31
ZZ
PPTT
P1T1
P3T2
P4T3
P4NULL
Consider the relational algebra expression
ΠPRS[(σ(Q=Q3∨R=R2)[X⋈Y])⋈(σ(S>1)[Y⋈Z])]\Pi_{PRS}[(\sigma_{(Q = Q3 \lor R = R2)}[X \bowtie Y]) \bowtie (\sigma_{(S > 1)}[Y \bowtie Z])]
where ⋈\bowtie denotes natural join operation.
Which of the following options is the correct output for the given expression?
Show answer without attempting

Loading the answer…

Q17

GATE DA 2025 DARelational Query LanguagesMCQ1 mark−1/3 if wrong

Report a problem with Q17

What is wrong?
Consider the following three relations:

Car(model,year,serial‾,color)\texttt{Car}(\texttt{model}, \texttt{year}, \underline{\texttt{serial}}, \texttt{color})
Make(maker,model‾)\texttt{Make}(\texttt{maker}, \underline{\texttt{model}})
Own(owner‾,serial‾)\texttt{Own}(\underline{\texttt{owner}}, \underline{\texttt{serial}})

A tuple in Car represents a specific car of a given model, made in a given year, with a serial number and a color. A tuple in Make specifies that a maker company makes cars of a certain model. A tuple in Own specifies that an owner owns the car with a given serial number. Keys are underlined; (owner‾,serial‾)(\underline{\texttt{owner}}, \underline{\texttt{serial}}) together form key for Own. (⋈\bowtie denotes natural join)

πowner(Own⋈(σcolor=“red”(Car⋈(σmaker=“ABC”Make))))\pi_{\text{owner}}(\text{Own} \bowtie (\sigma_{\text{color}=\text{“red”}}(\text{Car} \bowtie (\sigma_{\text{maker}=\text{“ABC”}}\text{Make}))))

Which one of the following options describes what the above expression computes?
Show answer without attempting

Loading the answer…

Q62

GATE DA 2025 DARelational Query LanguagesNAT2 marks

Report a problem with Q62

What is wrong?
Consider the following tables, Loan and Borrower, of a bank.

Loan
loan_numbranch_nameamount
L11Banjara Hills90000
L14Kondapur50000
L15SR Nagar40000
L22SR Nagar25000
L23Balanagar80000
L25Kondapur70000
L19SR Nagar65000
Borrower
customer_nameloan_num
AnandL11
KarteekL11
KarteekL14
AnkitaL15
GopalL19
KarteekL22
KarteekL23
SunilL23
SunilL25
Query: πbranch_name,customer_name(Loan⋈Borrower)÷πbranch_name(Loan)\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 __________ (Answer in integer)
Show answer without attempting

Loading the answer…

Q26

GATE DA 2024 DARelational Query LanguagesMCQ1 mark−1/3 if wrong

Report a problem with Q26

What is wrong?
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 ϕ\phi denotes the empty set?
Show answer without attempting

Loading the answer…

0/40 correct0 marks

Related topics in Relational Query Languages