I. Execution of fragment, fragment storage, query, evaluation generator -- example: declare n integer := 50; -- n = number of fragments mindimf integer := 10; -- mindimf = the minimum dimension of a fragment maxdimf integer := 40; -- maxdimf = the maximum dimension of a fragment m integer := 20; -- m = number of sites maxrepf integer := 10; -- maxrepf = maximum number of replication of a fragment nq integer := 10000; -- nq = number of queries maxrep integer := 10; -- maxrep = the maximum number of reiteration of a query in one site maxst integer := 5; -- maxst = the maximum number of sites where one query is evaluted maxf integer := 10; -- maxf = maximum number of fragments used by a query begin tests.genfragments(n, mindimf, maxdimf); tests.memfragments(n, m, maxrepf); tests.memqueries(nq, m, maxrep, maxst); tests.memevaluation(nq, n, maxf); end; II. Calculate the data transfer's cost -- the total transfer cost for each query in the current storage context select * from inf_costtotal1; III. The first problem: Creation of new replications for the fragments Phases III/1 - III/6 will be repeted for different free space dimensions III/1. Establish the dimension of the free space in sites -- example update sites set dimlib=dims; III/2. integer linear programming problem generator for problem 1 set serveroutput on begin tests.pli_1; end; III/3. Generate insert into memf commands from the linear programming problem's solution (the data obtained from framework lp_solve is used to generate insert commands) III/4. The insert commands generated in the previous phase are executed III/5. Calculate the data transfer's cost after creating the new replicas (given as the result of the linear programming problem) select * from inf_costtotal1; III/6. Supplementary inserted tuples in phase III/4 are deleted (Initially generated tuples remain, in order to choose another distribution of free space in sites) delete from memf where init=0; IV. The second problem: Redistribuition of the fragments Phase IV/1 - IV/6 will reiterate for different dimensions of available space in sites IV/1. Establish the dimension of available space in sites IV/2. integer linear programming problem generator for problem 2 begin tests.pli_2; end; or begin tests.pli_2; end; IV/3. Generate insert into memf commands from the linear programming problem's solution (the data obtained from framework lp_solve is used to generate insert commands) A new table is used to keep data about the storage of fragments. IV/4. The insert commands generated in the previous phase are executed IV/5. Calculate the data transfer's cost using only fragments generated in phase III/8 select * from inf_costtotal1_nou; IV/6. Supplementary inserted tuples in phase III/10 are deleted (for a new distribution of free space in sites) delete from memf where init=0;