All Products
Search
Document Center

Tablestore:Overview

Last Updated:Jan 04, 2024

Tablestore is a table-based, low-cost serverless storage service that can be used to store large amounts of structured data in scenarios such as billing, instant messaging (IM), Internet of Things (IoT), Internet of Vehicles (IoV), risk control, and intelligent recommendation. You can use Tablestore to query and retrieve online data within milliseconds and analyze data from multiple dimensions.

Terms

The following table introduces the terms that are frequently used in Tablestore.

Term

Description

region

Regions are physical data centers distributed around the world. Tablestore is deployed across multiple Alibaba Cloud regions. You can select a region based on your business requirements. For more information, see Region.

read or write throughput

The read or write throughput is measured by read or write capacity units (CUs). A CU is the smallest billing unit for read or write operations. For more information, see Read and write throughput.

instance

An instance is a logical entity used in Tablestore to manage tables. Each instance is equivalent to a database. Tablestore implements application access control and resource measurement at the instance level. For more information, see Instance.

endpoint

An endpoint is the connection URL used to access a Tablestore instance. To perform operations on the tables and data in a Tablestore instance, you must specify the endpoint of the instance. For more information, see Endpoints.

time to live (TTL)

TTL is used to manage the lifecycle of data stored in Tablestore. Tablestore automatically clears data when the TTL of data expires. This helps you manage storage space and save storage costs. The TTL of data is specified in seconds. For more information, see Data versions and TTL.

Data storage models

Tablestore provides a variety of data storage models. You can choose a data storage model based on your business requirements. The following table describes the data storage models that are provided by Tablestore.

Model

Description

Wide Column

This model is similar to the Google Cloud Bigtable and HBase models, and can be used in multiple scenarios such as metadata and big data storage. The Wide Column model supports features such as max versions, Time to Live (TTL), auto-increment primary key column, conditional update, local transaction, atomic counter, and filter. For more information, see Overview.

TimeSeries

This model is designed to store time series data generated from multiple scenarios such as IoT device monitoring, device data collection, and machine monitoring. The TimeSeries model supports automatic indexing of time series metadata and time series query by various composite conditions. For more information, see Overview.

Timeline

This model is designed to store message data and is suitable for storing message data generated from IM applications and Feed streams. The Timeline model can meet the specific requirements of messaging processes, such as message order preservation, storage of large numbers of messages, and real-time data synchronization. This model also supports tokenization and BoolQuery. For more information, see Overview.

Features

This section describes the features provided by each data storage model.Tablestore

Wide Column model

Feature

Description

References

Table operations

You can list all tables in an instance, create a table, query and update the configurations of a table, and delete a table.

Operations on tables

Basic data operations

You can call the PutRow, GetRow, UpdateRow, and DeleteRow operations to perform operations on a single row or call the BatchWriteRow, BatchGetRow, and GetRange operations to perform operations on multiple rows. You can read and write data in a table by calling an operation to perform operations on a single row or multiple rows in the table.

Max versions and TTL

You can use the max versions and Time To Live (TTL) features to manage the lifecycle of your data to optimize storage efficiency and reduce costs.

Data versions and TTL

Auto-increment primary key column

You can specify a primary key column that is not the partition key as the auto-increment primary key column. If you write data to a table that contains an auto-increment primary key column, you do not need to specify values for the auto-increment primary key column. Tablestore automatically generates values for the auto-increment primary key column. The values in the auto-increment primary key column are unique and increase monotonically within a partition that shares the same partition key value.

Configure an auto-increment primary key column

Conditional update

If you use conditional update, data in the table can be updated only when the conditions are met. If the conditions are not met, the update fails.

Conditional updates

Local transaction

You can create a local transaction for data that shares the same partition key value. After you read or write data within a local transaction, you can commit or abort the local transaction.

Local transactions

Atomic counter

Atomic counters allow you to implement an atomic counter on a column. This feature provides statistic data for online applications such as the number of page views on various topics.

Atomic counters

Filter

Filters sort results on the server side. Only results that meet the filter conditions are returned. This feature effectively reduces the volume of transferred data and shortens the response time.

Configure a filter

Secondary index

