Consider the given relations $X$, $Y$ and $Z$. The relation $X$ has three columns $P$, $Q$ and $R$. The relation $Y$ has three columns $P$, $Q$ and $S$. The relation $Z$ has two columns $P$ and $T$. Table X Table Y Table Z Consider the relational algebra expression $$ \Pi_{P, R, S} \left[ \left( \sigma_{(Q = Q3 \lor R = R2)} [X \bowtie Y] \right) \bowtie \left( \sigma_{(S > 1)} [Y \bowtie Z] \right) \right] $$ where $\bowtie$ denotes natural join operation. Which of the following options is the correct output for the given expression?P Q R P1 Q1 R1 P2 Q2 R2 P3 Q3 R2 P Q S P1 Q1 2 P1 Q2 5 P2 Q1 6 P3 Q3 1 P T P1 T1 P3 T2 P4 T3 P4 NULL
The given relations are defined as:
Instance data for each relation:
| Table X | ||
|---|---|---|
| P | Q | R |
| P1 | Q1 | R1 |
| P2 | Q2 | R2 |
| P3 | Q3 | R2 |
| Table Y | ||
|---|---|---|
| P | Q | S |
| P1 | Q1 | 2 |
| P1 | Q2 | 5 |
| P2 | Q1 | 6 |
| P3 | Q3 | 1 |
| Table Z | |
|---|---|
| P | T |
| P1 | T1 |
| P3 | T2 |
| P4 | T3 |
| P4 | NULL |
The relational algebra expression to evaluate is:
$ \Pi_{P, R, S} \left[ \left( \sigma_{(Q = Q3 \lor R = R2)} [X \bowtie Y] \right) \bowtie \left( \sigma_{(S \gt 1)} [Y \bowtie Z] \right) \right] $
First, compute the natural join of X and Y, then apply the selection.
| P | Q | R | S |
|---|---|---|---|
| P1 | Q1 | R1 | 2 |
| P3 | Q3 | R2 | 1 |
| P | Q | R | S |
|---|---|---|---|
| P3 | Q3 | R2 | 1 |
Next, compute the natural join of Y and Z, then apply the selection.
| P | Q | S | T |
|---|---|---|---|
| P1 | Q1 | 2 | T1 |
| P1 | Q2 | 5 | T1 |
| P3 | Q3 | 1 | T2 |
| P | Q | S | T |
|---|---|---|---|
| P1 | Q1 | 2 | T1 |
| P1 | Q2 | 5 | T1 |
Now, compute the natural join of the LHS and RHS relations, then project the required columns.
The final result of the relational algebra expression is an empty set, meaning zero rows.
Which of the following statements is/are correct regarding the Finance Commission of India?
A. The Finance Commission consist of a Chairman and four other members.
B. The recommendations made by the Finance Commission are binding on the government and the government needs to grant funds according to the advice of the Commission,
C. Article 280 of the Indian Constitution talks about the recommendations of the Finance Commission.
Consider the following three relations
Employee (eid, eName), Comp(cid, cName), Own(eid, cid). Which of the following relational algebra expression return the set of eids who own all brands:
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?
Consider the following three relations:
Car (model, year, serial, color)
Make (maker, model)
Own (owner, 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) together form key for Own. ($\bowtie$ denotes natural join)
$ \pi_{\text{owner}} (\text{Own} \bowtie (\sigma_{\text{color}=\text{"red"}} (\text{Car} \bowtie (\sigma_{\text{maker}=\text{“ABC”}} \text{Make})))) $