Question 1 |

Consider the following three relations in a relational database.

Employee(eId, Name), Brand (bId, bName), Own(eId ,bId)

Which of the following relational algebra expressions return the set of eIds who own all the brands?

Employee(eId, Name), Brand (bId, bName), Own(eId ,bId)

Which of the following relational algebra expressions return the set of eIds who own all the brands?

**MSQ** \Pi _{eId}(\Pi _{eId,bId}(Own)/\Pi _{bId}(Brand)) | |

\Pi _{eId}(Own)-\Pi _{eId}\left ((\Pi _{eId}(Own) \times \Pi _{bId}(Brand) )-\Pi _{eId,bId}(Own) \right ) | |

\Pi _{eId}(\Pi _{eId,bId}(Own)/\Pi _{bId}(Own)) | |

\Pi _{eId}\left ((\Pi _{eId}(Own) \times \Pi _{bId}(Own) )/\Pi _{bId}(Brand) \right ) |

Question 1 Explanation:

Question 2 |

The following relation records the age of 500 employees of a company, where empNo ( indicating the employee number) is the key:

empAge(\underline{empNo},age)

Consider the following relational algebra expression:

\Pi_{empNo}(empAge \Join_{(age > age1)} \rho_{empNo1,age1}(empAge))

What does the above expression generate?

empAge(\underline{empNo},age)

Consider the following relational algebra expression:

\Pi_{empNo}(empAge \Join_{(age > age1)} \rho_{empNo1,age1}(empAge))

What does the above expression generate?

Employee numbers of only those employees whose age is the maximum | |

Employee numbers of only those employees whose age is more than the age of exactly one other employee | |

Employee numbers of all employees whose age is not the minimum | |

Employee numbers of all employees whose age is the minimum |

Question 2 Explanation:

Question 3 |

Consider the following relation P(X, Y, Z), Q(X, Y, T) and R(Y, V):

How many tuples will be returned by the following relational algebra query?

Answer:______

How many tuples will be returned by the following relational algebra query?

Answer:______

1 | |

2 | |

3 | |

4 |

Question 3 Explanation:

Question 4 |

Consider the relations r(A, B) and s(B, C), where s.B is a primary key and r.B is a foreign key referencing s.B. Consider the query

Q:r \Join (\sigma _{B\lt 5}(s))

Let LOJ denote the natural left outer-join operation. Assume that r and s contain no null values.

Which one of the following queries is NOT equivalent to Q?

Q:r \Join (\sigma _{B\lt 5}(s))

Let LOJ denote the natural left outer-join operation. Assume that r and s contain no null values.

Which one of the following queries is NOT equivalent to Q?

\sigma _{B \lt 5}(r\Join s) | |

\sigma _{B\lt 5}(r LOJ s) | |

r LOJ(\sigma _{B\lt 5}(s)) | |

\sigma _{B\lt 5}(r) LOJ s |

Question 4 Explanation:

Question 5 |

Consider a database that has the relation schema CR (StudentName, CourseName). An
instance of the schema CR is as given below.

The following query is made on the database

T1\leftarrow \pi _{CourseName}(\sigma _{StudentName='SA'}(CR))

T2\leftarrow CR\div T1

The number of rows in T2 is ____________.

The following query is made on the database

T1\leftarrow \pi _{CourseName}(\sigma _{StudentName='SA'}(CR))

T2\leftarrow CR\div T1

The number of rows in T2 is ____________.

2 | |

3 | |

4 | |

5 |

Question 5 Explanation:

There are 5 questions to complete.

please provide login facility, It’s an humble request because I solving quesions from last 2hr and suddenly all answers got removed’😒😒😥

29th Question require some changes I guess… Plz check.

lol