# Decision-Tree-Based Horizontal Fragmentation Method for Data Warehouses
## 3 Materials and Methods
### FTree Web Application
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Name** & **Type** & **Description** \\ \hline _postgres\_log_ & Table & It stores all the queries found in the log file. \\ _current\_database_ & Trigger & Before inserting a query into the _postgres\_log_ table, it verifies that only the relevant queries were saved. \\ _copy\_log0_ & Function & It copies the contents of the current day’s transaction log to the _postgres\_log_ table. \\ _queries_ & Table & It stores the identifier, the description, and the frequency of the queries. \\ _delete\_queries_ & Trigger & After removing a query on the _queries_ table, it reduces the value of the identifier by \(1\). \\ _insert\_queries_ & Trigger & Before inserting a query into the _queries_ table, if the query is already stored in this table, then it is not inserted and its frequency is increased by \(1\). \\ _ai\_queries_ & Trigger & After inserting a query into the _queries_ table, it updates its identifier if it is bigger than the number of tuples. \\ _statistic\_collector(text)_ & Function & It analyzes the queries stored in _postgres\_log_ to insert into the table _queries_ only those executed in the table to be fragmented. Its parameter is the fact table. \\ _attributes_ & View & It stores the names of the dimensions as well as the attributes of each dimension and the order in which they appear in the dimension table. \\ _attribute_ & Table & It saves the data from the attributes view and adds a global order attribute. \\ _fact\_attributes_ & View & It stores the name of the fact table as well as the names and order of each of its attributes. \\ _predicates_ & Table & It saves the identifier, description, and selectivity of the predicates, as well as their dimensions and order in that dimension. \\ _insert\_predicates_ & Trigger & Before inserting predicates into the table, it analyzes that only those from queries involving the fact table with the dimension table are taken. \\ _insert\_predicates2_ & Trigger & Before a predicate is inserted into the table, it validates that only different predicates are recorded. \\ _ai\_predicates_ & Trigger & After inserting a predicate into the _predicates_ table, it updates its identifier if it is greater than the maximum number of rows. \\ _delete\_predicates_ & Trigger & After removing a predicate in the predicates table, it reduces the value of the identifier by \(1\). \\ _get\_predicates()_ & Function & It obtains the predicates of the queries stored in _queries_ and stores them in the _predicates_ table. \\ _query\_predicate_ & Table & It saves the relationship between queries and predicates. \\ _delete\_query\_predicate_ & Trigger & After deleting from the _query\_predicate_ table, it sets to \(1\) the sequences for queries and predicates. \\ _predicate\_usage\_table_ & Table & It stores the PUM that Algorithm 1 takes as input. \\ _data\_set_ & Table & It contains the data\_set obtained by Algorithm 1. \\ _query\_pred()_ & Function & It analyzes which predicates appear in which queries and keeps this relation in \\ _get\_dataset()_ & Function & It creates the data sets that are used to build the decision tree. \\ _importance\_dimension_ & View & It stores the importance of the dimensions. \\ _ds\_attributes_ & View & The attributes of the data set table and their order are in this view. \\ _primary\_keys_ & View & It stores the name and the attributes of primary keys for all the DW tables. \\ _foreign\_keys_ & View & The name of the foreign keys for each dimension and the attribute in the fact table involved in this constraint are in this view. \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Elements of the FTree schema created in the DW. concept of a perceptron is generalized to more elaborated architectures of nodes that can learn nonlinear decision boundaries [33]. In the next section, the main findings of the evaluation of FTree are presented.