Abstract
1. Introduction
Software-as-a-service (SaaS), in its broadest sense, refers to an on-demand software, which is delivered as services over the Internet [1]. SaaS has been incorporated into the strategy of all leading enterprise software companies to develop various multitenant applications [2]. One of the biggest selling points for these companies is the potential to reduce IT support costs. According to International Data Corporation's (IDC) latest market report, SaaS will grow at a 29.2% annual compound rate through 2013–2017 [3]. With such an inspiring motivation, sensor cloud infrastructure is becoming popular because it can provide a flexible and configurable platform for several legacy Web sensor applications [4]. As for emerging sensor cloud system, serviceology for services is a general tendency [4], which explores theoretical structures of service concepts and generates scientific systematization of services and products. Since multitenancy is an essential component for SaaS, data storage model is a prime problem in multitenant sensor cloud applications. Due to increasing demand on sensor data and their support in multitenancy, sensor cloud architecture has been introduced as an integration of cloud computing into wireless sensor networks (WSNs) to innovate a number of other new techniques, such as WSN cloud services, databases, and applications. Some relevant publications conduct their own research on tenant customizing and its performance issues [5, 6]. Currently, there are at least three virtual data storage models: separate database, sharing the database with separate schemas, and sharing the database with sharing schemas [7, 8]. The most popular approach is the third one. Salesforce.com has passed up traditional virtualization software for custom technology that puts up to 10,000 customers on 15 databases and 100 servers using this approach [9].
There are some challenges in sensor cloud scenarios. First, cloud users were still approaching some practical difficulties, in particular when handling a large amount of sensor data [10]. The traditional data storage approach will become a bottleneck problem when working on large data sets of interactive sensor data. The second challenge is how tenants access their sensor data in the sharing storage model with a logical view.
Wide table [11] was introduced as an authoritative multitenant sparse data storage model. This raw model has some limitations. First, the data in wide table is left-intensive. Since tenants consume columns of wide table from left to right, the right column might be assigned a value of null. This will consume a lot of spaces when working with massive tenants [12]. Another improved version of this wide table is called single wide table with vertical scalability [7]. This model stores personalized data in the extended vertical part. Although this model can reduce the amount of schema null values, it will lead to another schema evolution issue [13]. With the increase of tenants’ requirements, the length of tenants’ schema exceeds the preset width of core horizontal part. In this situation, some data in the vertical part are forced to move into the horizontal part to address schema null issue manually. Further details are presented in Sections 2 and 3.
Tenant customizing and its performance are two interdependent elements which depend on each other and limit each other in the context of multitenant data storage of sensor data. Our motivation of this paper is to achieve this balance between flexibility and complexity. In our paper, we propose multiple wide tables with vertical scalability in sensor cloud system, for the purpose of raising data intensity of data spaces, as well as spatial-temporal performance. Multitenant multiple wide tables are composed of core horizontal metadata and extended vertical metadata, in order to limit schema null issue. In addition, dividing a single wide table into various multiple wide tables with vertical scalability in sensor cloud system reduces the probability of schema evolution.
The contributions of this study are divided into several aspects. We attempt to address schema null and evolution issues using this new model. First, our data model provides a logical relational view with a minimum of resources. Second, our data model improves read and write performance by adding indexes to frequently accessed columns. Third, this model reduces the waste of null values in relational database with vertical scalability. Finally, dividing a wide table into multiple wide tables addresses schema evolution issue effectively. In conclusion, our data model achieves the balance between tenant customizing and its performance.
The remainder of the paper is organized as follows. Section 2 discusses the related work, and Section 3 presents multitenant multiple wide tables with vertical scalability of the sensor cloud system. First, we add some reserved columns dividing a wide table into different multiple wide tables to address the schema evolution issue. And then, the data model of multiple wide tables with vertical scalability is discussed in detail. Next, we analyze the correctness and implementations of this model. Section 4 gives the experimental evaluation of our multiple wide tables with vertical scalability. In Section 5, we discuss the superiority of our proposed multitenant multiple wide tables with vertical scalability in sensor cloud system with qualitative assessments. Brief conclusions and future work are outlined in the last section.
2. Related Work
In recent years, WSNs have become an established technology for a large number of applications, ranging from monitoring to event detection, as well as target tracking [14]. On one hand, cloud WSN applications with sharing storage usually lead to massive data. On the other hand, the cloud tenants have the requirements on personalization. That is to say that different tenants have different personalized columns. Accordingly, the storage of multitenant sharing data is more challenging.
This section outlines some classical sharing multitenant data storage models and features in sensor cloud system and introduces private table, extension table, document store, and wide table. Figure 1 illustrates the structure and metadata of different data models. Columns

