Our university database, consider the following relations: C…
Our university database, consider the following relations: Course(cname: string, meetsAt: string, room: string, fid: int); Faculty(fid: int, fname: string, deptId: string) And consider the following query SELECT f.fname, FROM Course c, Faculty f WHERE c.fid = f.fid and c.meetsAt =’TuTh 9:30-10:45’ and f.deptId =’COMPSCI’; You are given the following information: T(Course) = 10000 records T(Faculty) = 3000 records B(Course) = 300 pages B(Faculty) = 100 pages V(Faculty, deptId) = 50 V(Course, meetsAt) = 100 You always used the block-based nested loop join M = 50 (pages) (we already excluded 1 output buffer and 1 input buffer for Block-based nested loop join so please use 50 pages in the calculation of join cost) First question: (15 points) Here are four different logical query plans. Identify two plans by their labels (a,b,c or d) that do the following: (i) one query plan would join two tables first, then perform selection on meetsAt and deptId, then display the name of faculty; (ii) the other query plan would modify the query plan mentioned in (i) by applying push selection rule. To earn full credit, please justify your answer. (a) (b) (c) (d) Second question (45 points) Compute the I/O costs for the query plans in (i) (20 points) and (ii) (20 points) . Which plan is better and why (5 points)