1. Introduction

In the current era of AI that transforms the way we live and work, data management and processing techniques are continuously challenged as AI methods’ effectiveness depends on the availability of vast amounts of data.1 Despite the annual doubling of electronically stored data volume, the cost of storage capacity decreases at a rate of less than one-fifth per year.2 For this reason, both lossless3 and lossy4 compression techniques have been developed and optimized to reduce data storage for specific applications as well as for general use.

The current approach to database compression, which we refer to as monolithic, utilizes a single, typically lossless method to reduce the disk space of a database. These systems can result in significant savings in storage costs, but cannot adapt to data distribution changes. Thus, they cannot select the best encoding/compression scheme for a given dataset.5,6

This paper proposes a multiple compression approach, dubbed COMPASS, that uses different compression techniques for distinct data subsets in a database. It is anchored on the hypothesis of SIBACO that multi-scheme data compression is more effective for complex big data.7 Specifically, COMPASS breaks down relational data into rows or columns and applies the most suitable compression scheme to individual columns or groups of columns.

The paper presents and evaluates two versions of COMPASS: COMPASS-D, which exploits K-Means clustering on data, and COMPASS-E, which exploits K-Means on column entropy to group similar columns. Finally, the best compression scheme is selected for each column group. The experimental results using the Envmon database, a real dataset from the Environmental Monitoring Platform [1], show that COMPASS significantly reduces disk space usage compared to monolithic methods, where COMPASS-E outperforms COMPASS-D in terms of compression time as well as proximity to the optimal compression ratio.

The remainder of the paper is structured as follows: Section 2 reviews the current state-of-the-art in compression techniques. Section 3 presents the methodology of COMPASS, and Section 4 presents our experimental results. Section 5 concludes our paper by discussing the next steps of our work.

2. Related Work

The realm of big data storage has seen various advancements in compression techniques aimed at reducing storage expenses while preserving efficient data retrieval. We focus on lossless compression techniques in this work as the majority of data-intensive applications need to be able to support exact queries over stored data.

Lossless data compression can be categorized into four main types. Dictionary-based compression uses a dictionary to capture frequently appearing values within the data, replacing them with a shorter index code (examples include LZ77 and LZ78). Statistical compression relies on statistical models to estimate the frequency of data values (such as Huffman coding and LZMA). Transform-based compression applies mathematical transformations to condense the data into a more compressed format (like Burrows-Wheeler Transform and BZIP2). Finally, Hybrid compression merges techniques from the aforementioned categories to enhance compression efficiency (for instance, DEFLATE, which combines LZ77 and Huffman coding). Previous studies have investigated the automated selection of compression algorithms for heterogeneous datasets, including synthesis-based approaches8 and evolutionary strategies.9 In addition, simple machine-learning methods have been proposed for selecting the most appropriate compression algorithm based on extracted features/characteristics (e.g., entropy, data distribution), following a principle similar to SIBACO.10

Big companies have developed specialized lossless compression techniques tailored to their specific application needs. Google’s Snappy [2] for example, performs compression through byte-level operations and bit-stream encoding, whereas Facebook’s Zstandard [3] employs dictionary-based methods designed for real-time data compression. Additionally, LZ4 [4] is recognized for its speed, employing a byte-oriented variant of LZ77. In our experiments, we utilized several well-known compression algorithms from the zipfile library, including LZMA, BZIP2, and DEFLATE, representing the three compression types mentioned previously. However, the framework itself is not limited to these compression schemes and can be extended to incorporate additional modern compressors such as Zstandard or LZ4.

The research topic of database compression has been under exploration for more than three decades. To meet the substantial demands of OLAP systems processing big data, columnar storage formats have been developed that incorporate compression techniques to reduce storage costs.11–13 Recent advancements in hardware, such as CPUs, RAM, and storage devices, have enabled new optimizations that minimize memory accesses by leveraging compression technologies.14,15 Building a compression-aware database management system can reduce storage costs and improve query response times by increasing compression ratios.16 Additionally, cutting-edge approaches are employing machine learning to manage and store vast amounts of data more efficiently.17–20

