This applications works on Windows platforms, on top of Oracle database servers. It has been tested for Oracle versions 8, 8i, 9i. The JDBC drivers bundled in the zip file below are taken from Oracle 8.1.7 . If you plan to use PREFER on a different version, replace the oracle subfolder with the JDBC drivers of your version.
The application consists of two parts:
1. Materialized views are constructed using the "Construct Views" tool.
2. After that, these materialized views can be used to efficiently answer ranked queries using the "Issue Query" tool.
Here is a typical sequence of steps to use the application:
Ψ Step 1: The available tables are shown in the Tables listbox. Select the table you want (do not select empty tables) and press "Show Attributes". Then select the attributes (only number attributes are supported), which the ranked queries will use. The more attributes you select, the more materialized views will have to be generated.
Use the "Delete all materialized views for this table" button, if you want to delete all tables that PREFER created for a table before.
Ψ Step 2: Select the parameters you want, or leave the default parameters, which are suitable for tables with more than 10,000 tuples and 2-5 selected attributes.
o Mat. views granularity: The granularity of the weights of the materialized views. Keep in mind that all weights are between 0 and 1.
o Test queries granularity: The granularity of the weights of the test queries used to decide the coverage of the query space. Typical values are the same or half the Mat. views granularity.
o Constraint: The maximum number of tuples retrieved to get the top-1 tuple for any of the test queries. The smaller this number is, the more materialized views will need to be created.
o Views Depth: The length of the prefix of each view, in number of tuples, stored in the materialized views. Smaller numbers reduce needed space but there is a danger that they wont be deep enough to answer a top-K query.
o When the first Create and populate checkbox is checked, the INFO and PAIRS tables for the selected table are created. These tables store the information needed by PREFER to use the created materialized views in the Issue Query stage.
o When the second Create and populate checkbox is checked, the materialized views tables are actually created. Otherwise, just the SQL commands needed are created.
o The Crop Tables checkbox determines if the materialized views will be pruned to the depth defined by the Views Depth value.
4. Select Tools->Issue Query, to issue ranked queries on a table, for which materialized views have been created.
Ψ Step 1: The available tables are shown in the Tables listbox. Select the table you want (the same as the one you selected in Construct Views before) and press "Show Attributes". Then select the attributes (number attributes are supported), which the ranked queries will use. The attributes should be a subset (or all) of the attributes selected when creating the materialized views for PREFER to have a better performance.
Ψ Step 2: Select the parameters you want.
o The weights that you type are then normalized by the ranges of the attributes to make sense. In particular, the weights of attributes with big (small) ranges are decreased (increased). For example when you have attributes price and #bedrooms for a house and you specify the same weight 0.5 for both of them, then the weight of the #bedrooms is multiplied by a factor a(#bedrooms) , such that a(#bedrooms)*avg_#bedrooms is the same as a(price)*avg_price.
o # of results is the K in the top-K results.
The progress of the execution and the results of the queries are displayed in the main textbox of the application.