When should I use Sql Azure and when should I use table Storage?

前端 未结 5 1761
攒了一身酷
攒了一身酷 2020-12-07 11:24

When should i use Sql Azure and when should I use table Storage? I was thinking , use table storage for transaction processing scenarios e.g. debit credit accounts kind of

5条回答
  •  一个人的身影
    2020-12-07 11:49

    The real answer is, "Try really hard not to use Azure Table Storage". Whenever you move from a relational DB to a no-sql DB, you are of course going to have to change how you think about your storage architecture. But the problems with ATS go way, way beyond just needing to "think differently". As other folks have pointed out, it's not just a "No-SQL" data-store, it's a particularly stunted, handicapped, and very-low-featured instance of a No-SQL store. It's not a matter of needing to "think differently" about ATS; it's a matter of ATS not giving you the tools you need to do your job - tools that other no-sql data stores do give you.

    About the only thing good about ATS is that you can put lots and lots of data into it very quickly, and with minimal storage fees. However, you basically can't hope to get that data back out again unless you're lucky enough to have a use-case that magically matches its Partition-Key/Row-Key storage model. If you don't - and I suspect very few people do - you're going to be doing a lot of partition scans, and processing the data yourself.

    Beyond that, Azure Table Storage seems to be at a dead-end in terms of development. If you look at the "Support Secondary Indexes" request on the Azure feedback forums (http://feedback.windowsazure.com/forums/217298-storage/suggestions/396314-support-secondary-indexes), you can see that support for Secondary Indexes was promised as far back as 2011, but no progress has been made. Nor has any progress been made on any of the other top requests for Table Storage.

    Now, I know that Scott Guthrie is a quality guy, so my hope is that all this stagnation on the Table Storage front is a preface to Azure fixing it and coming up with something really cool. That's my hope (though I have zero evidence that's the case). But for right now, unless you don't have a choice, I'd strongly recommend against Azure Table Storage. Use Azure SQL; use your own instance of MongoDB or some other No-SQL DB; or use Amazon DynamoDB. But don't use Azure Table Storage.

提交回复
热议问题