Moreover, leveraging data organization and data types has proven effective in enhancing query speeds and reducing storage requirements through compression.5,6,21 While applying a uniform compression method across different data partitions can increase compression effectiveness,22 we suggest employing a variety of compression strategies to achieve superior results. Although our approach is closer to a black-box technique, it aligns with principles of white-box compression by making the compression mechanisms visible to applications via database metadata.23

The evolving landscape of AI models necessitates continuous storage of large-scale data to iteratively improve model accuracy and precision. Storing data indefinitely is a problem that traditional methods (e.g., compression) address by exploiting the computational resources. For instance, while lossless and lossy compression techniques exist, they fall short in supporting big data analytics.24 Data reduction methods such as sampling,25 aggregation for OLAP,26 dimensionality reduction techniques like LDA and PCA,27 and synopsis/sketches28 provide critical insights by simplifying the complexity of large datasets. Another way to deal with ever-increasing huge amounts of data is to utilize the concept of data rotting or data amnesia29,30 to progressively remove detail from stored information as the data ages, thereby decreasing storage costs.

Recent advancements in data compression and querying focus cloud and big data systems, such as BtrBlocks,24 optimizing decompression and compression ratios for data lakes, enhancing cloud interoperability. Gorilla31 effectively manages vast amounts of data through float data compression techniques, reducing storage demands significantly. Additionally, Decomposed Bounded Floats32 handles low-precision float data using a decomposed columnar storage format. Moreover, Chimp33 enhances floating-point time series data compression, significantly improving compression ratios and access times. These developments underscore the evolving landscape in data compression and querying, providing a crucial context for our COMPASS project.

3. Methods

The underlying hypothesis of COMPASS is that employing multiple data compression schemes can be more effective for complex big data, as it enables the selection of different compression methods for groups of data with similar characteristics. These groups can then be decompressed individually to meet the requirements of specific queries, without decompressing the entire dataset. This approach utilizes several compression schemes, each tailored to optimize the compression of different data subsets according to their unique characteristics.

COMPASS breaks down relational data into columns and applies the most suitable compression scheme to each column or group of columns. COMPASS uses K-Means clustering to group similar columns together, based on their data values or entropy, and then applies the best compression technique to each individual cluster. COMPASS determines the compression scheme for a single column or a group of columns by exhaustively testing all possible combinations.

Next, we elaborate on COMPASS’ two phases, illustrated in Figure 1: (i) partitioning and grouping compatible columns; and (ii) selection of best performing compression.

a28db465-fe7b-4b7c-b757-96db97ef2eb8_figure1.gif

Figure 1. COMPASS operates in two phases: (i) partitioning and grouping; and (ii) choosing the most effective compression method.

3.1 Segmentation and clustering of columns

In the first stage, COMPASS partitions each table in the database into a set of columns and utilizes K-Means as the primary method to create groups of similar columns. We apply K-Means in two ways, leading to two different versions of COMPASS: COMPASS-D , which utilizes K-Means clustering on data values, and COMPASS-E , which exploits K-Means clustering on column entropy to group similar columns. The latter is very fast as it reduces dimensionality through entropy. Specifically, COMPASS-E uses Shannon’s entropy34 to identify the compressibility of the columns.

To verify and evaluate our proposed approach, we use the silhouette coefficient27 to select the number of clusters for the K-Means algorithm. Particularly, the silhouette coefficient measures the quality of the clusters based on the distance within each cluster and the average distance to the nearest cluster for each data point. The silhouette coefficient for a data point is calculated using the following:

Si=yi−ximax{xi,yi}

where:

  • • xi is the average distance between the data point i and the rest of the points within the cluster.

  • • yi is the minimum average distance from the data point i to points in a different cluster.

3.2 Selection of best performing compression

