Skip to Content
ComputersComputers
  • Article
  • Open Access

4 October 2026

37 Pages

A Hybrid Fragmentation Method for Multimedia Databases Considering Dynamic Access Patterns

,
,
,
,
,
and
1
Tecnológico Nacional de México/I. T. Orizaba, Av. Oriente 9 852, Col. Emiliano Zapata, Orizaba 94320, Veracruz, Mexico
2
Centro Universitario UAEM Texcoco, Universidad Autónoma del Estado de México, Av. Jardín Zumpango, s/n, Fraccionamiento El Tejocote, Texcoco 56259, Estado de México, Mexico
*
Author to whom correspondence should be addressed.

Abstract

The volume of multimedia data generated by various applications is increasing constantly. These data are complex to process, hindering efficient information retrieval because database operations require analyzing an entire database during their execution, augmenting the query execution costs and response times. In a distributed environment, fragmentation is an effective technique that aims to improve query performance and increase the availability of information. Most methods address horizontal or vertical partitioning and are static because they cannot adapt the fragmentation scheme to new changes in database access patterns or elements (attributes and/or tuples). This work presents a dynamic hybrid fragmentation method for multimedia databases that includes an observer–fragmenter developed in the Java programming language and uses the NoSQL (Not only SQL) MongoDB database. To implement the proposed method, it is first necessary to carry out static hybrid fragmentation through the XAMANA Web application. Then, the observer–fragmenter is executed, which is capable of analyzing the fragment costs and monitoring the operation and performance thresholds without the intervention of the Database Administrator (DBA). When the cost of a fragment exceeds the thresholds, a new hybrid fragmentation is automatically triggered, and new fragments are allocated to the corresponding sites. Finally, to validate our proposed method, we conduct a case study using the HITO (History of the Technological Institute of Orizaba) database and compare our method with three state-of-the-art approaches. The results show that it is possible to reduce the execution cost of 77% of queries by accessing less remote data and requiring fewer joins.

1. Introduction

Multimedia databases are of great importance in information systems, since they manage a large amount of data of different types. Therefore, it is necessary to develop techniques to efficiently access the information stored in these databases. Fragmentation is a technique that allows for the information in a database table or collection to be distributed into fragments, in such a way that the partitions are stored at the closest site of use [1]. There are three types of fragmentation: horizontal fragmentation divides a relation along its tuples (rows), such that each fragment has a subset of the tuples in the relation; vertical fragmentation consists of dividing a relation into subsets of attributes (columns) and placing the primary key of the relation in each fragment to allow for its reconstruction; and, finally, hybrid fragmentation is the combination of horizontal–vertical partitioning or vice versa [1]. These methods are classified into static and dynamic; the former obtain a fragmentation scheme according to a workload, but if this changes, the scheme cannot adapt to new queries to remain efficient. In contrast, dynamic methods address this problem by continuously modifying the scheme according to changes in the workload [2]. Recently, several horizontal, vertical, and hybrid fragmentation methods for multimedia databases have been proposed [3,4,5,6,7,8]; however, most are static. Due to the dynamic nature of access patterns to multimedia databases and the advantages that hybrid fragmentation has over vertical and horizontal in terms of reducing irrelevant data both locally and remotely, it is necessary to develop dynamic hybrid fragmentation methods for this type of database.
This paper introduces a dynamic hybrid partitioning method for multimedia databases. It is divided into two parts: static fragmentation and dynamic fragmentation. In the first part, once the workload of the collection to be fragmented is available, the vertical and horizontal fragmentation schemes are obtained to subsequently carry out the hybrid fragmentation, where two schemes are generated: vertical–horizontal and horizontal–vertical. The first scheme undertakes the allocation of the fragments to the sites in the vertical scheme, and the second considers the allocations in the horizontal scheme. The costs of the two schemes are compared, and the less expensive scheme is determined so that the DBA can decide whether it will be materialized. The static hybrid fragmentation scheme is obtained through the XAMANA Web application [3] according to the data provided by the DBA (name of the database, table to be fragmented, and log file).
In contrast, dynamic hybrid fragmentation starts when the observer–fragmenter method is executed; it improves static hybrid fragmentation since it can analyze the costs of the fragments and monitor the operation and performance thresholds without the intervention of the DBA. When the number of new operations executed on a partition and the cost of a fragment reach the thresholds, a new partitioning is automatically triggered, and the new partitions produced are allocated to the corresponding sites. The operation threshold indicates the number of newly executed operations required to perform a cost analysis of the current scheme, and the performance threshold sets the cost needed to perform a new partitioning. When the values of the thresholds are high, new fragmentations are less likely to be performed; when they are lower, new fragmentations are frequently carried out.
Finally, we demonstrate the efficacy and efficiency of our fragmentation method using a case study where the obtained hybrid fragmentation schemes comply with the three rules of fragmentation: completeness, reconstruction, and disjunction. In addition, they have a lower query execution cost than the schemes found in other related works.
This paper makes three contributions: (1) It presents the development of the dynamic hybrid fragmentation method for multimedia databases proposed in [8]. Crescencio-Rico et al. [8] only introduced the method’s workflow; in this paper, we include the complete cost model, the algorithms, and the evaluation of our approach. (2) In contrast to other previous works, where we addressed static and dynamic vertical [9], horizontal [10], and hybrid [11] fragmentation for multimedia databases, in this paper we also consider the allocation of the fragments to the sites of the network. (3) Although previous approaches [3,12,13] have focused on the multimedia database design problems of fragmentation and allocation, they only performed horizontal [3,12] or vertical [13] partitioning while, in this paper, we contemplate the dynamic hybrid fragmentation of multimedia databases.
This article is organized as follows: Section 2 defines the terms used in this research, while Section 3 presents related work on dynamic hybrid fragmentation. The method proposed in this work is described in detail in Section 4. The evaluations and results are shown in Section 5. In Section 6, various aspects to consider when applying the presented method are discussed. Finally, Section 7 presents the conclusions and future work.

2. Background

The main terms used in this research are described below.

2.1. Multimedia Databases

Multimedia databases are a collection of data that, in addition to containing text, store and retrieve audio, images, and video. When including data whose main characteristic is a large size, optimal management is complicated because, as the multimedia content increases, the query response time rises due to the greater volume of irrelevant data accessed. Therefore, applying fragmentation techniques in these databases is necessary to improve query performance [2].

2.2. Fragmentation in Databases

Database fragmentation (or partitioning) is a process for reducing irrelevant data access by grouping frequently accessed data into dedicated segments, called fragments [14]; in this way, query response times are reduced, lowering the execution costs for each operation. The goal of fragmentation is to divide a relation into fragments so that most of the applications run in a single fragment. Fragmentation is used in centralized and Distributed Database Management Systems (DBMSs) and serves as a design tool that enables user queries to operate on smaller relations [1]. Three main fragmentation techniques are defined for relational databases:
  • Horizontal fragmentation (HF);
  • Vertical fragmentation (VF);
  • Hybrid or mixed fragmentation (MF).

2.3. Horizontal Fragmentation (Primary and Derived)

Horizontal partitioning splits a relation across its tuples. Each fragment is a subset of tuples in that relation; however, there are two versions of horizontal fragmentation: primary and derived [1].
  • Primary horizontal fragmentation is performed in a relation using the predicates that are defined in that relation.
  • Derived horizontal fragmentation is the partitioning of a relation as a result of predicates that are defined in another relation.
Horizontal fragmentation uses the select operator, where the predicates determine the fragmentation.

2.4. Vertical Fragmentation

Vertical fragmentation consists of dividing a relation into subsets of attributes and, in each fragment, placing the primary key of the relation to allow for its reconstruction. Vertical fragmentation is performed through the project operator [1].

2.5. Hybrid Fragmentation

In many cases, the horizontal or vertical fragmentation of a database schema is not sufficient to satisfy the application requirements. In these cases, vertical fragmentation is carried out after a horizontal one or vice versa, producing a structured tree of partitions. This technique is called hybrid fragmentation, mixed fragmentation, or nested fragmentation [1]. These two methods are described below:
  • Horizontal–vertical hybrid: First, it generates a set of horizontal fragments; vertical partitions are then obtained from one or more horizontal shards.
  • Vertical–horizontal hybrid: It produces a set of vertical fragments first; horizontal shards are then generated based on one or more vertical partitions.

2.6. Fragmentation Rules

