Menu

Relational Algebra Questions

MCQ
1.
Consider the following relational schema: `Student (sID, sName)` `Course (cID, cName, dept)` `Enrolled (sID, cID)` Which of the following Relational Algebra expressions correctly finds the `sID` of students who have enrolled in *at least one* course from *every* department?
forum Discussion
MCQ
2.
Consider the following relational schemas: `Employee (EmpID, EName)` `Project (ProjID, PName)` `WorksOn (EmpID, ProjID)` (An employee works on a project) `Department (DeptID, DName)` `DeptProjects (DeptID, ProjID)` (A department is responsible for a project) Let `P_RES = π_ProjID ( σ_DName='Research'(Department) ⋈ DeptProjects )`. `P_RES` represents the set of all `ProjID`s associated with the 'Research' department. Which of the following relational algebra expressions correctly finds the `EmpID` of all employees who work on *every* project present in `P_RES`?
forum Discussion
MCQ
3.
Consider the relational algebra expression: σ(π(R ⋈ S), F). Here, R and S are relations, π is projection, σ is selection, and ⋈ is natural join. Which of the following is equivalent to this expression?
forum Discussion