Windows Azure Table Storage - Getting Started - Part 1
Tips and tricks, posted: 3-Mar-2009 09:00
Windows Azure provides simple data storage services like blobs, tables and queues to store your data in the cloud. These can be accessed using a Windows Azure Storage Account.

In this Part 1, we are going to look into the Windows Azure Table Storage which provides a structured storage in the cloud.
Pre-requisites
1) To get started with Windows Azure programming, you can have a read at my previous blog post
2) You need to have a Windows Azure Storage Account to program Windows Azure Storage. You can apply for one here
Check your Table Service in the Development Storage
Using the Development Storage tool, Azure SDK simulates the Azure Tables in your local machine than in the cloud. The Table Service may fail to start and you won't be able to choose a proper Table Service Database. None of the SDK samples which uses the local Table Service would also not work.
The problem is that running the Development Storage tool initially created the Database (DevelopmentStorageDB) (Azure SDK searches for a .\SQLEXPRESS instance by default) , but not the required Schemas. To install the required schemas, Traverse to where you had extracted the SDK Samples and execute the rundevstore.cmd script

Running the above script will create the necessary schemas for the SDK samaples and also will start the Table Service in your Development Storage

Windows Azure Table Storage

• Each account has a Table
• The Table has an Entity
• An Entity contains Columns
• Entity can be considered to be the row and Columns as values
• An Entity always contains these properties:
o Partition Key
o Row Key
o Timestamp
• The Partition Key and Row Key identify a row or an Entity
As you may have guessed it already, partition key and row key is the first column of your table. All entities in a table with the same partition key value live in the same partition.
However, you can use either partition key or row key or both or do not use both.
Here is a simple guide on how to use partition key and row key
PK=empty, RK=empty - One partition, One row
PK=data, RK=empty - Multiple partitions, One row per partition
PK=empty, RK=data - One partition, Multiple rows for the one partition
PK=data, RK=data - Multiple partitions, Multiple rows for each partition
In our next blog post, we shall get into developing the sample guestbook application.
Visual Studio 2008 simplifies building Windows Azure applications using the Windows Azure tools for Visual Studio. It also allows us to debug Windows Azure applications.
Download Visual Studio 2008 90 day trial
For detailed information and to request a free 90-day trial DVD of Visual Studio 2008 Team Suite to be sent out to you, go to the Microsoft Visual Studio webpage.
About the Author
Chaks is currently working for Intergen as a Software Developer. Chaks works extensively in Microsoft Platform. His knowledge covers various Microsoft Technologies like WCF, SharePoint, Windows Azure, ASP.NET. Chaks also writes for Neowin, one of the Microsoft featured communities. You can contact Chaks via his blog - Chaks' Corner.
Other related posts:
The New Zealand ALM Conference 2011 (Application Life Cycle Management)
Writing your own Html Helpers for the ASP.NET MVC Framework
Automating Visual Studio 2008

In this Part 1, we are going to look into the Windows Azure Table Storage which provides a structured storage in the cloud.
Pre-requisites
1) To get started with Windows Azure programming, you can have a read at my previous blog post
2) You need to have a Windows Azure Storage Account to program Windows Azure Storage. You can apply for one here
Check your Table Service in the Development Storage
Using the Development Storage tool, Azure SDK simulates the Azure Tables in your local machine than in the cloud. The Table Service may fail to start and you won't be able to choose a proper Table Service Database. None of the SDK samples which uses the local Table Service would also not work.
The problem is that running the Development Storage tool initially created the Database (DevelopmentStorageDB) (Azure SDK searches for a .\SQLEXPRESS instance by default) , but not the required Schemas. To install the required schemas, Traverse to where you had extracted the SDK Samples and execute the rundevstore.cmd script

Running the above script will create the necessary schemas for the SDK samaples and also will start the Table Service in your Development Storage

Windows Azure Table Storage

• Each account has a Table
• The Table has an Entity
• An Entity contains Columns
• Entity can be considered to be the row and Columns as values
• An Entity always contains these properties:
o Partition Key
o Row Key
o Timestamp
• The Partition Key and Row Key identify a row or an Entity
As you may have guessed it already, partition key and row key is the first column of your table. All entities in a table with the same partition key value live in the same partition.
However, you can use either partition key or row key or both or do not use both.
Here is a simple guide on how to use partition key and row key
PK=empty, RK=empty - One partition, One row
PK=data, RK=empty - Multiple partitions, One row per partition
PK=empty, RK=data - One partition, Multiple rows for the one partition
PK=data, RK=data - Multiple partitions, Multiple rows for each partition
In our next blog post, we shall get into developing the sample guestbook application.
Visual Studio 2008 simplifies building Windows Azure applications using the Windows Azure tools for Visual Studio. It also allows us to debug Windows Azure applications.
Download Visual Studio 2008 90 day trial
For detailed information and to request a free 90-day trial DVD of Visual Studio 2008 Team Suite to be sent out to you, go to the Microsoft Visual Studio webpage.
About the Author
Chaks is currently working for Intergen as a Software Developer. Chaks works extensively in Microsoft Platform. His knowledge covers various Microsoft Technologies like WCF, SharePoint, Windows Azure, ASP.NET. Chaks also writes for Neowin, one of the Microsoft featured communities. You can contact Chaks via his blog - Chaks' Corner.
Other related posts:
The New Zealand ALM Conference 2011 (Application Life Cycle Management)
Writing your own Html Helpers for the ASP.NET MVC Framework
Automating Visual Studio 2008
Permalink to Windows Azure Table Storage - Getting Started - Part 1
| Main Index