Design Windows Azure Application with Azure Table partitioning approach

SharePoint deveopment training course

Azure table is a No-SQL database. It’s cheap, perform well and easy integration if you are looking store large amount of structured data.

For one of the requirement, we were using Azure Table for an Azure application.

The application had many departments and each department will have a different data structure.

At a time user will be part of only one department he belongs to. So we implemented Azure Table partitioned by the department.

This will ensure the user can efficiently query records related to their department.

Also read: Copy blobs from one storage container to another storage Container in Microsoft Azure

Facts of Azure Table Storage as it doesn’t support count, order by, sum, group by, max, min, foreign keys etc. So understand your requirement before using Azure Table.

PartitionKey and RowKey uniquely identify every entity within a table.

We can make the things done in C# or PowerShell script.

I will be providing PowerShell script to achieve the same. You can create CSV file and maintain the input data to loop and enter the data to Azure Table.

function Add-Entity() {










$entity = New-Object -TypeName Microsoft.WindowsAzure.Storage.Table.DynamicTableEntity -ArgumentList $partitionKey, $rowKey

$entity.Properties.Add(“Name”, $name)

$entity.Properties.Add(“Name”, $departmentname)

$entity.Properties.Add(“ID”, $id)

$result = $table.CloudTable.Execute([Microsoft.WindowsAzure.Storage.Table.TableOperation]::Insert($entity))


$StorageAccountName = “samstorage”

$StorageAccountKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName

$Ctx = New-AzureStorageContext $StorageAccountName -StorageAccountKey $StorageAccountKey.Primary

$TableName = “DepartmentData”

$table = Get-AzureStorageTable –Name $TableName -Context $Ctx -ErrorAction Ignore

if ($table -eq $null)


$table = New-AzureStorageTable –Name $TableName -Context $Ctx


#Add multiple entities to a table.You can also loop it provided by input CSV

Add-Entity -Table $table -PartitionKey PartitionHR -RowKey Row1 -Name Sam -Id 1

Add-Entity -Table $table -PartitionKey PartitionHR -RowKey Row2 -Name Ram -Id 2

Add-Entity -Table $table -PartitionKey PartitionFinance -RowKey Row1 -Name Kaka -Id 3

Add-Entity -Table $table -PartitionKey Partition2 -RowKey Row2 -Name Nana -Id 4

Read some SharePoint tutorials:

Hope this will be helpful.

Check out Best Alternative to InfoPath -> Try Now

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)


About Sambita Rath

I have 9 years of exprience into SharePoint implementation, architecture, Administrator, development and Training.Designing Information Architecture in SharePoint 2007, 2010,2013 and Office 365.

View all posts by Sambita Rath →