Classical multitenant data models.
2.1. Private Table
The most basic way to support extensibility is to give each tenant their own private table. In this simple approach, what the query-transformation layer needs to do is renaming tables. Thus, this approach has stronger pertinence and better expansibility on the customization and isolation. However, only moderate consolidation is provided, since many tables are required. Aulbach et al. stated that relational structures might be made more competitive in the case of over 50,000 tables [15].
2.2. Extension Table
This approach is combined with splitting of the extension into a separate table. The sharing data are stored in the public storage (basic tables), while the separate data are stored in the extension table [16]. Because multiple tenants may use the same extension, extension tables as well as basic tables should be given an identity column of a tenant (
2.3. Document Store
NoSQL databases are often highly optimized using key/value stores that are intended for simple retrieval and appending operations, with the goal being significant performance benefits in terms of latency and throughput [17]. Take document store for example, it provides JSON-style documents with dynamic schemas to store data. Although this dynamic structure minimizes null values, relational query is destroyed by this structure. The query of this model will produce an amount of connective operations, which make it difficult to refactor a relational tuple with
2.4. Wide Table
2.4.1. Single Wide Table
Single wide table is usually highly sparsely populated so that most data can be fit into a line or a record [18]. Using this solution, queries are composed on only a small subset of the attributes. However, this model will produce the schema null problem, since it has too many null values. Moreover, it cannot provide dynamic customization capabilities since the reserved column is still limited in numbers. Indexing on a table generally brings up extra high storage and update costs. When the data set is sparse, the extra cost can be overcome by using a sparse index. A sparse index is one special kind of partial index, which maps only the non-NULL values to object identifiers [11].
2.4.2. Single Wide Table with Vertical Scalability
Another improved version of the single wide table is a single wide table with vertical scalability [12]. This model extracts the personalized data from the relational wide table and then describes it using extended vertical metadata. Each row in an instance of extended vertical metadata is a key/value pair, which is used to store the personalization of tenants to fulfill the requirements. In the event that the personalization of tenants is identical, extended vertical metadata can be omitted. The advantage of this approach is that it can reduce the waste of data resources efficiently. However, this model will produce schema evolution issue with the increase of customizing columns. In this case, the length of tenants’ schema exceeds the preset width of wide table.
2.5. Challenges of Current Wide Table
In the wide table solution, all the tenants’ sensor data are stored in a sharing database. The features of multitenant sensor data have brought with them our own two new challenges.
First, it leads to the schema null issue when tenants do not customize some columns. If one tenant has customized this column, a value might be assigned to be useful at run time. If one tenant has not customized this column, the value of this column must be null. Multitenant sensor data that already looks like is left-intensive, since tenants consume the data from left to right. This is a key issue of data storage of multitenants to be solved.
In the relational wide table, we suppose
Second, it will lead to the schema evolution issue in the case of single wide table solution with vertical scalability. When the length of tenants’ schema exceeds the preset width of a single wide table, the extended vertical part of a single wide table should be transferred to the core horizontal part. We call this transfer schema evolution. Therefore, fixed length of customizing columns can introduce a flaw that affects the performance of the cloud database. In addition,
3. Multitenant Multiple Wide Tables with Vertical Scalability
3.1. Schema Evolution Issue
In order to reduce the probability of schema evolution, we attempt to add some additional reserved columns to improve single wide table with vertical scalability. Moreover, the wide table is partitioned to formulate multiple wide tables by the sum of the amount of customizing and reserved columns. The structure of multiple wide tables with vertical scalability is shown in Figure 2. One of multiple wide tables is divided into customizing and reserved columns, which is called a cluster. The personalized data are stored in the extended vertical part, and the customizing data are stored in the core horizontal part. On one hand, vertical scalability can reduce the access granularity of tuples. On the other hand, the reserved columns in the core horizontal part can reduce the probability of schema evolution.

Multitenant multiple wide tables with vertical scalability in sensor cloud system.
3.2. Data Model
In our paper, multitenant multiple wide tables with vertical scalability are composed of core horizontal metadata and extended vertical metadata. We use
In the context of multiple wide tables, tenants’ data are spread over different single wide tables. That is to say that multiple wide tables with gradient distribution replace several single wide tables, meeting the demand on dynamic storage requirements of tenants. The tenants’ data are determined in either the core horizontal part or the extended vertical part by the requirements on the tenants’ customization.
3.3. Vertical Scalability
In order to personalize the data of tenants, we design the vertical scaling method to solve the sparse and schema null issues of a single wide table. That is to say that we extract the personalized data from the wide table and then describe it using vertical metadata. As depicted in Figure 2, extended vertical metadata reduces the waste of data resources efficiently. Each row in the extended vertical metadata is a key/value pair, which is used to store the personalization of tenants to fulfill the requirements of different tenants. In the case that the personalization of tenants is the same, the extended vertical metadata can be omitted.
Although the extended vertical metadata reduces schema null values effectively, it increases the computational complexity. For the purpose of evaluating whether the data are stored in the core horizontal part or the extended vertical part, we give the evaluation function to determine whether the extended vertical part is worth adopting. We describe the evaluation function of column
It is shown that the larger
Since the data type of

Vertical scalability in supporting various data types.
3.4. Table Partition
This section discusses the reasonable partition of multiple wide tables with vertical scalability. Consider that tenant
The statistical analysis of the customizing requirements shows that customizing columns of tenants approximately corresponds to the normal distribution
3.5. Correctness Analysis
In this section, we apply equivalence analysis between multitenant multiple wide tables with vertical scalability and traditional relational table.
Theorem 1.
Multitenant multiple wide tables with vertical scalability are equivalent to a relational table.
(1) A relational table can be converted into multitenant multiple wide tables with vertical scalability.
We denote a relational table using the mathematical relation. This relational table has
If attribute
If attribute
If attribute
The mapping rule is also described in Algorithm 1.
Algorithm 1
(2) Multitenant multiple wide tables with vertical scalability can be converted into a relational table. We use core horizontal part and extended vertical part of multiple wide tables to refactor the relational table.
First, we pivot the extended vertical metadata
The mapping rule is also described in Algorithm 2.
Algorithm 2
Next, relation
Finally, relation
3.6. Implementation
Multiple wide tables with vertical scalability are composed of various single wide tables with vertical scalability, and each wide table is composed of two parts: core horizontal metadata and extended vertical metadata. We use MySQL 5.6 GA to store both parts.
Figure 4 illustrates a running example that shows the mapping between multitenant wide tables with vertical scalability and a relational table. This operation is transparent to end users with the help of the transformation view. We use the example of Figure 4 to describe the creation and read process. We take column

A mapping example between the multi-tenant wide table and relational table.
When we insert three records
We provide a read-only logical relational view for query using Algorithm 3.
Algorithm 3
Therefore, the developers can query the relational view regardless the actual storage, which is similar to a virtual wide table. This operation is transparent to the developers.
4. Performance Evaluation
The experiments were performed on a server with the following configurations: an Intel(R) Core(TM) CPU I5-2300 3.0 GHz server with 8 GB RAM, a 100 M Realtek 8139 NIC in 100 M LAN. This server was deployed with the operating system CentOS
4.1. Spatial Intensity
We select cloud sensor data generated by 20 different tenants to do the first special experiment. We compare single wide table with 50 columns, with our multiple wide tables with vertical scalability. Consider that tenants consume wide table from left to right. The amount of customizing column of each tenant is as
Partition and intensity of multiple wide tables with vertical scalability.

Fitting of frequency histogram and normal distribution function.
4.2. Read Performance
We have done the second experiment to evaluate the read performance. Consider that there are five columns (
We have executed six queries on the sharing multi-tenant sensor data with the same query condition. The queries are to extract data from columns

Comparison of query time of different solutions.
By contrast, solution
Next, we have made the third experiment to observe the effect of concurrent transactions on read performance. We use multithreads to simulate a large number of requests to wide tables with 10,000 records. We issue a query “query the monitoring sensor data in the past three months” for 10 times and record the average query time. We have added solution

Effect of concurrent transactions on read performance.
Due to the data refactor of extended vertical part, query time of solution
4.3. Write Performance
We have made the last experiment to observe the effect of concurrent transactions on write performance. We measure the number of writes per second. In solutions

Effect of concurrent transactions on write performance.
5. Discussion
Tenant customizing and its performance are two interdependent elements. Single wide table is basic sparse table to store tenant's data. Due to the sparsity feature, this model causes too much space. Although single wide table with vertical scalability addresses schema null issue, it causes an extra schema evolution issue. With the addition of tenants’ customizing columns, extended vertical part is forced to move to core horizontal part. The motivation of this paper is to solve schema null and evolution issues at the same time. That is the motivation of our paper.
Next, we evaluate the performance of our proposed multiple wide tables with vertical scalability in two ways. The first way is spatial intensity. Consider that integral intensity of single wide table is
6. Conclusions and Future Work
Motivated by sharing multitenant storage in sensor cloud system, this paper attempts to propose a better solution to store multitenant sensor data in the context of cloud computing. Compared with current multitenant data models, we propose multitenant multiple wide tables with vertical scalability of the sensor cloud system. This model consists of two parts: core horizontal part and extended vertical part. Core horizontal part is used to store customizing data, while extended vertical part is used to store personalized data. To address the schema evolution issue, we divide a wide table into multiple clusters that we called multiple wide tables. On one hand, this model mainly focuses on solving schema null and evolution issues with high scalability. On the other hand, our proposed model meets the demand on tenants’ personalization. Further, the partition of multiple wide tables with vertical scalability is discussed in detail. Besides, we illustrate the equivalence analysis of the multitenant multiple wide tables with vertical scalability and traditional relational table. A running example of the transformation is presented at the end. The experimental results show that our multiple wide tables with vertical scalability is superior to single wide table and single wide table with vertical scalability in the aspects of spatial intensity and read/write performance.
Multiple wide tables with vertical scalability that we have proposed formulate a kind of sharing multitenant sensor data storage model. We attempt to store tenants’ data together with the same schema. In this solution, the cloud sensor data are maintained for centralized management. Therefore, this method has some limitations in the distributed environment. Future work is targeted to explore some distributed techniques to optimize our method, such as data sharing, data partition, and read/write splitting.