In the second stage, COMPASS exhaustively searches for the most suitable compression scheme for the combinations of clusters with low silhouette scores and all compression schemes (e.g., DEFLATED, BZIP2, LZMA). While the silhouette coefficient is typically maximized in clustering tasks, our objective differs. Lower silhouette values indicate clusters that are less strictly separated, which in our context may allow columns with similar compression characteristics to be grouped together even if their statistical profiles differ. Empirically, we observed that such groupings can yield higher compression ratios because the selected compression scheme can exploit shared structural patterns across columns.

4. Results & Discussion

This section discusses the results and provides details on the experimental setup, including datasets and techniques used for the experimental evaluation.

4.1 Experimental methodology

In our experimentation, we chose the same readily available compression algorithms (i.e., LZMA, BZIP2, and DEFLATE) from the zipfile library, used in SIBACO.

We utilized K-Means to group the columns, after scaling the input data with StandardScaler, and encoding all string columns with the OrdinalEncoder from the sklearn 1.4.2 library. To ensure reproducibility, the K-means clustering algorithm was initialized with a fixed random seed (seed = 42).

Compared Techniques: Our goal in the first experimental series is the comparison of the following four techniques:

BASELINE: This baseline technique compresses the data without considering the data characteristics, using the best compression scheme from the zipfile library for each table.

SIBACO: This is our previous technique that employs multiple compression schemes.7 SIBACO splits the columns into only two groups based on their entropy and applies the best compression scheme to each column group.

COMPASS-D : This is our first proposed technique, which uses K-Means clustering to group columns based on data values to achieve the best possible compression ratio using multiple schemes if needed.

COMPASS-E : This is our second proposed technique, which applies K-Means clustering based on column entropy and has significantly lower computational complexity than COMPASS-D.

4.2 Experimental testbed

To validate our proposed ideas and evaluate COMPASS, we conduct the following experiments on two Ubuntu 22.04 servers, each featuring 24GB of RAM and an Intel(R) Xeon(R) E5-2630 CPU.

Envmon Dataset: This is a real dataset collected from the Environmental Monitoring Platform, developed under the STEAM project (Sea Traffic Management in the Eastern Mediterranean) [5]. The database contains primarily environmental, meteorological, and oceanographic data. The dataset was collected over the course of three years and has a total size of ∼1GB.

4.3 Experimental results

Across all tables, COMPASS-D and COMPASS-E consistently achieve the most efficient disk space reduction, resulting in 2–18.2% of the original RAW size. In contrast, the BASELINE and SIBACO methods reduce the disk space requirements by 4.6–23.4% and 4–23.6% of the original RAW size, respectively. COMPASS-D and COMPASS-E outperform BASELINE and SIBACO by more than 22% in the worst case and 56% (i.e., ∼2×) in the best case, as shown in Figure 2.

a28db465-fe7b-4b7c-b757-96db97ef2eb8_figure2.gif

Figure 2. Disk Space for the eight largest tables in the Envmon Database.

4.4 Selecting the number of clusters

In this experimental series, we examine the silhouette coefficient as we vary the number of clusters to verify that selecting a low-silhouette-score number of clusters can yield good compression performance.

Particularly, Figure 3 shows silhouette coefficient scores for the eight largest tables in the Envmon Database for all possible numbers of clusters. The asterisk on top of a bar indicates the number of clusters that yields the best compression ratio after the second stage of COMPASS (i.e., Selection of Compression). The clustering with the lowest silhouette coefficient often coincides or is very close to the one with the star, showing that the proposed approach is a very good proxy for finding the (near) optimal compression clustering. It is important to note that the silhouette coefficient is only defined if the number of clusters is between two and N-1, where N is the total number of columns (i.e., the maximum number of clusters).

a28db465-fe7b-4b7c-b757-96db97ef2eb8_figure3.gif

Figure 3. Average Silhouette Score for the eight largest tables in the Envmon Database.

The asterisk on top of a bar shows which number of clusters was selected with the best disk space efficiency (X-axis: Number of clusters, Y-axis: Average Silhouette Score).

