Posted By : Murugan Andezuthu Dharmaratnam
Posted On : 22 January 2015
Keywords : Table Storage, Azure Table Storage, Microsoft Azure Table Storage, Microsoft Azure, Azure

Azure Table Storage


The Azure Table storage service stores large amounts of structured data.In other word we can say that it is also used to store non-relational structured data.


Common uses of the Table service include the following:


1.TBs of structured data capable of serving web scale applications.

2.Datasets in the table storage doesn't require complex joins, foreign keys, or stored procedures and it can be easily denormalized for fast access.

3.Clustered index data can be quickly queryed.

4.Data acess can be done using OData protocol and LINQ queries with WCF Data Service .NET Libraries.


Data in the azure table storage is stored as entities.Let us have a look on these codes.

Storing An Entity In An Azure Table


The stuff that is stored inside an Azure table is called Entities.This entity is analogous to a row in SQL Server table.Every entity that is stored inside Azure table has 3 main properties: ParitionKey, RowKey and Timestamp. The first 2 properties must be assigned values by the application code and form the primary key of the table.


The below code will give us an idea of how entities are stored to the table.



Retrieving An Entity From A Table



Let's now retrieve the entity that is just stored in the table. Add the following method after the main() method inside your program.cs file. Once it is added, then invoke the method from main() to see if the employee (here we are using the employee table) we added to the table can be retrieved or not. Now we can have a look on the code.





Azure Table Storage On Local Machine




The following steps introduces how to simulate azure table storage in the local machine.


We need to run a program called DSInit to setup SQL Server or LocalDB as the table storage.When we run the program, it creates a database in the specified SQL Server instance with quite a few tables.


To run the program, run Windows Azure command prompt from the Windows Azure start menu as an administrator.Type the following command.


DSInit /sqlInstance: (sql server instancename)


The next step is to start the storage emulator from the Start menu.Now we need to change the connection string to point to your local Azure table storage setup.Then we can use the azure table storage in our local machine.



Murugan Andezuthu Dharmaratnam

Murugan is a technology leader with 14 years of hands-on experience in full life cycle systems design, development, implementation, and management. In addition to systems design and development, his core competencies include cloud design and architecture, interactive web applications and websites development, mobile computing, and Healthcare Information Technology. His experience is very diverse with a broad range of technologies within multiple industry settings including private, public, and non-profit. Coupled with his technology expertise, Murugan is a well-organized, result-oriented, and a highly analytical leader with proven track record in developing and implementing very complex systems.