MSDN Azure Documentation

Azure Storage Table API

Welcome to the comprehensive documentation for the Azure Storage Table API. This API allows you to store and query large amounts of structured, non-relational data.

Overview

Azure Table storage is a NoSQL key-attribute store that allows you to store large amounts of structured data. The Table service is ideal for applications that need a flexible schema and can scale massively. Data in Table storage is stored as collections of entities, where each entity is a set of properties. An entity is like a row, and a property is like a column.

Key Concepts

Core Operations

The Azure Storage Table API provides a rich set of operations for managing your table data:

Table Operations

Operation Description HTTP Method Endpoint
Create Table Creates a new table in the storage account. PUT /tables
Query Tables Queries for tables within the storage account. GET /tables
Delete Table Deletes a specified table. DELETE /tables('{table_name}')

Entity Operations

Operation Description HTTP Method Endpoint
Insert Entity Inserts a new entity into a table. POST /{table_name}
Query Entities Queries for entities within a table. Supports filtering and projection. GET /{table_name}
Update Entity Updates an existing entity. PUT /{table_name}(PartitionKey='{pk}',RowKey='{rk}')
Merge Entity Updates an existing entity by merging properties. MERGE /{table_name}(PartitionKey='{pk}',RowKey='{rk}')
Delete Entity Deletes a specified entity. DELETE /{table_name}(PartitionKey='{pk}',RowKey='{rk}')
Insert or Replace Entity Inserts an entity if it doesn't exist, otherwise replaces it. PUT with Prefer: return-content-no-entity /{table_name}(PartitionKey='{pk}',RowKey='{rk}')
Insert or Merge Entity Inserts an entity if it doesn't exist, otherwise merges properties. MERGE with Prefer: return-content-no-entity /{table_name}(PartitionKey='{pk}',RowKey='{rk}')

Querying Entities

Querying entities is a fundamental part of using Table storage. You can specify filter expressions to retrieve specific entities. The query syntax is OData-like.

Filter Syntax Example:

PartitionKey eq 'Tasks' and Status eq 'Open' and Priority ge 5

Common Query Parameters:

Important: For optimal performance and scalability, design your PartitionKeys strategically. Queries that filter on PartitionKey are highly efficient.

Data Types

Azure Table storage supports a variety of data types for properties, including:

Authentication and Authorization

Access to Azure Table storage is secured via Shared Key authentication or Azure Active Directory (Azure AD) integration. Ensure you follow best practices for managing access keys and permissions.

Further Reading