To better understand the results, we calculate the relative difference between the disk storage of the compressed data for the number of clusters based on the lowest silhouette score and the COMPASS Compression Testing (i.e., the best performing one), using the following formula:

RelativeDifference=|DS−DC|DS+DC2×100%

where:

  • • DS is the disk space for the number of clusters based on the lowest silhouette score.

  • • DC is the disk space for the number of clusters based on COMPASS testing.

The maximum relative difference for COMPASS-D is ∼8%, with an average of ∼1%. COMPASS-E exhibits less than ∼1% maximum relative difference and ∼0.1% on average, revealing that COMPASS-E’s results are closer to the optimal compression ratios compared to COMPASS-D.

4.5 Compression and Decompression Time

In addition to the compression ratio, we evaluated the runtime overhead of COMPASS. Table 1 reports compression and decompression times, along with CPU and RAM usage, measured on a machine with 40GB of RAM and a 12th Gen Intel(R) Core i9-12900H processor. Although COMPASS introduces a clustering step, the additional cost remains modest relative to the overall compression process.

Table 1. Compression and decompression runtime of the evaluated methods on the Envmon dataset.

MethodCompression Time (s)Decompression Time (s)CPU (%) RAM (MB)
RAW0.0000.0000.0000.000
Baseline (single scheme)36.0820.726100.805438.143
COMPASS-D 17.1500.922100.640451.231
COMPASS-E 16.3110.846100.645437.548

5. Conclusion

This paper presents a novel multiple compression approach, named COMPASS, that uses different compression techniques for distinct data subsets in a database. We introduce and evaluate two versions of COMPASS, namely COMPASS-D and COMPASS-E, designed to enhance the compression of relational data. COMPASS-D leverages K-Means clustering on the data values, while COMPASS-E uses column entropy to achieve more efficient compression ratios in relational databases. In our experimental evaluation, we observe that COMPASS offers substantial reductions in disk space utilization compared to traditional monolithic methods and our previous work, SIBACO. Specifically, COMPASS-D and COMPASS-E outperform the BASELINE and SIBACO techniques in terms of disk storage savings by more than 22% in the worst case and 56% (i.e., ∼2×) in the best case.

While the results demonstrate the effectiveness of COMPASS on the Envmon dataset, the current evaluation focuses on a single real-world dataset. Although this dataset represents a realistic environmental monitoring workload, additional experiments on datasets with different schema structures and data characteristics would further validate the generality of the approach. Future work will therefore evaluate COMPASS across a broader range of relational datasets and explore integrating additional compression schemes.

Furthermore, in addition to entropy and the silhouette coefficient, we plan to explore other data characteristics and indicators to enhance the speed and efficiency of COMPASS. Additionally, we aim to use these metrics to construct a comprehensive knowledge base that provides deeper insights into attribute-based compression signatures. Lastly, query-time evaluation is an important direction for future work, but it was outside the scope of the current study.

Ethics and Consent

Ethical approval and consent were not required.

Data Availability

The data supporting the findings of this study have been deposited in Zenodo and are publicly available at https://doi.org/10.5281/zenodo.14751777.35 Data are available under the terms of the Creative Commons Attribution 4.0 International license (CC-BY 4.0).

Software Availability

The software used in this study has been archived in Zenodo and is publicly available at https://doi.org/10.5281/zenodo.14759015. It is released under the Apache 2.0 license.36

Acknowledgments

This work is implemented under the programme of social cohesion “THALIA 2021-2027” co-funded by the European Union, through Research and Innovation Foundation, and is also partially supported by the European Union’s Horizon Europe program for Research and Innovation through the HYPER-AI project under Grant No. 101135982. The views, findings, conclusions, or recommendations expressed in this material are solely those of the author(s) and do not necessarily represent those of the sponsors. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

