edu.wpi.cs.DSRG.xmldb.RainbowExperiments
Class Experiment

java.lang.Object
  |
  +--edu.wpi.cs.DSRG.xmldb.RainbowExperiments.Experiment

public class Experiment
extends java.lang.Object

Experiment.java is the Experimental Setup for the Experiments of the Restructuring Subsystem. This class is the main class to do the experiments. Two kinds of experiments will be done here: 1. Setup related. 2. Query related. In general, each experiment includes following steps: 1. We load the data set. 2. We create the "input.txt" to store the restructuring operations. 3. We execute the restructuring operations. 4. We do the measurement of different things, e.g., restructuring, updating, view materialization, and query execution.


Field Summary
(package private)  Table all_tables
           
(package private)  java.util.Vector all_views
           
(package private)  Catalog catalog
           
(package private)  Cleaner cleaner
           
(package private)  CreateDataSchema createDataSchema
           
(package private)  CreateDTDM createDTDM
           
(package private)  ExportDTD exportDTD
           
(package private)  JDBCClient jdbc
          The database connection used for this example.
(package private)  LoadXML loadXML
           
(package private)  Restructure restructurer
          The restructuring used in the experiments.
(package private)  StoreDTD storeDTD
           
(package private)  UniqueID unique_id
           
 
Constructor Summary
Experiment(JDBCClient client)
          This constructor creates the experiment based on a specific connection.
 
Method Summary
 void backupDB()
          The method backupDB() backs up all the tables that will be created after the resetDB().
 void exp1()
          The method exp1() compares batch with serial restructuring.
 void exp2()
          The method exp2() varies the datasize to test the scalability of operations of different operator type.
 void exp3()
          The method exp3() varies the number of operations to test the scalability of operations of different operator type.
 void expJoin()
          The method expJoin() discovers the performance difference in the evaluation of join queries against a data set that vary in the number of pushUpAttribute operations applied.
 void expOverhead()
          The method expOverhead() tests the overhead of the Restructure operators.
static void main(java.lang.String[] argvs)
          The method main() sets up a new connection given the URI, username, and password for a database server.
 void resetDB()
          The method resetDB() resets the db with whole 37 shaks XML files.
 void resetDB(int number_of_files)
          The method resetDB loads the database by loading all the Sharksphere's play inside the database.
 void resetDB2(int repeat_times)
          The method resetDB2() reloads the same XML file for multiple times.
 void resetDBJoin(int repeat_times)
          The method resetDBJoin() reloads a same XML file for multiple times.
 void restoreDB()
          The method restoreDB() cleans all the tables except the "_bak" tables.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

jdbc

JDBCClient jdbc
The database connection used for this example.

restructurer

Restructure restructurer
The restructuring used in the experiments.

unique_id

UniqueID unique_id

createDTDM

CreateDTDM createDTDM

storeDTD

StoreDTD storeDTD

exportDTD

ExportDTD exportDTD

createDataSchema

CreateDataSchema createDataSchema

loadXML

LoadXML loadXML

cleaner

Cleaner cleaner

catalog

Catalog catalog

all_tables

Table all_tables

all_views

java.util.Vector all_views
Constructor Detail

Experiment

public Experiment(JDBCClient client)
This constructor creates the experiment based on a specific connection.
Parameters:
client - JDBCClient connection to database
Method Detail

main

public static void main(java.lang.String[] argvs)
                 throws java.lang.Exception
The method main() sets up a new connection given the URI, username, and password for a database server.
Parameters:
argvs[0] - String database to connect to
argvs[1] - String username
argvs[2] - String password

expJoin

public void expJoin()
             throws java.lang.Exception
The method expJoin() discovers the performance difference in the evaluation of join queries against a data set that vary in the number of pushUpAttribute operations applied. . Vary the number of pushUpAttribute operations . Fix data size. . Join queries. . No updates. . Materialization is replaced with temporary solution: create actual table after last operation.

expOverhead

public void expOverhead()
                 throws java.lang.Exception
The method expOverhead() tests the overhead of the Restructure operators. . Vary the number of pushUpAttribute operations . Fix data size. . Join queries. . No updates. . With Materialization replaced by creating actual table after last operation.

exp1

public void exp1()
          throws java.lang.Exception
The method exp1() compares batch with serial restructuring. . Fix data set. . Change # of operations. . meature Restructuring Performance . No VM, updates, queries. . Vary the number of Rename operations

exp3

public void exp3()
          throws java.lang.Exception
The method exp3() varies the number of operations to test the scalability of operations of different operator type. . Fixed datasize . No queries, updates, mv

exp2

public void exp2()
          throws java.lang.Exception
The method exp2() varies the datasize to test the scalability of operations of different operator type. . Fixed number of operations . No queries, updates, mv

resetDB2

public void resetDB2(int repeat_times)
              throws java.lang.Exception
The method resetDB2() reloads the same XML file for multiple times.
Parameters:
repeat_times - int number of repeat on the load

resetDBJoin

public void resetDBJoin(int repeat_times)
                 throws java.lang.Exception
The method resetDBJoin() reloads a same XML file for multiple times.
Parameters:
repeat_times - int number of loads of the same XML file

resetDB

public void resetDB()
             throws java.lang.Exception
The method resetDB() resets the db with whole 37 shaks XML files.

resetDB

public void resetDB(int number_of_files)
             throws java.lang.Exception
The method resetDB loads the database by loading all the Sharksphere's play inside the database. TODO: figure out the shortest xml file to create the schema once. TODO: load all the xml file data into the database, and make those ready TODO: for the experiments. Also, store those data into the backup table TODO: so that, we can easily recover the data. EXP: we can measure the resetDB to get a general time for EXP: the reloading. We will put that one as the reference EXP: time. Now, the problem is how to make the update EXP: evenly distributed.
Parameters:
number_of_files - To load number of XML files.

backupDB

public void backupDB()
              throws java.sql.SQLException,
                     java.io.IOException
The method backupDB() backs up all the tables that will be created after the resetDB(). it will query the the "user_tables" and "user_views" to get all the current tables and views, and keep those in memory. keep the tables back-up in the "_bak" tables. and keep the views in memory.

restoreDB

public void restoreDB()
The method restoreDB() cleans all the tables except the "_bak" tables. cleaning all the views. Restore the data table from *_bak table. recreate the views from the memory.