# FODIT: A Filter-Based Module for Optimizing Data Storage in B5G IoT Environments
## 2 Background
### Filters
Figure 6 illustrates comparative graphs for the DaaS cloud service, where the classical insertion is represented by pink bar charts, while the insertion with the FODIT module is shown in purple bar charts. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Storage**} & \multirow{2}{*}{**Data**} & \multicolumn{4}{c}{**Classical**} & \multicolumn{4}{c}{**FODIT**} \\ \cline{3-10}  & & **Duplicates (\%)** & **Duplicates (\%)** & **Duplicates (\%)** & **Duplicates (\%)** & **Not Duplicates** & **Filter** & **AunS** & **Total** \\ \hline \multirow{3}{*}{DB} & 10,000 & 2.9277 & 2.9367 & 3.0359 & 3.0776 & 2.8172 & 0.0492 & 0 & 2.8664 \\  & 100,000 & 29.2806 & 29.4053 & 29.8442 & 30.1098 & 27.9589 & 0.4877 & 0 & 28.4466 \\  & 1,000,000 & 288.6698 & 271.0532 & 298.8583 & 30.6195 & 274.8504 & 4.9137 & 0 & 279.7637 \\ \hline \multirow{3}{*}{DaaS} & 10,000 & 8.9053 & 8.9604 & 9.1657 & 9.2461 & 8.3792 & 0.0492 & 0 & 8.4284 \\  & 100,000 & 89.7634 & 90.3721 & 92.5781 & 93.7923 & 84.2795 & 0.4877 & 0 & 84.7672 \\  & 1,000,000 & 878.5982 & 881.9156 & 887.2513 & 891.7634 & 841.7258 & 4.9137 & 0 & 846.6395 \\ \hline \multirow{3}{*}{DLT} & 10,000 & 345.0824 & 350.1425 & 360.5115 & 378.1140 & 331.81 & 0.0492 & 0.0151 & 331.8743 \\  & 100,000 & 3485.322 & 3536.2650 & 360.15156 & 365.68780 & 3367.8715 & 0.4877 & 0.3327 & 3368.6619 \\ \cline{1-1}  & 1,000,000 & 37,268.8992 & 37,731.7741 & 38,372.4992 & 39,054.037 & 35,835.48 & 4.9137 & 2.1324 & 35,842.5261 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: This table displays the times required for classical insertion and insertion using the FODIT module. Figure 5: The figure displays classical insertion times compared with insertion times with the FODIT module for the local DB using 4%, 5%, 7%, and 8% of duplicate data. Figure 6: The figure displays classical insertion times compared with insertion times with the FODIT module for the DaaS cloud service using 4%, 5%, 7%, and 8% of duplicate data. Figure 7 shows comparative graphs for the DLT, where the classical insertion is represented by orange bar charts, while the insertion with the FODIT module is shown in brown bar charts. As shown in Figures 5-7, the FODIT module's insertion process is faster than classical insertion across all three scenarios (DB, DaaS, and DLT). This time difference becomes more significant as the volume of inserted data increases. Although the FODIT module employs filters and AuxS as alternative data structures to prevent duplicate data insertion, the time needed to build these filters is still shorter than the time required to insert duplicate data using the classical approach. #### 6.2.2 Experiment 2

Following the query case study methodology, we developed a query process to retrieve data from the datasets inserted in Experiment 1. The experiment involved executing selection queries across three storage systems, as follows: a local DB, the DaaS cloud service, and the DLT. We performed the query process both with and without the FODIT module. Queries executed without the FODIT module are referred to as classical queries. For the classical query process in a local DB, we conducted three simulations. The first simulation involved executing selection queries on a local DB containing 10,000 records plus 4%, 5%, 7%, and 8% duplicate data. We then executed the same selection queries on the local DB that had been populated using the FODIT module. The second and third simulations followed the same methodology, but with 100,000 and 1,000,000 records, respectively, each including the same 4%-8% range of redundant data. We applied this identical experimental approach to the classical query processes in both the DaaS cloud service and DLT. Table 4 displays the response times for both classical queries and queries using the FODIT module.