Three fragmentation rules ensure that databases do not experience semantic changes during fragmentation [1].
  • Completeness: If a relation instance R is divided into fragments FR = {R1, R2, …, Rn}, then every element that is in R is also found in one or more fragments. This property is identical to the lossless decomposition property of normalization, and it is also important in fragmentation, as it ensures that the data in a global relation is mapped onto fragments without any loss. Note that in the case of horizontal partitioning, the “element” generally refers to a tuple, while in the case of vertical fragmentation, it refers to an attribute.
  • Reconstruction: If a relation R is split into fragments FR = {R1, R2, …, Rn}, it is possible to define a relational operator ∇ such that R= ∇Ri, ∀Ri ∈ FR.
The operator ∇ will be different for distinct forms of fragmentation; i.e., for horizontal fragmentation this operator is the union, and in vertical partitioning it is the join operator. Reconstructing the relation from its fragments ensures that the constraints defined for the data in the form of dependencies are preserved.
3.
Disjointness: If a relation R is horizontally decomposed into fragments FR = {R1, R2, …, Rn} and the data di is in Rj, then it is not in any other partition Rk (k ≠ j). This criterion ensures that the horizontal fragments are disjoint. If the relation R is vertically decomposed, its primary key attributes are typically repeated across all its fragments (for reconstruction). Therefore, in the case of vertical fragmentation, disjunction is defined only on the non-primary key attributes of a relation.

2.7. Static Fragmentation vs. Dynamic Fragmentation

Most of the existing fragmentation techniques are static [4,6,7,15,16,17,18,19,20,21,22,23,24]. Static partitioning techniques are inefficient for large or highly dynamic systems because they only allow a database to be fragmented based on the workload. However, if it changes, these approaches cannot adapt the partitioning scheme to the new data access patterns. On the other hand, dynamic partitioning allows the fragmentation scheme to be updated over time according to changes in the workload [1]. Nevertheless, few works address dynamic hybrid fragmentation [8,25,26,27,28,29]. Other approaches are dynamic, but consider only horizontal or vertical partitioning [3,5,30,31,32].

4. Dynamic Hybrid Fragmentation for Multimedia Databases

