Azure存储入门:Blob,表,SQL Azure [英] Getting started with Azure storage: Blobs vs Tables vs SQL Azure

查看:76
本文介绍了Azure存储入门:Blob,表,SQL Azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个相当大的话题, blob vs表vs SQL ,尽管到目前为止我已经读了很多,但是我仍然找不到关于何时使用什么的正确理由.

It's quite a topic, blobs vs tables vs SQL, and despite all I read so far I still can't find some proper reasoning on what to use when.

我们有一个多租户SaaS Web应用程序,我们即将移至Azure.我们使用SQL Server 2008数据库.我们存储文档和属于文档的日志信息.有点像保管箱一样.

We have a multi-tenant SaaS web-application which we are about to move to Azure. We use an SQL Server 2008 database. We store documents and log information that belongs to the documents. Kinda like dropbox does.

论坛指出,在考虑大"对象时,最好使用Azure表.我们通常为每个用户存储数百个文档,而文档的大小从5kb到30mb不等,而绝大多数文件大小约为1MB?

The forums state that you better use Azure Tables when you are considering "large" objects. We typically store hundreds of documents per user where the size of the documents vary from 5kb to 30mb where the vast majority will be around 1MB?

是否有一些适用于Blob,Tables和Sql的基本规则?我已经知道我不应该将文档存储在SQL中,因为它太昂贵了.但是什么时候将文档存储在Blob中变得有益",何时使用表会更好呢?是否有某种公式:

Are there some ground rules when to go for Blobs, Tables, Sql? I already learned that I shouldn't store my documents in SQL since it is too expensive. But when does it get "beneficial" to store the documents in Blobs and when would I be better of with tables? Is there some kind of formula like :

if (objects * MB/object * objectrequested > y) then blobs, else tables

推荐答案

我认为Igorek已解决您的SQL Azure问题.不过,您似乎仍然对Tables vs Blobs有疑问.

I think Igorek has addressed your SQL Azure concerns. You seem to still have questions about Tables vs Blobs, though.

在您的情况下,使用表存储会很烦人. ATS中的每个属性/列最多不能超过64KB,因此您必须将文档拆分为多个属性,然后重新组合它们.每个实体还有4MB的限制,这将是一个问题. Blob存储没有这些限制.

In your case using Table storage would be annoying. Each property/column in ATS can be at most 64KB, so you would have to split the documents across multiple properties and then reassemble them. There is also a limit of 4MB per entity, which would be a problem. Blob storage has neither of these limitations.

当您的小型实体具有许多需要分别存储和查询的属性时,我倾向于使用Azure表存储.因此,它适用于存储的对象或具有大量元数据的小型文档.

I would tend to use Azure Table Storage when you have smallish entities with many properties that need to be stored and queried separately. So it works wells for stored objects, or small documents with lots of metadata.

Blob存储在没有大量元数据的情况下效果更好.对于可能在文件系统上的文件正常工作的事物来说,这是一件好事.

Blob storage works better for things without a ton of metadata. It's good for things that might work well as files on a filesystem.

这篇关于Azure存储入门:Blob,表,SQL Azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