Prototype Version 2
The preliminary Version 2 of this prototype includes the Normalized Weighted Sum Algorithm (NWSA) as addition to Version 1. The implementation consisted of several .php files on the server side of the application.
- create_json.php - This file takes the data passed from the mobile device, calls the function to generate the random estimations and choose the best execution plan.
- chooseQEP.php - This file contains object declarations and functions that are intended to be included in other .php files. It contains the declaration of the randomEstimation object, which is a container object used to store all the attributes of each estimation. This file also contains the function to generate the random estimations (generateRandomEstimations) and the function to select the best execution plan (chooseQEP).
- db_info.php - This file gets the table information of the database to be queried. This information is used on the mobile device to aid in constructing a query.
Setup Instructions
1. Copy create_json.php, chooseQEP.php, and db_info.php to your server.
2. Install our MOCCAD app on an Android device or Android simulator. Launch the app.
3. From the main screen of the app, go to “Settings” and enter the IP address of your server.
4. With the “Settings” page still open, go to “Set Weights” and set the priorities for time, money and power. The weights can be set manually or with one of the three pre-defined weight profiles.
5. Return to the main screen of the app and then go to “Build Query”.
6. Build a query and click “Execute Query”.
7. The file MOCCAD_LOG.txt is a log file that shows the estimations and the chosen estimation for each query run. MOCCAD_LOG.txt will be generated in the same directory as the .php files in step #1.
Acknowledgement:
Preliminary implementation of Version 2 was completed by Jaswanthi Bogolu, Ryan Kiel, Akshay Gaur, Nicholas Brannan during a class project of "Advanced Database Management"
Download
Click this link to download the latest version of this prototype: Download Prototype