Filter by year

Relational Algebra questions

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…

0/20 correct0 marks

Related topics in Relational Query Languages