I come from a SQL RDBMS background and am trying to learn as much as I can about when to use Table Storage. For my site, I've started by creating my entire database using the Entity Framework 4.1, and plan to put this all in SQL Azure. However,
I'm now looking at the various tables and trying to decide which, if any, of this data can be moved to Table Storage.
For example, my users table has First/Last/Email/Password/Phone. Pretty simple. I expect a maximum of 10 million users. The "UserID" identity key is used in many other tables in my database. It seems easiest for me to just leave this
in SQL Azure, so I can contintue to use the entity framework, and so that lookups are easy. Can someone help explain why I should consider table storage instead, what I may lose or gain in functionality, etc?
Although Azure Table storage is cost-effective when compared with SQL Azure, SQL Azure seems be appropriate choice in your case as you seem to be enforcing referential constraints and lot of lookups using UserId.
Please mark it as answer by clicking on "Propose As Answer", if it helps. My Blog : http://dotnetizen.blogspot.com
Windows Azure Table Storage is ideal for working with non-relational data. To break that down even further, here are some characteristics of the candidates that make sense for using non-relational data stores like Windows Azure Table Storage.
Data that isn't referenced by other data in a foreign key relationships
Data that doesn't enfore referential integrity from the data storage layer
Not included in distributed transactions
Primarily indexed and searched by identity/primary key and not by other fields
Need to scale because of volume and/or performance/load needs
Some of the benefits of using non-relational data like Windows Azure Table Storage over relational data like SQL Azure:
Significantly less expensive
Scales easily and transparently for performance
Scales easily and transparently for volume of data
User and Profile data is usually a great candidate for Windows Azure Table Storage because it's typically non-relational. The relationships that do exist are commonly managed by your application and not the data store, especially if you are using the ASP.NET
Membership Provider. It is also typical that you query the User and Profile data by the identity fields. By using Table Storage, you also get the added benefit of transparent scale. However, if only your user data is designed to scale, it probably isn't all
that helpful in the grand scheme of things as it relates to your application.
In summary, User and Profile data are typically great candidates for storing in Windows Azure Table Storage because of economics and scale.
Eric D. Boyd - Director, Chicago + Cloud at Centare Blog |