References

  • 1.  Raman V, Swart G: How to wring a table dry: entropy compression of relations and querying of compressed relations. In: Proceedings of the 32nd International Conference on Very Large Data Bases. 2006; 858–869.
  • 2.  Data Center Journal: The cost of data storage and management: where is it headed in 2016?2016.
  • 3.  Gopinath A, Ravisankar M: Comparison of lossless data compression techniques. In: Proceedings of the 2020 International Conference on Inventive Computation Technologies (ICICT '20) . 2020; 628–633. Publisher Full Text
  • 4.  Zhang J, Liu G, Ding D, et al.: Transformer and upsampling-based point cloud compression. In: Proceedings of the 1st International Workshop on Advances in Point Cloud Compression, Processing, and Analysis (APCCPA '22). New York, NY, USA, 2022; 33–39. Publisher Full Text
  • 5.  Foufoulas Y, Sidirourgos L, Stamatogiannakisn E, et al.: Adaptive compression for fast scans on string columns. In: Proceedings of the ACM SIGMOD international conference on management of data (SIGMOD '21) . 2021; 554–562. Publisher Full Text
  • 6.  Jiang H, Liu C, Paparrizos J, et al.: Good to the last bit: data-driven encoding with CodecDB. In: Proceedings of the ACM SIGMOD international conference on management of data (SIGMOD '21) . 2021; 843–856. Publisher Full Text
  • 7.  Costa C, Chrysanthis PK, Costa M, et al.: Towards a signature based compression technique for big data storage. In: Proceedings of the 39th IEEE International Conference on Data Engineering Workshops (ICDEW '23). 2023; 100–104. Publisher Full Text
  • 8.  Hsu WH, Zwarico AE:Automatic synthesis of compression techniques for heterogeneous files.Softw. Pract. Exper.1995;25:1097–1116. https://doi.org/10.1002/spe.4380251003
  • 9.  Kattan A, Poli R:Evolution of human-competitive lossless compression algorithms with GP-zip2.Genet Program Evol M.2011;12:335–364. https://doi.org/10.1007/s10710-011-9133-6
  • 10.  Burtchell BA, Burtscher M:Using Machine Learning to Predict Effective Compression Algorithms for Heterogeneous Datasets.Data Compression Conference (DCC).Snowbird, UT, USA, 2024;183–192. Publisher Full Text
  • 11.  Abadi DJ, Madden S, Ferreira M: Integrating compression and execution in column-oriented database systems. In: Proceedings of the ACM SIGMOD international conference on management of data . 2006; 671–682. Publisher Full Text
  • 12.  Idreos S, Kersten ML, Manegold S: Self-organizing tuple reconstruction in column-stores. In: Proceedings of the ACM SIGMOD international conference on management of data (SIGMOD '09) . 2009; 297–308. Publisher Full Text
  • 13.  Yan Y, Chen LJ, Zhang Z:Error-bounded sampling for analytics on big sparse data. Proceedings of the VLDB Endowment. 2014; 7(13): 1508–1519. Publisher Full Text
  • 14.  Choukse E, Erez M, Alameldeen AR: Compresso: pragmatic main memory compression. In: Proceedings of the 51st annual IEEE/ACM international symposium on microarchitecture (MICRO '18) . 2018; 546–558. Publisher Full Text
  • 15.  Habich D, Damme P, Ungethüm A, et al.: MorphStore - in-memory query processing based on morphing compressed intermediates LIVE. In: Proceedings of the ACM SIGMOD international conference on management of data (SIGMOD '19) . 2019; 1917–1920. Publisher Full Text
  • 16.  Podolski P, Ludziejewski T, Nguyen HS: Data management in training AI chatbot with personality based on granular computing. In: Proceedings of the 2022 IEEE International Conference on Big Data (Big Data '22) 2022; 6247–6252. Publisher Full Text
  • 17.  Berezkin A, Slepnev A, Kirichek R, et al.: Data compression methods based on neural networks. In: Proceedings of the 5th International Conference on Future Networks & Distributed Systems (ICFNDS 2021) . 2021; 511–515. Publisher Full Text
  • 18.  Costa C, Charalampous A, Konstantinidis A, et al.: Decaying telco big data with data postdiction. In: Proceedings of the 19th IEEE International Conference on Mobile Data Management (MDM '18) . 2018; 106–115. Publisher Full Text
  • 19.  Costa C, Konstantinidis A, Charalampous A, et al.:Continuous decaying of telco big data with data postdiction. GeoInformatica. 2019; 23(4): 533–557. Publisher Full Text
  • 20.  Zhang R: Data reduction. In: Encyclopedia of Database Systems. , Liu L, Tamer Özsu M (Eds.), Springer, 2016; 1–6. Publisher Full Text
  • 21.  Abebe M, Lazu H, Daudjee K: Proteus: autonomous adaptive storage for mixed workloads. In: Proceedings of the ACM SIGMOD international conference on management of data (SIGMOD '22) . 2022; 700–714. Publisher Full Text
  • 22.  Reddy GT, Reddy MPK, Lakshmanna K, et al.:Analysis of dimensionality reduction techniques on big data. IEEE Access. 2020; 8: 54776–54788. Publisher Full Text
  • 23.  Ghita B, Tomé DG, Boncz PA: White-box compression: learning and exploiting compact table representations. In: Proceedings of the 10th Conference on Innovative Data Systems Research (CIDR '20) . 2020.
  • 24.  Kuschewski M, Sauerwein D, Alhomssi A, et al.:BtrBlocks: efficient columnar compression for data lakes. Proceedings of the ACM on Management of Data. 2023; 1(2): 1–26. Publisher Full Text
  • 25.  Yuan Z, Hendrix W, Son SW, et al.: Parallel implementation of lossy data compression for temporal data sets. In: Proceedings of the 2016 IEEE 23rd International Conference on High Performance Computing (HiPC '16). 2016; 62–71. Publisher Full Text
  • 26.  Stonebraker M, Abadi DJ, Batkin A, et al.: C-Store: a column-oriented DBMS. In: Proceedings of the 31st International Conference on Very Large Data Bases. 2005; 553–564.
  • 27.  Rousseeuw PJ:Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. J Comput Appl Math. 1987; 20(20): 53–65. Publisher Full Text
  • 28.  Cormode G, Garofalakis M, Haas PJ, et al.:Synopses for massive data: samples, histograms, wavelets, sketches. Foundations and Trends in Databases. 2011; 4(1–3): 1–294. Publisher Full Text
  • 29.  Kersten ML: Big data space fungus. In: Proceedings of the 7th Biennial Conference on Innovative Data Systems Research (CIDR '15). 2015.
  • 30.  Kersten ML, Sidirourgos L: A database system with Amnesia. In: Proceedings of the 7th Biennial Conference on Innovative Data Systems Research (CIDR '17). 2017.
  • 31.  Pelkonen T, Franklin S, Teller J, et al.:Gorilla: a fast, scalable, in-memory time series database. Proceedings of the VLDB Endowment. 2015; 8(12): 1816–1827. Publisher Full Text
  • 32.  Liu C, Jiang H, Paparrizos J, et al.:Decomposed bounded floats for fast compression and queries. Proceedings of the VLDB Endowment. 2021; 14(11): 2586–2598. Publisher Full Text
  • 33.  Liakos P, Papakonstantinopoulou K, Kotidis Y:Chimp: efficient lossless floating point compression for time series databases. Proceedings of the VLDB Endowment. 2022; 15(11): 3058–3070. Publisher Full Text
  • 34.  Shannon CE:A mathematical theory of communication. Bell System Technical Journal. 1948; 27(3): 379–423. Publisher Full Text
  • 35.  Costa C, Chrysanthis P, Herodotou H, et al.: Envmon dataset. Zenodo. 2025. Publisher Full Text
  • 36.  Costa C, Chrysanthis P, Herodotou H, et al.:COMPASS: big data compression tool using attribute-based signatures. Zenodo. 2025; 5. Publisher Full Text

Footnotes

1 Envmon Database was produced by the STEAM: https://steam.cut.ac.cy