edited by
416 views
0 votes
0 votes

Consider the following database with primary keys in Bold

Project(P_No,  P_Name, P_Incharge) Employee(E_No, E_Name) Assigned_To(P_No, E_No)

Which  sentence  represent the following  relational algebra?

Employee $\bowtie$ (Assigned_To) $\div$ ( $\Pi$ P_No (Project) )

  1. List names of the employees working on all projects.
  2. List project number of  all the employees working on  projects.
  3. List details of the employees working on at least one  projects.
  4. List details of the employees working on all the projects.
edited by

1 Answer

Best answer
1 votes
1 votes

 In the question we have to use first projection operation , then Natural join and after that division operator on them. 

1st step:

From project table with P_No as primary key we get project number of all employees by using     ∏ p_no (Project) 

2nd step:

Now from Employee ⋈ (Assigned_To) using  natural join on Employee and Assigned_To table gives us emp no , emp name and project number of all employees. 

3rd step:

After that we use division operator ÷  ,  on the tuples of two tables which we get from step 1 and step 2 , which gives details of all the employees who are  working on all the projects. So this step gives employee details based on their  Project _No which we get from step 1 .

Thus that given  relational algebra represents this sentence : 

List details of the employees working on all the projects. Which is option D .

selected by
Answer:

Related questions

1 votes
1 votes
1 answer
1
Bikram asked Nov 26, 2016
319 views
Consider the join of relation R with a relation S. If R has $m$ tuples and S has $n$ tuples, then the maximum and minimum sizes of the join, respectively, are __________....
0 votes
0 votes
1 answer
2
Bikram asked Nov 26, 2016
228 views
A functional dependency of the form x → y is trivial ify ⊆ xy ⊂ xx ⊆ yx ⊂ y
0 votes
0 votes
1 answer
3
Bikram asked Nov 26, 2016
293 views
What does the following Tuple Relational Calculus query produce?The expression σθ1 (E1 ⋈θ2 E2) is the same as: E1 ⋈θ1^ θ2 E2 (σθ1 E1) ∧ (σθ2 E2 ) E1 ⋈ θ...