Q47. What is Azure Table Storage?
As always you need to have a storage account to use a Table service.
There are two standout features of Azure Table storage. One is data is scalable and it is NoSQL data.
We have discussed in an earlier question, what is scalable data and why it is important for cloud applications.
NoSQL data store stores non relational data. Relational databases such as SQL server allow you to design the table using primary key and foreign keys. You can also run stored procedures on the data. NoSQL data store is designed to hold large amounts of associated data and has no need for the features provided by relational databases such as SQL server.
Table storage service allows querying its data by LINQ or OData protocol.
Now let us discuss how the table storage stores data. The table storage stores data as entities, similar to a row in a relational table. Each entity has a three fixed properties. The three properties are a partition key, a row key, and a timestamp.
A developer has to ensure that the partition key and row key combination must be unique which makes up the primary key of the table.
The PartitionKey property is used to partition the entities in a table. However, all entities with the same PartitionKey are stored on the same storage node.
While retrieving data, developer supplies the partition key and the row key in a query. Azure looks for the data in a storage node based on the partition key, and looks for the matching entities based on the row key. This is how table storage gives best performance even though it contains terabytes of data.
Remember, if there is no partition key in the query, Azure scans the entire table which results in degradation of the application performance. It is the programmer’s responsibility to ensure that the partition key and row key is provided in the query.
The Timestamp property of the table represents the date and time the entity was created or modified.
In addition to the three system properties of the table, each entity has a collection of properties which depends on the data we store in the table.
Azure Table will not insist any fixed schema, so we can store entities with varied number of properties.
The number of tables is limited to the size of a storage account that 500 TB as of now.
There are two standout features of Azure Table storage. One is data is scalable and it is NoSQL data.
We have discussed in an earlier question, what is scalable data and why it is important for cloud applications.
NoSQL data store stores non relational data. Relational databases such as SQL server allow you to design the table using primary key and foreign keys. You can also run stored procedures on the data. NoSQL data store is designed to hold large amounts of associated data and has no need for the features provided by relational databases such as SQL server.
Table storage service allows querying its data by LINQ or OData protocol.
Now let us discuss how the table storage stores data. The table storage stores data as entities, similar to a row in a relational table. Each entity has a three fixed properties. The three properties are a partition key, a row key, and a timestamp.
A developer has to ensure that the partition key and row key combination must be unique which makes up the primary key of the table.
The PartitionKey property is used to partition the entities in a table. However, all entities with the same PartitionKey are stored on the same storage node.
While retrieving data, developer supplies the partition key and the row key in a query. Azure looks for the data in a storage node based on the partition key, and looks for the matching entities based on the row key. This is how table storage gives best performance even though it contains terabytes of data.
Remember, if there is no partition key in the query, Azure scans the entire table which results in degradation of the application performance. It is the programmer’s responsibility to ensure that the partition key and row key is provided in the query.
The Timestamp property of the table represents the date and time the entity was created or modified.
In addition to the three system properties of the table, each entity has a collection of properties which depends on the data we store in the table.
Azure Table will not insist any fixed schema, so we can store entities with varied number of properties.
The number of tables is limited to the size of a storage account that 500 TB as of now.
See More Questions and Answers on - Azure Storage
- What is storage account?
- Why Azure storage?
- How many types of services does Azure storage service provide?
- What is blob storage?
- What is Azure queue service?
- Where does my storage account reside and how to choose its geographic location?
- Give an overview of the Azure standard storage account?
- Compare storage options in Azure storage services and amazon web services?
- On what factors does Azure storage billing depend?