Tuesday, February 19, 2013

Azure Table Storage - Dynamic Columns

The Windows Azure Table storage service stores large amounts of structured data in the form of entities ( An entity contains a set of properties).
It's a NoSQL kind of datastore and are ideal for storing structured, non-relational data.

Each entity can hold up to 255 properties (including 3 required properties) and the combined size cannot exceed 1 MB.

The three required properties are

So, effectively that leaves us with 252 properties to work with.
Entities map to C# Objects. So, programmatically you would declare a class that inherits from "TableEntity".

public class CustomerEntity : TableEntity
    public CustomerEntity(string lastName, string firstName)
        this.PartitionKey = lastName;
        this.RowKey = firstName;

    public CustomerEntity() { }

    public string Address { get; set; }
    public string Email { get; set; }

If you would like to keep your schema design dynamic as azure table storage supports, there are couple of ways you could do to achieve that.

Here are some links that help you solve it:





No comments:

Post a Comment