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
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started