Azure 資料表儲存體概觀Azure Table storage overview


本文中的內容適用於原始的 Azure 資料表儲存體。The content in this article applies to the original Azure Table storage. 不過,現在有一個適用於資料表儲存體的進階供應項目:Azure Cosmos DB 資料表 API。However, there is now a premium offering for table storage: the Azure Cosmos DB Table API. 此 API 會提供輸送量最佳化的資料表、全域散發,以及自動次要索引。This API offers throughput-optimized tables, global distribution, and automatic secondary indexes. Azure Cosmos DB 和 Azure 資料表儲存體中資料表 API 之間的功能有一些差異There are some feature differences between Table API in Azure Cosmos DB and Azure table storage. 若要深入了解並試用進階體驗,請參閱 Azure Cosmos DB 資料表 APIFor more information, and to try out the premium experience, see Azure Cosmos DB Table API.

Azure 表格儲存體是可將結構化的 NoSQL 資料儲存在雲端中的服務,並提供具有無結構描述設計的索引鍵/屬性存放區。Azure Table storage is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schemaless design. 由於表格儲存體並無結構描述,因此可輕易隨著應用程式發展需求改寫資料。Because Table storage is schemaless, it's easy to adapt your data as the needs of your application evolve. 相較於類似資料量的傳統 SQL,對許多類型的應用程式而言,表格儲存體資料可快速存取且符合成本效益,通常可降低成本。Access to Table storage data is fast and cost-effective for many types of applications, and is typically lower in cost than traditional SQL for similar volumes of data.

您可以使用表格儲存體來儲存具彈性的資料集,例如 Web 應用程式的使用者資料、通訊錄、裝置資訊,以及服務所需的其他中繼資料類型。You can use Table storage to store flexible datasets like user data for web applications, address books, device information, or other types of metadata your service requires. 您可以在資料表中儲存任意數目的實體,且儲存體帳戶可包含任意數目的資料表,最高可達儲存體帳戶的容量限制。You can store any number of entities in a table, and a storage account may contain any number of tables, up to the capacity limit of the storage account.

什麼是資料表儲存體What is Table storage

Azure 資料表儲存體可儲存大量的結構化資料。Azure Table storage stores large amounts of structured data. 此服務是一個 NoSQL 資料存放區,接受來自 Azure 雲端內外經過驗證的呼叫。The service is a NoSQL datastore which accepts authenticated calls from inside and outside the Azure cloud. Azure 資料表很適合儲存結構化、非關聯式資料。Azure tables are ideal for storing structured, non-relational data. 資料表儲存體的一般用途包括:Common uses of Table storage include:

  • 儲存好幾 TB 的結構化資料,足以供應 Web 規模的應用程式所需Storing TBs of structured data capable of serving web scale applications
  • 儲存資料集,不需要複雜的聯結、外部索引鍵或預存程序,還可以反正規化以加速存取Storing datasets that don't require complex joins, foreign keys, or stored procedures and can be denormalized for fast access
  • 使用叢集索引來快速查詢資料Quickly querying data using a clustered index
  • 使用 OData 通訊協定和 LINQ 查詢,搭配 WCF Data Service .NET Libraries 來存取資料Accessing data using the OData protocol and LINQ queries with WCF Data Service .NET Libraries

您可以使用資料表儲存體來儲存和查詢龐大的結構化、非關聯式資料集,且資料表會隨著需求增加而調整。You can use Table storage to store and query huge sets of structured, non-relational data, and your tables will scale as demand increases.

資料表儲存體概念Table storage concepts

資料表儲存體包含下列元件:Table storage contains the following components:


  • URL 格式: Azure 資料表儲存體帳戶會使用下列格式:http://<storage account><table>URL format: Azure Table Storage accounts use this format: http://<storage account><table>

    Azure Cosmos DB 資料表 API 帳戶會使用下列格式:http://<storage account><table>Azure Cosmos DB Table API accounts use this format: http://<storage account><table>

    您可以使用此位址搭配 OData 通訊協定來直接定址 Azure 資料表。You can address Azure tables directly using this address with the OData protocol. 如需詳細資訊,請參閱 OData.orgFor more information, see

  • 帳戶: 所有對 Azure 儲存體的存取都會透過儲存體帳戶執行。Accounts: All access to Azure Storage is done through a storage account. 如需儲存體帳戶的詳細資訊,請參閱儲存體帳戶概觀For more information about storage accounts, see Storage account overview.

    所有對 Azure Cosmos DB 的存取都會透過資料表 API 帳戶執行。All access to Azure Cosmos DB is done through a Table API account. 如需建立資料表 API 帳戶的詳細資訊,請參閱建立資料表 API 帳戶See Create a Table API account for details creating a Table API account.

  • 資料表:資料表是一組實體。Table: A table is a collection of entities. 資料表不強制規定實體的結構描述,這表示單一資料表包含的實體可以有幾組不同的屬性。Tables don't enforce a schema on entities, which means a single table can contain entities that have different sets of properties.

  • 實體:實體是一組屬性,類似於資料庫的資料列。Entity: An entity is a set of properties, similar to a database row. Azure 儲存體中的實體大小上限為 1MB。An entity in Azure Storage can be up to 1MB in size. Azure Cosmos DB 儲存體中的實體大小上限為 2MB。An entity in Azure Cosmos DB can be up to 2MB in size.

  • 屬性:屬性是名稱/值組。Properties: A property is a name-value pair. 每個實體最多可包含 252 個屬性來儲存資料。Each entity can include up to 252 properties to store data. 每個實體也有 3 個系統屬性,可指定資料分割索引鍵、資料列索引鍵和時間戳記。Each entity also has three system properties that specify a partition key, a row key, and a timestamp. 具有相同資料分割索引鍵的實體,查詢起來更快,還能在不可部分完成的作業中插入/更新。Entities with the same partition key can be queried more quickly, and inserted/updated in atomic operations. 實體的資料列索引鍵是資料分割內的唯一識別碼。An entity's row key is its unique identifier within a partition.

如需有關命名資料表和屬性的詳細資訊,請參閱 了解表格服務資料模型For details about naming tables and properties, see Understanding the Table Service Data Model.

後續步驟Next steps