title: How can i find the number of disk accesses needed for a relational algebra query?
body: <p>Hello are any of you very nice people able to explain the concept of query optimization to me in regards to relational algebra?</p>
  
  <p>my preferred method of constructing relational algebra queries is by using temporary values step by step, but the only resources i can find for explaining how query optimization works to find the amount of disk access needed uses different notation for relational algebra queries, which confuses me.</p>
  
  <p>so if i am given the following relations:</p>
  
  <p>department(<strong>deptNo</strong>, deptName, location)</p>
  
  <p>Employee(<strong>empNo</strong>, empName, empAddress, jobDesc, deptNo*)</p>
  
  <p>and have produced the following relational algebra query to find all the programmers who work in a Manchester department as so:</p>
  
  <p>temp1 = department JOIN employee</p>
  
  <p>temp 2 = SELECT(jobdesc = 'programmer') (temp1)</p>
  
  <p>result = SELECT(location = 'Manchester)(temp 2)</p>
  
  <p>And i can assume that there are 10,00 tuples in the employee relation, 50 tuples in the department relation, 100 programmers (2 in each department) and one department located in Manchester, how would i work out how many disk accesses are needed?</p>
  
  <p>Thankyou in advance!</p>