The proposed method has two phases: static hybrid fragmentation and dynamic hybrid fragmentation.
In the first phase, a hybrid fragmentation scheme is obtained through the XAMANA web application [3]. This web application was developed using the Java programming language with the JavaServer Faces framework [34,35]. XAMANA allows the three types of fragmentation to be applied—horizontal, vertical, and hybrid—considering Content-Based Image Retrieval (CBIR), including MySQL, PostgreSQL, Postgres-XL, and MongoDB database management systems.
The information the DBA enters into XAMANA is stored in its database because it is required to perform dynamic hybrid fragmentation. The XAMANA database is relational and was developed with the MySQL DBMS. It comprises 10 tables (Database (DB), Table, Attribute, Fragment, CRUD, Site, Predicate, CRUD_Attribute, Predicate_Table, and CRUD_Predicate). Figure 1 shows the process diagram for static hybrid fragmentation. The physical scheme of XAMANA is presented in Figure 2, and Table 2 includes the explanation of each relation in Figure 2.
Figure 1. Process diagram of static hybrid fragmentation.
Figure 2. Physical diagram of the XAMANA database.
Table 2. Description of each table in the physical diagram of the XAMANA database.
The first action in XAMANA begins with a form where the DBA enters the DBMS to be used, as well as the database IP address, DB port, user, password, log file, table to fragment, operation and performance thresholds, and the type of fragmentation (horizontal, vertical, and hybrid). The method proposed in this research is implemented in the MongoDB DBMS. In this DBMS, size limits are not established for attributes, as occurs in relational databases; it only defines the maximum size of each document (16 MB). However, in vertical and hybrid fragmentation, the use of attributes in operations is considered; therefore, it is essential to assign the maximum size to each of them.
Once the DBA has finished capturing the data, the next action is the connection test. If the data is correct, as a second step the application obtains the vertical fragmentation scheme based on the method proposed by Castro-Medina et al. [36] and the horizontal scheme according to the technique of Castro-Medina et al. [3], with their respective allocation of fragments to the network sites. Subsequently, XAMANA produces two hybrid fragmentation schemes: (1) vertical–horizontal, which considers the vertical allocations, and (2) horizontal–vertical, which contemplates the horizontal allocations. Both hybrid schemes are compared, and the lowest-cost scheme is provided to the DBA, who can decide if XAMANA materializes the fragmentation and allocation scheme.
During horizontal and vertical fragmentation, according to the type of operation, a representative value is assigned, as presented in Table 3. These values are used to calculate the cost of an operation in the cost analysis. Likewise, it is important to consider the site where the operation is executed. If the operation is performed on the same site where all its required data is located, the RV (Remote Value) is 1, and it is 2 when it accesses remote data.
Table 3. Operation assigned values (OAVs).
Equation (1) is used to obtain the vertical cost (VER) of an operation qj, where JC is the join cost, which takes the value of JN + 1, where JN is the number of joins required to execute the operation. In addition, AS is the size in MB of each attribute used in the operation. Therefore, the cost of a vertical fragment (VFC) vfrk is calculated by adding the costs of the attributes (ACs) located in that fragment, as seen in Equations (2) and (3). N is the number of operations, M is the number of attributes, and MQ is the number of attributes used in the operation qj.
VER   ( q j ) = OAV j × JC j × RV j × ∑ i = 1 MQ A S i
AC   ( a i ) = ∑ j = 1 N ( OAV j × JC j × RV j ) × AS i
VFC   v fr k = ∑ i = 1 | a i     ∈ vfr k M AC a i
Equation (4) determines the horizontal cost (HOR) of an operation qj, where SEL is the selectivity of its predicate. While in horizontal fragmentation, the Attribute Locality Precedence (ALP) [37] of an attribute ai is determined by the sum of the horizontal cost (HOR) of the operations that use that attribute, as shown in (5).
HOR(qj) = OAVj × SELj × RVj
ALP ( a i ) = ∑ j = 1   use ( q j , a i = 1 N HOR ( q j )
The cost of a horizontal fragment (HFC) hfrl is obtained by adding the horizontal cost of the operations with the same predicate pj that defines the fragment, as observed in Equation (6).
HFC   ( hfr l ) = ∑ j = 1 | p j = p l N HOR ( q j )
Equation (7) indicates that the hybrid cost (HYB) of an operation qj is calculated by adding its vertical cost plus its horizontal cost.
HYB(qj) = VER(qj) + HOR(qj)
The cost of a hybrid fragment hyfrt is determined by taking into account the allocation of the vertical and horizontal schemes; therefore, there are two costs: V-H (8) and H-V (9), which are obtained by adding the costs of the operations that are executed in that fragment. VERv and VERh refer to the vertical cost of the operation based on the allocation of the vertical or horizontal scheme, respectively, while HORv and HORh indicate the horizontal cost of the operation considering each allocation (vertical or horizontal).
V − H   ( hy fr t ) = ∑ j = 1 | use   q j ,   hyfr t = 1 N VER v q j + HOR v ( q j )
H − V   hyfr t = ∑ j = 1 | use   q j ,   hyfr t = 1 N VER h ( q j ) + HOR h ( q j )
Likewise, to calculate the cost of the hybrid fragmentation scheme HYFS, the allocation of the vertical and horizontal schemes must be considered; therefore, there are two final costs: the vertical–horizontal (V-H) and the horizontal–vertical (H-V) costs. These are obtained with Equations (10) and (11).
V − H   ( HYFS ) = ∑ j = 1 N VER v q j + HOR v ( q j )
H − V   ( HYFS ) = ∑ j = 1 N VER h q j + HOR h ( q j )
The cost of performing a new fragmentation (NF) of the HYFS is determined by using Equation (12). The number of documents (ND) transported from the original site to a remote site in each fragment is multiplied by the size of the attributes in each document. F is the number of fragments in the HYFS, and A is the number of attributes in each document.
NF HYFS = ∑ j = 1 F ND j × ∑ i = 1 A A S i
As mentioned at the beginning of this work, static fragmentation is not capable of adapting a scheme to new workloads; therefore, the approach in this research mainly focuses on dynamic hybrid fragmentation using the observer–fragmenter, which is an application developed in the Java programming language. Next, the proposed technique is explained through the process diagram in Figure 3.
Figure 3. Process diagram of the dynamic hybrid fragmentation.
Once XAMANA materializes the hybrid fragmentation scheme, it provides a token (the identifier of the database that the DBA wants to partition). The DBA executes the observer–fragmenter at each site and enters the token, so that the observer–fragmenter of each site starts with the permanent log analysis, which stops when the DBA considers it necessary. For this, the following steps are performed.
  • The operation threshold is evaluated with an initial value that the DBA considers appropriate. If the threshold is not reached, no changes are made; otherwise, step two begins.
  • The necessary operations to obtain the costs of the current scheme are carried out, and the observer–fragmenter continues with step three.
  • The performance threshold is evaluated; if this threshold is not achieved by the results obtained from the cost analysis, no change is made; otherwise, step four is initiated.
  • A new fragmentation and allocation of fragments are performed.
  • Finally, the observer–fragmenter of each site is updated with the new scheme, and the first step begins again.
The observer–fragmenter is based on Algorithm 1, the DHYF (dynamic hybrid fragmentation) observer, and works as follows: The algorithm receives, as its parameters, the token returned by the XAMANA Web application when hybrid static fragmentation is executed and the DBMS log files. In addition, it returns DHYFS[], which is the set of hybrid fragmentation schemes, one for each fragment that surpasses both the operation and performance thresholds. In lines 7–8, the number of operations required to trigger a new performance analysis (nOperations) is calculated based on the number of operations recorded on the fragment at the time of its last iteration (initial_operations) and the operation threshold (the percentage set by the DBA in XAMANA during static hybrid partitioning); then, in lines 9–10, the fragments that do not exceed the operation threshold are discarded from the list of fragments to analyze.
Algorithm 1 uses Algorithm 2, performance_analysis, which receives as its parameters all the fragments, the workload, the fragments that achieve the operation threshold (thresholdF[]), and the size of the attributes (AS[]), to subsequently obtain the hybrid cost of each operation. It returns the list of the fragments that exceed the performance threshold (thresholdP[]).
Algorithm 2 starts by looping through each line of the log file to calculate the hybrid cost (Equation (7)) of each operation performed on the fragments, where current is the position of the line being read in the log file (line 4). For each operation, the IP address of the site (IpLine) where it was executed and its OAV are obtained (lines 5 and 6). Subsequently, the hybrid cost of each operation that accesses the fragment that achieved the operation threshold is obtained. For this purpose, the attributes of the operation being analyzed are recovered and stored in the attributesOpe[] list. To obtain the join cost (JC), two lists are required: the fragment lists containing the attributes of the operation (fragmentsResolveAttributes[]) and those that resolve the predicates of the same (fragmentsResolvePredicates[]) (lines 7–31).
The remote value (RV) is obtained by comparing the IP address of the operation in the log file with those of the sites allocating the fragments that solve its predicate to determine if the operation is local or remote. Next, the vertical (VER), horizontal (HOR), and hybrid (HYB) costs of the operations are calculated according to Equations (1), (4) and (7) (lines 31–44).
Finally, the hybrid costs (hybridCost) are assigned to the fragments, the value necessary to achieve the performance threshold (performance) is calculated, and the fragments that meet this criterion (thresholdP[]) are returned to Algorithm 1 (lines 45–63).
For each fragment that achieves the performance threshold, Algorithm 1 invokes Algorithm 3, dynamic_hybrid_fragmentation (line 15). The latter receives as its parameters a fragment and the workload (log[]). Subsequently, in lines 3 and 4, the vertical and horizontal fragmentation schemes are produced according to the techniques proposed by Castro Medina et al. [3,36]. From the vertical and horizontal partition schemes, the hybrid scheme is produced (HYFS[]), assigning to each hybrid fragment its number (nFragment), name, predicate, attributes, and horizontal (hSite) and vertical sites (vSite), as presented in lines 7–18. Afterward, Algorithm 6 (hybrid performance cost) from Castro Medina et al. [36] is used to obtain the costs of the hybrid fragmentation scheme and return the new hybrid scheme generated from each fragment to Algorithm 1.
Algorithm 1 DHYF Observer
1input: token, log[]
2output: DHYFS[]
3fragments[]   ←  token.get_fragments
4AS[]     ←  token.get_attribute_sizes
5thresholdF[] ←  fragments[]
6for i from 0 to size of fragments[]-1 do {
7  nOperations ←  (fragments[i].operations_threshold *
8        fragments[i].initial_operations)/100
9  if fragments[i].new_operations < nOperations then
10    thresholdF[] ←  thresholdF[] - fragments[i]
11}
12thresholdP[] ←  performance_analysis(fragments[], log[], thresholdF[], AS[])
13DHYFS[] ←  empty list
14for i from 0 to size of thresholdP[]-1 do {
15  DHYFS[i] ←  dynamic_hybrid_fragmentation(thresholdP[i], log[])
16}
17return DHYFS[]
Algorithm 2 performance_analysis
1input: fragments[], log[], thresholdF[], AS[]
2output: thresholdP[]
3for i from 0 to size of log[]-1 do {
4  current ←  log[i]
5  IpLine ←  get the site IP where the current operation was executed
6  OAV ←  1 if it is a read, 2 if it is a creation or deletion, and 3 if it is an update
7  if current contains a fragment name of thresholdF[] then {
8     attributesOpe[] ←  find the attributes used in the current operation
9     fragmentsResolveAttributes[] ←  empty list
10     for each fragment ←  fragments[] do {
11       use ←  false
12       for each l ←  attributes of fragment do {
13         if attributesOpe[] contains l then
14           use ←  true
15       }
16       if use = true then
17         add fragment to fragmentsResolveAttributes[]
18     }
19     predicate ←  get predicate of the current operation
20     SEL ←  get the selectivity of the predicate
21     fragmentsResolvePredicates[] ←  empty list
22     if SEL > 0 then {
23       for each fragment ←  fragmentsResolveAttributes[] do {
24         tuples ←  number of documents satisfying both the operation
25           predicate and fragment predicate
26         if tuples > 0 then
27           add the fragment to fragmentsResolvePredicates[]
28       }
29     }
30     JC ←  size of fragmentsResolvePredicates[]
31     RV ←  1
32     exist ←  false
33     for each fragment ←  fragmentsResolvePredicates[] do {
34       if the site of the fragment != IpLine then
35          exist ←  true
36     }
37     if exist = true then
38       RV ←  RV * 2
39     VER ←  0
40     for each a ←  attributesOpe[] do {
41       VER ←  VER + (OAV * JC * RV * AS[a])
42     }
43     HOR ←  OAV * SEL * RV
44     HYB ←  HOR + VER
45     for each fragment ←  thresholdF[] do {
46        b ←  false
47        for each frag ←  fragmentsResolvePredicates[] do {
48          if fragment.name = frag.name then
49            b ←  true
50        }
51        if b = true then
52         fragment.hybridCost ←  fragment.hybridCost + HYB
53     }
54   }
55}
56thresholdP[] ←  thresholdF[]
57for j from 0 to size of thresholdF[]-1 do {
58   performance ←  (thresholdF[j].performance_threshold *
59         thresholdF[j].initial_performance)/100
60   if thresholdF[j].hybridCost < performance then
61     thresholdP[] ←  thresholdP[]-thresholdF[j]
62}
63return thresholdP[]
Algorithm 3 dynamic_hybrid_fragmentation
1input: fragment, log[]
2output: HYFS[]
3VFS[] ←  vertical_fragmentation (fragment, log[])
4HFS[] ←   horizontal_fragmentation (fragment, log[])
5HYFS[] ←   empty list
6nFragment ←  1
7   for each hFragment ←  HFS[] do {
8      for each vFragment ←  VFS[] do {
9        hybridFragment ←  object fragment
10        hybridFragment.name ←  hFragment.name + nFragment
11        hybridFragment.predicate ←  hFragment.predicate
12        hybridFragment.attributes[] ←  vFragment.attributes
13        hybridFragment.hSite ←  hFragment.site
14        hybridFragment.vSite ←  vFragment.site
15        add hybridFragment to HYFS[]
16        nFragment ←  nFragment + 1
17       }
18     }
19     HYFS[] ←  Hybrid performance cost (log[], HYFS[])
20return HYFS[]

5. Results

In this section, we present how the hybrid fragmentation process is carried out and demonstrate the correct operation of our proposed approach through two case studies. The first case describes the process for static hybrid fragmentation, and the second details the execution of the observer–fragmenter (dynamic hybrid fragmentation). The database, sites, and computer equipment are presented below.
The HITO database [38] is used to apply static and dynamic hybrid fragmentation. HITO is a centralized database developed in MongoDB. HITO stores the history of the Orizaba Technological Institute through images and videos of its different events, students, teaching staff, buildings, and equipment. Currently, it consists of 19 collections with a total of 2.53 GB of storage.
HITO contains the multimedia_records collection with 1870 documents; it stores images of events, buildings, equipment, and personnel of the Orizaba Technological Institute. As seen in Table 4, each document has a unique identifier, image name, description, image, whether it is valid, the SURF (Speeded Up Robust Features) descriptor of the image, and its type. multimedia_records is used to apply the three types of fragmentation (horizontal, vertical, and hybrid), as well as to measure the performance of our proposed approach. Vertical fragmentation considers attributes; therefore, Table 4 details each attribute and its size in the multimedia_records collection.
Table 4. Attributes of the multimedia_records table.
Additionally, two sites are used: the first site (192.168.1.63) is where HITO is located, with 19 collections including multimedia_records; it has the Windows 11 Home Single Language operating system, an AMD Ryzen 5 5600H processor with Radeon Graphics, 3.30 GHz frequency, and 8 GB of RAM. In addition, the IP address 192.168.1.75 is assigned to the second site, which has a Windows 10 Pro operating system, an AMD A9-9425 RADEON R5 processor, 4 GB of RAM, and a frequency of 3.10 GHz.

5.1. Case Study of Hybrid Fragmentation

The workloads used in the case studies are obtained through SimulQUERY, an operations simulator developed by Castro-Medina et al. [36] for MongoDB. Table 5 shows the workload for multimedia_records, with ten operations used in the first case study, which includes the four types of operations (find, delete, insert, and update). In the “Site” column, 1 or 2 indicates that the operation comes from the site with IP 192.168.1.63 or the site with IP 192.168.1.75, respectively.
Table 5. Operations performed on the centralized multimedia database.
When running XAMANA, MongoDB is selected as the DBMS, and the database information (DB address, DB port, DB name, user, and password) is entered as shown in Figure 1; the username and password are optional if the administrator has disabled login authentication. When the DB name is entered, the collections found in it are automatically displayed; therefore, the DBA selects the table to fragment. Subsequently, the configuration for vertical fragmentation is carried out.
The vertical and hybrid fragmentation cost model requires the size of attributes in MB (AS); therefore, the DBA must assign the maximum size for each field in the collection. The size of each attribute for multimedia_records is presented in Table 4.
Following the process diagram in Figure 1, the next option is CBIR; this alternative is only considered when the table or collection receives content-based queries through multimedia data descriptors. This work does not consider CBIR. Then, the workload file is uploaded (log); subsequently, in XAMANA, the values of the operation and performance thresholds (ranging from 0 to 100) are assigned by the DBA; the smaller these values are, the more frequent the fragmentations are. Then, the DBA proceeds to obtain the scheme.
The vertical fragmentation scheme is obtained based on Algorithm 4 and Algorithm 5 of Castro Medina et al. [36]; therefore, the costs of the database operations (Table 5) are first calculated based on Equation (1), as shown in Table 6. For instance, in the case of query q4, the operation is a find type and uses the attributes: descripcion, tipo, validado, _id, and nombre. Therefore, the sum of their sizes is obtained; the sizes of each attribute are taken from Table 4. The remote value (RV4) is 2 because the operation is executed at site 2 and the database is located at site 1. Also, the join cost (JC4) takes the value of 1 because all attributes are present in the collection, so no join is required for this operation.
Table 6. Vertical cost for each operation in the workload.
The operations carried out in the database use sets of attributes; therefore, attribute affinity must be considered, which indicates the relationship among table columns regarding how they are accessed together by the operations. Therefore, according to Algorithm 5 (Affinity Algorithm) [36], the second step of vertical fragmentation is the creation of the attribute cost per site matrix, where each set of attributes used in each workload operation forms a candidate fragment (CF).
To obtain the candidate fragment costs, Equation (13) is used. Table 7 presents the candidate fragments of each operation, which form the attribute cost per site matrix.
VFCC   ( v fr k ) = ∑ i = 1 | a i ∈   vfr k M if   AC a i > 0 0 otherwise
Table 7. Attributes cost per site matrix.
The candidate fragments of the queries q1, q3, and q5 − q10 do not have a document identifier, and so it is added. Furthermore, as seen in Table 7, the total cost is obtained by adding the cost per site for each candidate fragment. For example, candidate fragment 2 requires the attributes tipo, _id, and nombre; therefore, the execution cost of the vertical fragment is obtained using Equation (13) (VFCC (vfr2)), adding the costs of the attributes present in that candidate fragment: VFCC (vfr2) = AC(tipo) + AC(_id) + AC(nombre). These attributes are accessed at site 1 as follows: tipo in operations q2 and q3; _id in q2, and nombre in q1, q2, q7, and q10. Thus, AC(tipo) = (OAV2 × JC2 × RV2) + (OAV3 × JC3 × RV3) × AStipo = [(1 × 1 × 1) + (2 × 1 × 1)] × 0.01 = 0.03; AC(_id) = 0.01; and AC(nombre) = 0.08. Thus, for candidate fragment 2 at site 1, VFCC (vfr2) = 0.03 + 0.01 + 0.08 = 0.12, and at site 2, VFCC (vfr2) = 0.08 + 0.02 + 0.08 = 0.18.
In the case of candidate fragment 4, VFCC (vfr4) = AC(descripcion) + AC(tipo) + AC(validado) + AC(_id) + AC(nombre). Since AC(descripcion ) = 0 at site 1, the cost of this candidate fragment is also 0 at site 1 according to Equation (13); this is done to avoid assigning a higher cost to fragments that are not used together at a site.
Once the attribute cost per site matrix (Table 7) is obtained, the candidate fragments are arranged in descending order based on their final cost. The candidate fragments that contain repeated attributes are removed, and a candidate fragment is added with the attributes that were not used in the workload or not located in any candidate fragment, thus forming the final candidate fragments, as seen in Table 8. Finally, the vertical fragmentation scheme obtained with XAMANA is presented in Table 9.
Table 8. Candidate fragment.
Table 9. Vertical fragmentation scheme for the case study.
In the case of horizontal fragmentation, the database operations are first analyzed considering their predicates, calculating the horizontal cost of each query to create the MCRUD. The horizontal cost of an operation is obtained using Equation (4). For example, the operation q3 is an elimination; RV3 = 1 because it is carried out at the site where HITO is located. According to the values assigned in Table 3, OAV3 = 2 and the selectivity of the predicate {“tipo”:{$eq:”personal”}} is 874 documents found over the entire collection “multimedia_records” in HITO; therefore, HOR(q3) = OAV3 × SEL3 × RV3 = 2 × 874 × 1 = 1748. Table 10 shows the result of the MCRUD with the rest of the operations.
Table 10. MCRUD obtained with XAMANA.
As a second step, the ALP table is created using Equation (5). The locality precedence of an attribute is the sum of the horizontal costs of queries that use that attribute, HOR(qj). In the ten queries carried out, the attributes present in the predicates are tipo, nombre, and validado. The attribute tipo is used in four operations (q2, q3, q4, and q5), so ALP(tipo) = HOR(q2) + HOR(q3) + HOR(q4) + HOR(q5) = 874 + 1748 + 1992 + 4344 = 8958. The costs of tipo, validado, and nombre are presented in Table 11.
Table 11. ALP table obtained with XAMANA.
Finally, the horizontal fragmentation scheme is obtained. For this purpose, the attribute with the highest cost in the ALP table is considered, which is tipo. This attribute defines the predicates of the horizontal fragments; therefore, four operations have tipo in their predicate: q2, q3, q4, and q5. q2 and q3 have the same predicate; therefore, the horizontal fragmentation scheme has three partitions. Table 12 presents the fragments with their respective costs.
Table 12. Horizontal fragmentation scheme for the case study.
To obtain the cost of each fragment, Equation (6) is applied; HFC (hfrl) is the cost of each horizontal fragment defined according to its predicate. As an example, for the predicate {“tipo”:{$eq:”personal”}}, HFC (multimedia_records_2) = HOR(q2) + HOR(q3) = 874 + 1748 = 2622. The fragments are created based on their costs. First, the most expensive fragment is created, which is multimedia_records_1; the subsequent fragments contain the number of tuples that satisfy their predicates minus the tuples already located in previous fragments.
Once XAMANA has vertical and horizontal fragmentation schemes, it proceeds to obtain the hybrid one. For this task, XAMANA begins with the operation analysis to calculate the hybrid cost for each database operation; according to the type of allocation (whether the horizontal or vertical scheme allocation is respected), it will be the remote value to be considered in the hybrid cost.
Table 13 presents the results of the hybrid costs for each query in the operation analysis. For example, in Table 5 the operation q2 is issued at site 1 and has the predicate {“tipo”:{$eq:”personal”}}; according to the horizontal scheme presented in Table 12, the operation is resolved with the fragment multimedia_records_2, also allocated to site 1. Therefore, the remote value considering the horizontal scheme (RVh) is 1 because the operation is performed locally; furthermore, q2 considers the attributes: tipo, _id, and nombre. multimedia_records_3 is the vertical fragment that contains these three attributes and it is allocated to site 2 as shown in Table 9; therefore, the remote value respecting the vertical scheme (RVv) is 2.
Table 13. Hybrid costs of operations.
In this way, in operation q2, the vertical costs respecting the horizontal (VERh) and vertical allocations (VERv) are obtained with the vertical fragmentation Equation (1); the only change to consider is the value of RV taken according to the allocation: VER h q 2 = OAV 2 × JC 2 × RV 2 × ∑ i = 1 3   AS i = 1 × 3 × 1 × 0.03 = 0.09 ; and VERV = 1 × 3 × 2 × 0.03 = 0.18. The horizontal costs respecting the horizontal (HORh) and vertical allocations (HORv) for q2 are calculated based on Equation (4) as follows: HORh(q2) = OAV2 × SEL2 × RV2 = 1 × 874 × 1 = 874; and HORv = 1 × 874 × 2 = 1748.
Once the hybrid costs of all operations are available, the final horizontal–vertical (H-V) and vertical–horizontal (V-H) costs of the hybrid fragmentation scheme are calculated using Equations (10) and (11); therefore, V − H   HYFS = ∑ j = 1 10 VER v ( q j ) + HOR v ( q j ) = 13 , 990.11 and H − V   HYFS = ∑ j = 1 10 VER h ( q j ) + HOR h ( q j ) = 16 , 917.17 .
Table 14 shows the result of the static hybrid fragmentation; the token generated by XAMANA once the scheme materialized is 226. Nine fragments are obtained with their respective attributes, predicates with overlap, costs, and site allocations. In addition, the costs of each hybrid scheme, horizontal–vertical or vertical–horizontal, are compared, and the less expensive materialized scheme is the latter.
Table 14. Scheme of static hybrid fragmentation.
Table 15 presents the queries resolved with the first two fragments of the static hybrid fragmentation scheme shown in Table 14. For example, operations q2, q3, q8, and q9 are resolved with multimedia_records_2; this is because its attributes and the documents that satisfy its predicate with overlap are used in the queries mentioned above. Equations (8) and (9) are used to calculate the cost of a hybrid fragment. Therefore, V − H (multimedia_records_2) = VERv(q2) + HORv(q2) + VERv(q3) + HORv(q3) + VERv(q8) + HORv(q8) + VERv(q9) + HORv (q9) = 0.18 + 1748 + 0.12 + 3496 + 0.18 + 3686 + 0.06 + 1869 = 10,799.54 and H − V (multimedia_records_2) = VERh(q2) + HORh(q2) + VERh(q3) + HORh(q3) + VERh(q8) + HORh(q8) + VERh(q9) + HORh(q9) = 0.09 + 874 + 0.06 + 1748 + 0.36 + 7372 + 0.12 + 3738 = 13,732.63.
Table 15. V-H and H-V costs by fragment.

5.2. Case Study of Dynamic Hybrid Fragmentation

Next, dynamic hybrid fragmentation is performed. To apply dynamic hybrid fragmentation, the partitioning scheme in Table 14 is used.
A workload of 50 queries is generated from the first five fragments (10 queries for each fragment). This workload is structured as follows: 12 insert, 11 find, 12 delete, and 15 update types, of which 24 operations are issued at the first site (192.168.1.63) and 26 at the second site (192.168.1.75). The observer–fragmenter must be at each site along with its respective workload; this way, it will only fragment the partitions located at its site.
If the data is correct, by executing the observer–fragmenter and entering the token obtained from the static hybrid fragmentation plus the path where the workload is located, the information (name and IP) for the database and the name of the collection fragmented are displayed, as well as the performance and operation threshold percentages (in this case, 2% is assigned to both thresholds), the total number of queries in the log (10 operations), and the partitions at the site where the observer–fragmenter is located, as shown in Figure 4. If the data entered by the DBA is incorrect, the observer–fragmenter stops. The observer–fragmenter finds nine fragments. Subsequently, it begins by analyzing the operation threshold concerning the workload, considering all the fragments of the scheme. The first five fragments reach the operation threshold and move to the next phase (cost analysis of the current scheme).
Figure 4. Execution of the observer–fragmenter.
Figure 5 shows the execution cost of the new workload for “multimedia_records_3”, which is 7372.12. As observed, the fragment’s initial performance is 8930.48. The value required to reach the performance threshold is obtained as follows: (8930.48 × 2)/100 = 178.6096. Therefore, the fragment cost is much higher than this value; therefore, a new fragmentation is performed for this partition.
Figure 5. Cost of multimedia_records_3.
Figure 6 shows the resulting partitioning for the fragment multimedia_records_3, which consists of 874 tuples with the attributes _id and validado. After applying the new fragmentation, the first fragment is now multimedia_records_3_1 with 871 tuples, which corresponds to queries with the predicate {“$and”:[{“validado”:{$eq:null}}]}, and the second partition is multimedia_records_3_2, with only three documents that satisfy the predicate {$or:[{“validado”:{$not:{$eq:null}}}]}.
Figure 6. New scheme for multimedia_records_3.
Table 16 presents the schemes of multimedia_records_2, multimedia_records_4, and multimedia_records_5. All five fragments reach the performance threshold; therefore, they move on to obtaining new hybrid schemes. Although multimedia_records_1 surpasses both thresholds, its fragments and the sites where they are allocated remain the same, so there is no need to materialize a new fragmentation scheme. The partition multimedia_records_3_1 is located in site 2 (192.168.1.75) and multimedia_records_3_2 in site 1 (192.168.1.63).
Table 16. The new fragments obtained from multimedia_records_2, multimedia_records_4, and multimedia_records_5 through dynamic hybrid fragmentation.

5.3. Performance Evaluation of Our Approach

In this section, we present the results obtained when comparing the proposed method with the horizontal and vertical fragmentation of Castro-Medina et al. [3,36] and with the static hybrid fragmentation of Rodríguez-Mazahua et al. [11], showing the effectiveness and efficiency of the developed technique.
To achieve the comparison and apply static hybrid fragmentation, a workload of 100 operations is obtained on multimedia_records, which is structured as follows: 23 insert, 25 find, 30 update, and 22 delete types, where 50 queries are issued at the first site (192.168.1.63) and the other 50 at the second site (192.168.1.75). As it is an extensive workload, only the 20 most relevant queries are shown in Table 17.
Table 17. Workload with twenty operations out of one hundred shown.
First, the vertical fragmentation scheme is obtained. As seen in Table 18, the scheme has two fragments: the first with the attributes imagen, descriptor, and _id, and the second with the rest of the attributes: descripcion, tipo, validado, nombre, and _id. Both fragments have 1870 documents.
Table 18. Vertical fragmentation scheme for the second experiment.
Subsequently, the horizontal fragmentation scheme is shown in Table 19. multimedia_records_2 is not considered in the scheme because it is a partition without documents. The mixture of the vertical and horizontal schemes (Table 18 and Table 19) results in the hybrid fragmentation scheme presented in Table 20.
Table 19. Horizontal fragmentation scheme for the second experiment.
Table 20. Hybrid fragmentation scheme for the second experiment.
Based on the static hybrid fragmentation scheme in Table 20, dynamic hybrid fragmentation is applied with a workload of 400 operations with 102 insertions, 95 queries, 115 updates, and 88 deletions. One hundred operations are performed on each fragment and 200 at each site. The observer–fragmenter is executed at each site with token 227 and the workload. The observer–fragmenter recovers the information for the fragments at each site, as presented in Figure 7. Subsequently, it analyzes which fragments meet the operation threshold; those that do not are removed. However, the four fragments meet this criterion, and their performance costs are obtained.
Figure 7. Execution of the observer–fragmenter for the second experiment.
Figure 8 shows the performance cost for multimedia_records_1, and Table 21 contains the costs of the other fragments. Since all fragments reach the value established by the performance threshold (achieve performance), a new hybrid fragmentation is performed on them.
Figure 8. Cost of multimedia_records_1.
Table 21. Cost per fragment of dynamic hybrid fragmentation.
Figure 9 presents the scheme for the first fragment (multimedia_records_1), from which two new partitions are obtained, multimedia_records_1_1 and multimedia_records_1_2. Both have the same attributes (descripcion, tipo, validado, nombre, and _id); the difference lies in the predicate with overlap for each partition. A total of 1842 documents satisfy the predicate of multimedia_records_1_1. Meanwhile, in multimedia_records_1_2, there is only one document. Finally, Table 22 presents the new scheme of the fragments multimedia_records_2, multimedia_records_3, and multimedia_records_4.
Figure 9. New scheme for multimedia_records_1.
Table 22. Scheme of dynamic hybrid fragmentation.
Table 23 compares the costs of the first ten operations in Table 17 obtained with the vertical (VFS), horizontal (HFS), and hybrid (HYFS) fragmentation schemes of Table 18, Table 19 and Table 20 and using Equations (1), (4) and (7). In this table, ID refers to the irrelevant documents accessed by each query, while IAT is the size of the irrelevant attributes in bytes retrieved by the queries.
Table 23. Comparison of the cost for each operation with vertical, horizontal, and hybrid fragmentation schemes.
Based on the results obtained in the first comparison (Table 23), in the case of vertical fragmentation, irrelevant attribute access is avoided because only the attributes that the operations require are considered. Therefore, the queries access a greater number of irrelevant documents. On the other hand, in the horizontal scheme, the operations have a lower cost because the size of the attributes is not considered; however, it has a greater amount of access to irrelevant attributes. In contrast, hybrid fragmentation, by mixing the vertical and horizontal schemes, considers both predicates and attributes, so it has better performance in terms of tuples and irrelevant attributes.
Next, we present the comparison of the method proposed in this work with the approach of Rodríguez-Mazahua et al. [11]. The result obtained according to the queries in Table 17 is a static hybrid fragmentation with eight fragments, as visualized in Table 24. All fragments are assigned to the first site (192.168.1.63). Table 25 compares the hybrid fragmentation scheme obtained with the method proposed in this work and that of Rodríguez-Mazahua et al. [11] based on the last ten queries in Table 17.
Table 24. Hybrid fragmentation scheme obtained by Rodríguez-Mazahua et al. [11].
Table 25. Result of the comparison with the work of Rodríguez-Mazahua et al. [11].
The hybrid scheme obtained with the proposed method has a lower cost than the technique presented by Rodríguez-Mazahua et al. [11] for 77% of the 100 operations in the workload. This is because most operations require fewer joins in the scheme obtained with the method presented in this work. Also, the remote value in the scheme of Rodríguez-Mazahua et al. [11] is greater in most operations since it only performs fragmentation and does not consider fragment allocation; for this reason, all fragments are allocated to site 1, increasing the cost of operations issued at site 2.
We expanded our experimental evaluation by meeting three objectives: First, estimating the query response time, taking into account the workloads used in this section (100 and 400 operations), each executed five times and considering the total, average, and 95th percentile time of each operation. Second, comparing our approach vs. other dynamic fragmentation methods, considering the operating and performance thresholds at 2% and 90%. Third, by analyzing the sensitivity of our cost model. We compare the response time of the 100 operations considering the initial hybrid fragmentation scheme (Table 20) obtained with our method (static hybrid fragmentation, SHYBF) vs. the centralized database (CDB) and the vertical (static vertical fragmentation, SVERF) and horizontal (static horizontal fragmentation, SHORF) fragmentation schemes (Table 18 and Table 19) produced by the methods of Castro-Medina et al. [3,36]. The response time of the remaining 400 operations is compared to that of the partitioning scheme generated by our hybrid fragmentation method (dynamic hybrid fragmentation, DHYBF), with operation and performance thresholds of 2% (Figure 9 and Table 22) and 90%, vs. the partitioning schemes obtained by the dynamic horizontal fragmentation technique proposed by Castillo-García et al. [12] (dynamic horizontal fragmentation, DHORF) and the dynamic vertical fragmentation of Castro-Medina et al. [36] (dynamic vertical fragmentation, DVERF).
Table 26 shows that horizontal fragments multimedia_records_1 and multimedia_records_3 surpass both performance thresholds (2% and 90%). Nevertheless, only the second vertical fragment exceeds them. Therefore, Table 27 and Table 28 illustrate the new partitioning schemes (DVERF and DHORF). By applying dynamic horizontal and vertical fragmentation with operation and performance thresholds of 2% and 90%, we obtain the same fragmentation schemes (Table 27 and Table 28). Meanwhile, when applying our hybrid fragmentation method (DHYBF) with thresholds of 90%, only multimedia_records_1 and multimedia_records_3 are fragmented, as shown in Figure 9 and Table 22.
Table 26. Cost per fragment of dynamic vertical and horizontal fragmentation.
Table 27. Dynamic vertical fragmentation scheme obtained by Castro-Medina et al. [36].
Table 28. Dynamic horizontal fragmentation scheme obtained by Castillo-García et al. [12].
Figure 10 graphically depicts the query response time, and Table 29 presents the results in greater detail. According to the results obtained, for static fragmentation, the vertical fragmentation method outperforms the initial fragmentation scheme obtained by our technique; nevertheless, when dynamic fragmentation is performed considering thresholds at 2%, the scheme obtained by our method achieves the best results. In contrast, when the dynamic hybrid fragmentation thresholds are increased to 90%, the query response times increase, as shown in Table 29.
Figure 10. Graphical representation of query response times.
Table 29. Comparison of the execution time in milliseconds for vertical, horizontal, and hybrid fragmentation schemes.
We executed a Friedman test followed by a Durbin–Conover test, Holm adjusted, to compare the dynamic fragmentation schemes vs. the partitioning scheme obtained by our approach with the operation and performance thresholds at 2% (DHYBF_2%). Figure 11 shows that two pairwise comparisons are very significant (**): the DHYBF_2 - DVERF (p. adj. = 0.002) and DHYBF_2 - DHYBF_90 (p. adj. = 0.004) fragmentation schemes, considering the total, average, and 95th query response times.
Figure 11. Friedman test of fragmentation schemes.

6. Discussion

Multimedia databases are of great importance in information systems, as they allow for the storage of large amounts of data of various types, such as images, audio, and video. However, multimedia data, due to their large size, represent a challenge for efficient information retrieval, as they increase the data transmission costs and response times. To address these problems, we developed a partitioning method for multimedia data that considers horizontal and vertical fragmentation, based on cost and affinity. In addition, it adapts the fragmentation scheme according to changes in the workload in a distributed environment.
The presented method complies with the three fragmentation rules. (1) Completeness: All tuples and attributes of the collection are mapped onto fragments without any loss. (2) Reconstruction: The collection is rebuilt from the obtained fragments, that is, for horizontal fragmentation through the union operator and for vertical fragmentation through the join. (3) Disjointness: The fragments must not overlap. In the case of horizontal fragmentation, the horizontal fragments are disjoint, whereas in vertical fragmentation the primary key attributes are normally repeated in all its fragments (for reconstruction purposes); that is, disjointness is defined only for attributes that are not part of the primary key of a relation.
The proposed cost model enables comparison of hybrid fragmentation schemes based on workload and, subsequently, the selection of the less costly fragmentation and allocation scheme (horizontal–vertical or vertical–horizontal). Likewise, the proposed approach operates under these characteristics. (1) The observer–fragmenter must be present at each of the sites considered, along with the respective workloads. This way, it will only re-fragment the partitions located at its site (server), and each observer–fragmenter will evaluate whether it is necessary to update the information for the fragments it supervises at each site. (2) Before re-fragmenting and allocating, the following must be considered: (a) When one of the hybrid fragments has the same number of tuples and attributes as the original fragment, partitioning is not performed again; however, if the site where it should be allocated changes, then it is moved from its place of origin—that is, it is allocated to the destination site and kept as is, retaining its name. (b) If a hybrid fragment is empty (contains no tuples or attributes), then it is neither created nor named. (c) When a fragment is allocated to the site where the database is located, it is added to it; but if the site is different and the database does not exist, in the case of MongoDB, the database and the new fragments are created. (3) The thresholds are values (from 0 to 100) that the DBA assigns when applying static hybrid fragmentation. The smaller these values, the more sensitive and frequent the new fragmentations are. The operations threshold is the percentage of operations required to perform a new fragment cost analysis, and the performance threshold is the percentage of fragment cost set by the DBA that triggers a new fragmentation. Therefore, in dynamic hybrid fragmentation, these thresholds allow for determining when it is appropriate to carry out a new re-fragmentation.
To improve the explanation of the configuration of the operation and performance thresholds, Figure 12 graphically shows the different combinations of thresholds (operation and performance) with respect to 10%, 50%, and 90%. If the DBA sets the operation threshold at 10% and the performance threshold at 50%, the probability of performing a new fragmentation is medium, whereas if both thresholds are set at 90%, the probability is low; that is, it is less likely that a new fragmentation will be triggered because a greater number of queries and a higher performance value are required. The DBA will decide the correct values for these thresholds according to the characteristics of the multimedia database; this decision can also be made according to the cost of a new fragmentation using Equation (12). When this cost is greater than the cost of the V-H or the H-V obtained with Equations (10) and (11), then a new fragmentation is not recommended; therefore, the operation and performance thresholds must increase. Additionally, we take the first hybrid fragment from the second experiment as a reference; the number of operations and the performance cost that must be reached for a new fragmentation are calculated (Table 30) considering 10%, 50%, and 90% for both thresholds. One hundred new operations are executed, and the cost is now greater than all the thresholds; therefore, a new fragmentation is triggered.
Figure 12. Graphical representation of operation and performance thresholds.
Table 30. Costs obtained for multimedia_records_1 for a new fragmentation.

7. Conclusions, Limitations, and Directions for Future Research

A dynamic hybrid fragmentation method for multimedia databases is presented that can adapt the fragment scheme to changes in the workload and considers a cost model. The proposed cost model allows for comparison of hybrid fragmentation schemes based on the workload to obtain and subsequently apply the least expensive scheme. The observer–fragmenter can monitor the operation and performance thresholds without the intervention of the DBA. When the cost of the fragment reaches the thresholds, a new fragmentation is automatically triggered, and the new partitions produced are allocated to the corresponding sites.
We compare our approach with another state-of-the-art method and show that it is possible to reduce the execution cost of 77% of queries by accessing a smaller amount of remote data and requiring fewer joins. Therefore, the selection of the type of fragmentation (vertical, horizontal, or hybrid) to apply will depend on the DBA optimization goals. If access to fewer irrelevant documents by operations is needed, then horizontal fragmentation is most appropriate; conversely, if reducing access to irrelevant attributes is required, vertical partitioning is recommended. When operations involve subsets of documents and attributes, hybrid fragmentation is the best alternative solution.
Despite the aforementioned benefits, our method has limitations: it was developed for fragmentation in MongoDB; nevertheless, it was designed to be adapted to another NoSQL DBMS, such as Cassandra. On the other hand, the application and evaluation of hybrid fragmentation were done in a controlled environment; that is, the workloads were generated using a query generator, only two sites with a fixed network were considered, and the maximum number of operations was 400. Nevertheless, the method presented can analyze new operations and detect new sites. For this reason, as future work, the experimental analysis will be expanded using other databases, datasets, and benchmarks, including larger data volumes and diverse data distributions. Additionally, the configuration will consider more network sites, and the impact of thresholds (operation and performance) will also be studied to verify how different configurations affect the system’s performance and stability.
Due to the increasing volume of data generated by applications and/or devices connected to the internet, especially through the Internet of Things (IoT), and since Big Data refers to data that is complex to process because of the volume generated when stored, another area for future research is to focus on developing new methods of horizontal, vertical, and hybrid fragmentation for Big Data based on graphs that optimize operations in massive data repositories. We intend another line of research to consider CBIR and CBVR (Content-Based Video Retrieval) within the proposed method, and to contemplate other types of NoSQL databases, such as graph-oriented databases.

Author Contributions

Conceptualization, L.R.-M. and F.C.-M.; methodology, L.R.-M., F.C.-M. and O.C.-R.; software, L.R.-M., F.C.-M. and O.C.-R.; validation, G.A.-H. and J.C.; formal analysis, L.R.-M. and F.C.-M.; investigation, L.R.-M., F.C.-M. and O.C.-R.; resources, L.R.-M. and G.A.-H.; data curation, M.L.A.-R., L.R.-M. and F.C.-M.; writing—original draft preparation, O.C.-R., L.R.-M. and F.C.-M.; writing—review and editing, L.R.-M., G.A.-H., J.C., N.R.-M. and M.L.A.-R.; visualization, F.C.-M., O.C.-R. and L.R.-M.; supervision, F.C.-M., L.R.-M. and G.A.-H.; project administration, L.R.-M. and F.C.-M.; funding acquisition, L.R.-M., G.A.-H., N.R.-M., and M.L.A.-R. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Secretariat of Science, Humanities, Technology and Innovation (SECIHTI) through a doctoral scholarship provided to the first author and a postdoctoral research fellowship given to the second and sixth authors (Application numbers: 8177740 and 10618225).

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Acknowledgments

The authors are very grateful to the National Technological of Mexico (TecNM) for supporting this work. This research paper was sponsored by the Secretariat of Science, Humanities, Technology and Innovation (SECIHTI), and the Secretariat of Public Education (SEP).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Özsu, M.T.; Valduriez, P. Principles of Distributed Database Systems, 4th ed.; Springer International Publishing: Cham, Switzerland, 2020. [Google Scholar]
  2. Castro-Medina, F.; Rodríguez-Mazahua, L.; López-Chau, A.; Cervantes, J.; Alor-Hernández, G.; Machorro-Cano, I. Application of Dynamic Fragmentation Methods in Multimedia Databases: A Review. Entropy 2020, 22, 1352. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  3. Castro-Medina, F.; Rodríguez-Mazahua, L.; López-Chau, A.; Cervantes, J.; Alor-Hernández, G.; Machorro-Cano, I.; Arrioja-Rodríguez, M.L. A New Method of Dynamic Horizontal Fragmentation for Multimedia Databases Contemplating Content-Based Queries. Electronics 2022, 11, 288. [Google Scholar] [CrossRef] [Scilit]
  4. Mahmoud, S.H.; Abdelraouf, A.E.; Badr, N.L.; Ali, M.I. Optimizing Vertical Distribution Techniques For Heritage Multimedia Databases: Challenges And Solutions. J. Theor. Appl. Inf. Technol. 2025, 103, 366–374. [Google Scholar]
  5. Mahmoud, S.H.; Badr, N.; Abdelraouf, A.E.; Ali, M.I. RL-Based Fragment Allocation and Replication for Distributed Heritage Multimedia Databases. Int. J. Intell. Comput. Inf. Sci. 2025, 25, 73–92. [Google Scholar] [CrossRef] [Scilit]
  6. Safaei, A.A. Hybrid Fragmentation of Medical Images’ Attributes for Multidimensional Indexing. Clust. Comput. 2022, 25, 215–230. [Google Scholar] [CrossRef] [Scilit]
  7. Patel, M.; Yadav, N.; Bhise, M. Workload Aware Cost-Based Partial Loading of Raw Data for Limited Storage Resources. In Futuristic Trends in Networks and Computing Technologies; Springer: Singapore, 2022; Volume 936, pp. 1035–1048. [Google Scholar]
  8. Crescencio-Rico, O.; Rodríguez-Mazahua, L.; Castro-Medina, F.; Alor-Hernández, G.; Sánchez-Cervantes, J.L. Dynamic Hybrid Fragmentation Method for Multimedia Databases. Pädi Bol. Cienti Cienc. Básicas Ing. ICBI 2023, 11, 47–54. [Google Scholar] [CrossRef] [Scilit]
  9. Rodríguez-Mazahua, L.; Alor-Hernández, G.; Li, X.; Cervantes, J.; López-Chau, A. Active Rule Base Development for Dynamic Vertical Partitioning of Multimedia Databases. J. Intell. Inf. Syst. 2017, 48, 421–451. [Google Scholar] [CrossRef] [Scilit]
  10. Rodríguez-Mazahua, L.; Alor-Hernández, G.; Abud-Figueroa, M.A.; Peláez-Camarena, S.G. Horizontal Partitioning of Multimedia Databases Using Hierarchical Agglomerative Clustering. In Nature-Inspired Computation and Machine Learning; Gelbukh, A., Espinoza, F.C., Galicia-Haro, S.N., Eds.; Springer International Publishing: Cham, Switzerland, 2014; pp. 296–309. [Google Scholar]
  11. Rodríguez-Mazahua, L.; Alor-Hernández, G.; Cervantes, J.; López-Chau, A.; Sánchez-Cervantes, J.L. A Hybrid Partitioning Method for Multimedia Databases. Dyna 2016, 83, 59–67. [Google Scholar] [CrossRef] [Scilit]
  12. Castillo-García, A.; Rodríguez-Mazahua, L.; Castro-Medina, F.; Arrioja-Rodríguez, M.L.; Sánchez-Cervantes, J.L.; Rodríguez-Mazahua, N. Design of a Dynamic Horizontal Fragmentation Method for Multimedia Databases. In Intelligent Systems Reference Library; Springer Science and Business Media Deutschland GmbH: Cham, Switzerland, 2023; Volume 226, pp. 71–91. [Google Scholar]
  13. Ortiz-Ballona, A.O.; Rodríguez-Mazahua, L.; López-Chau, A.; Castro-Medina, F.; Abud-Figueroa, M.A.; Rodríguez-Mazahua, N. A Vertical Fragmentation Method for Multimedia Databases Considering Content-Based Queries. In Intelligent Systems Reference Library; Springer Science and Business Media Deutschland GmbH: Cham, Switzerland, 2023; Volume 226, pp. 3–23. [Google Scholar]
  14. Saad, S.; Tekli, J.; Chbeir, R.; Yetongnon, K. Towards Multimedia Fragmentation. In Advances in Databases and Information Systems; Lecture Notes in Computer Science; Manolopoulos, Y., Pokorny, J., Sellis, T.K., Eds.; Springer: Berlin/Heidelberg, Germany, 2006; Volume 4152, pp. 415–429. [Google Scholar]
  15. Zhou, X.; Li, G.; Feng, J.; Liu, L.; Guo, W. Grep: A Graph Learning Based Database Partitioning System. Proc. ACM Manag. Data 2023, 1, 1–24. [Google Scholar] [CrossRef] [Scilit]
  16. Cantini, R.; Marozzo, F.; Orsino, A.; Talia, D.; Trunfio, P.; Badia, R.M.; Ejarque, J.; Vázquez-Novoa, F. Block Size Estimation for Data Partitioning in HPC Applications Using Machine Learning Techniques. J. Big Data 2024, 11, 19. [Google Scholar] [CrossRef] [Scilit]
  17. Mao, Q.; Hristidis, V. Enhancing LSM Trees Merge Efficiency via Coordinated Sorted Runs Partitioning. J. Big Data 2025, 12, 252. [Google Scholar] [CrossRef] [Scilit]
  18. Shoaib, M.; Younus, M.U.; Safdar, K.; Dogar, A.B. A Hybrid Approach for Efficient Database Fragmentation in Distributed Systems. Int. J. Innov. Sci. Technol. 2026, 8, 162–178. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  19. Badran, S.; Arman, N.; Farajallah, M. Towards a Hybrid Data Partitioning Technique for Secure Data Outsourcing. In Proceedings of the 2020 21st International Arab Conference on Information Technology, ACIT 2020; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2020. [Google Scholar]
  20. Noraziah, A.; Fauzi, A.A.C.; Ubaidillah, S.H.S.A.; Alkazemi, B.; Odili, J.B. BVAGQ-AR for Fragmented Database Replication Management. IEEE Access 2021, 9, 56168–56177. [Google Scholar] [CrossRef] [Scilit]
  21. Badran, S.; Arman, N.; Farajallah, M. An Efficient Approach for Secure Data Outsourcing Using Hybrid Data Partitioning. In Proceedings of the 2021 International Conference on Information Technology, ICIT 2021—Proceedings; Institute of Electrical and Electronics Engineers Inc.: New York, NY, USA, 2021; pp. 418–423. [Google Scholar]
  22. Azila, A.; Fauzi, C.; Fariza, W.; Rahman, W.A.; Fauzi, A.; Weigelt, F. Managing Fragmented Database in Distributed Database Environment. J. Math. Comput. Sci. 2021, 7, 8–14. [Google Scholar]
  23. Ahmed, Z.J.; Alluhaibi, S.T. Hybrid Data Fragmentation Using Genetic Killer Whale Optimization-Based Clustering Model. J. Pharm. Negat. Results 2022, 13, 290–298. [Google Scholar] [CrossRef] [Scilit]
  24. Schreiner, G.A.; De Santiago, R.; Duarte, D.; Dos Santos Mello, R. An Autonomous Hybrid Data Partitioning Approach for NewSQL Databases. J. Braz. Comput. Soc. 2026, 32, 55–72. [Google Scholar] [CrossRef] [Scilit]
  25. Pinnecke, M.; Campero Durand, G.; Broneske, D.; Zoun, R.; Saake, G. GridTables: A One-Size-Fits-Most H2TAP Data Store. Datenbank-Spektrum 2020, 20, 43–56. [Google Scholar] [CrossRef] [Scilit]
  26. Kulba, V.; Somov, S. Dynamic Fragment Allocation in Distributed System with Time-Varying Parameters of Its Operation. In Proceedings of the 2020 13th International Conference “Management of Large-Scale System Development” (MLSD); IEEE: New York, NY, USA, 2020; pp. 1–4. [Google Scholar]
  27. Kang, D.; Jiang, R.; Blanas, S. Jigsaw: A Data Storage and Query Processing Engine for Irregular Table Partitioning. In Proceedings of the ACM SIGMOD International Conference on Management of Data; Association for Computing Machinery: New York, NY, USA, 2021; pp. 898–911. [Google Scholar]
  28. Cui, S.; Wang, H.; Lin, J.; Ding, X.; Yang, D. WorthyPar: A Workload-Aware Data Hybrid Partitioning Advisor with Deep Reinforcement Learning. In Proceedings of the Lecture Notes in Computer Science; LNCS; Springer Science and Business Media Deutschland GmbH: Berlin/Heidelberg, Germany, 2026; Volume 15989, pp. 105–122. [Google Scholar]
  29. Cui, S.; Wang, H.; Lin, J.; Ding, X.; Yang, D. FinePar: A Fine-Grained Data Partitioning Framework for Cloud-Edge-Device Architectures. IEEE Trans. Knowl. Data Eng. 2026, 38, 2262–2276. [Google Scholar] [CrossRef] [Scilit]
  30. Ahmed, Z.; Alhenshiri, A. Adaptive Query-Driven Fragmentation for Performance Optimization in Distributed Databases. Alqalam J. Med. Appl. Sci. 2026, 9, 849–855. [Google Scholar] [CrossRef] [Scilit]
  31. Singh, A.P.; Choudhary, A. Approach for Ensuring Fragmentation and Integrity of Data in SEDuLOUS. In Proceedings of Second International Conference on Computing, Communications, and Cyber-Security; Springer: Singapore, 2021; Volume 203, pp. 857–869. [Google Scholar]
  32. Liu, P.J.; Li, H.Y.; Wang, T.Y.; Liu, H.; Sun, L.M.; Ren, Y.F.; Li, C.P.; Chen, H. Multi-Stage Method for Online Vertical Data Partitioning Based on Spectral Clustering. Ruan Jian Xue Bao/J. Softw. 2023, 34, 2804–2832. [Google Scholar] [CrossRef]
  33. Kang, S.; Veeravalli, B.; Aung, K.M.M. A Security-Aware Data Placement Mechanism for Big Data Cloud Storage Systems. In Proceedings of the 2016 IEEE 2nd International Conference on Big Data Security on Cloud (BigDataSecurity), IEEE International Conference on High Performance and Smart Computing (HPSC), and IEEE International Conference on Intelligent Data and Security (IDS); IEEE: New York, NY, USA, 2016; pp. 327–332. [Google Scholar]
  34. JavaServer Faces Technology. Available online: https://www.oracle.com/java/technologies/javaserverfaces.html (accessed on 28 July 2026).
  35. Jakarta Faces Specifications. Available online: https://jakarta.ee/specifications/faces/ (accessed on 20 July 2026).
  36. Castro Medina, F.; Rodríguez Mazahua, L.; López Chau, A. Desarrollo de Nuevos Métodos de Fragmentación Dinámica Para Bases de Datos Multimedia; Instituto Tecnológico de Orizaba: Orizaba, Mexico, 2024. [Google Scholar]
  37. Abdel Raouf, A.E.; Badr, N.L.; Tolba, M.F. Distributed Database System (DSS) Design over a Cloud Environment. In Multimedia Forensics and Security; Springer: Cham, Switzerland, 2017; Volume 115, pp. 97–116. [Google Scholar]
  38. Joaquín Rodríguez-Arauz, M.; Rodríguez-Mazahua, L.; Leoncio Arrioja-Rodríguez, M.; Antonieta Abud-Figueroa, M.; Gustavo Peláez-Camarena, S.; Del Carmen Martínez-Méndez, L. Design of a Multimedia Data Management System That Uses Horizontal Fragmentation to Optimize Content-Based Queries. In Proceedings of the Tenth International Conference on Advances in Information Mining and Management, Lisbon, Portugal, 27 September–1 October 2020. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.