Question: Using Java or Python formulate a simple query optimization system with a graphical user interface. You can give a limit of 5 tables and simulate

Using Java or Python formulate a simple query optimization system with a graphical user interface. You can give a limit of 5 tables and simulate a query processing system,

The user may type in a query as in textbox, which will be non-optimal and query spits out in a optimal format and your system should do the following:

a) Rewrite the query into an optimal format.

b) Give the query tree in graphic form.

For example, the user may give a query as

SELECT EMPLOYEE.EMPNO, POSITION

FROM EMPLOYEE E, JOBHISTORY J

WHERE E. EMPNO = J. EMPNO

AND STARTDATE <= ENDDATE

AND SALARY <= 3000;

Here, the unlined part is unnecessary and can be optimized. Therefore, your system should automatically rewrite the query into

SELECT EMPLOYEE.EMPNO, POSITION

FROM EMPLOYEE E, JOBHISTORY J

WHERE E. EMPNO = J. EMPNO

AND SALARY <= 3000;

And give the optimal query tree of this query

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!