You can create one or more index tables and perform queries by using the primary key columns of the index tables. Secondary indexes include global secondary indexes and local secondary indexes.

  • When you use a global secondary index, Tablestore automatically synchronizes data from the indexed columns and primary key columns of a data table to the columns of an index table in asynchronous mode. The synchronization latency can be measured in milliseconds.

  • When you use a local secondary index, Tablestore automatically synchronizes data from the indexed columns and primary key columns of a data table to the columns of an index table in synchronous mode. You can immediately query the data from the index table after the data is synchronized.

Search index

The search index feature is implemented by using inverted indexes and column stores. This feature provides query methods to solve problems in complex big data scenarios. The query methods include queries based on non-primary key columns, full-text search, prefix query, fuzzy query, Boolean query, nested query, and geo query. For the Wide Column model, the feature also supports aggregate operations such as max, min, count, sum, avg, distinct_count, and group_by, and the parallel scan operation.

SQL query

The SQL query feature provides a unified access interface for multiple data engines. You can use the SQL query feature to perform complex queries and analytics on data in Tablestore in an efficient manner. You can also use indexes in combination with the SQL query feature to optimize queries.

Tunnel Service

Tunnel Service provides tunnels that are used to export and consume data in full, incremental, and differential modes. After you create a tunnel, you can use it to consume historical and incremental data of a table.

Data security

By default, Tablestore allows unrestricted access over all networks. For security reasons, we recommend that you bind a virtual private cloud (VPC) to your Tablestore instance and change the network type of the instance to allow access only over the VPC.

To ensure the security of table data, Tablestore provides the data encryption feature. When you create a data table, you can configure table encryption.

Data delivery

Tablestore uses data delivery to deliver full or incremental data to Object Storage Service (OSS) in real time. This feature is ideal for building data lakes as it enables Tablestore to store historical data in OSS at lower costs while Tablestore implements offline or quasi-real-time analysis of larger amounts of data.

Data visualization

Tablestore supports two data visualization tools: DataV and Grafana. These tools can be used to visualize data and make data easier to consume.

Monitoring and alerting

You can view monitoring information about Tablestore resources to monitor resource usage. You can also configure alert rules for important metrics of the resources. This way, you can receive notifications of metric anomalies and troubleshoot the errors at the earliest opportunity.

Backup and restoration

Hybrid Backup Recovery (HBR) can be used to regularly back up data in Tablestore instances and restore lost or damaged data. HBR supports the backup of full data and incremental data and data redundancy. This improves the reliability of data in backup vaults.

HBase support

Tablestore HBase Client can be used to access Tablestore by using Java applications built on open source HBase APIs.

TimeSeries model

Feature

Description

References

Table operations

You can list all time series tables in an instance, create a time series table, query and update the configurations of a time series table, and delete a time series table.

Read and write operations on time series data

You can write time series data into a time series table in batches. After data is written to the time series table, you can specify a time series identifier to query the data in the time series within the specified time range.

Time series retrieval

You can retrieve a time series in a time series table by using composite conditions. After the time series is retrieved, you can call Tablestore API operations to further query data in the time series.

SQL query and analysis

You can use SQL statements to query time series data. In an SQL statement, you can filter time series by specifying metadata conditions and aggregate data based on different dimensions.

In addition, you can query only the metadata of time series in SQL. This way, you can manage the metadata of time series by using SQL.

Use SQL to query time series data

Connection with Grafana

After you add a Tablestore data source to Grafana, Grafana displays real-time data on a dashboard.

Connect Tablestore to Grafana

Timeline model

Feature

Description

References

Table operations

  • You create or delete a Meta table and its indexes.

  • You can create or delete a Timeline table and its indexes.

Initialization

Meta management

You can call operations such as Insert, Delete, Update, Read, and Search to manage Meta data.

Meta management

Timeline management

You can call the operations for fuzzy query and Boolean query to manage Timeline data.

Timeline management

Queue management

The Queue instance manages a message queue that corresponds to an identifier of a TimelineStore. This instance provides operations such as Store, StoreAsync, BatchStore, Delete, Update, UpdateAsync, Get, and Scan.

Queue management