English 中文(简体)
库存档案输入亚洲开发银行(新贝伊)
原标题:Store files into DB (Newbie)

I start to develop a web app (asp.net) that will store every kind of document in a DB. It s a SQL 2008 DB, and I m analizing what is the best way to store "metadata" in a DB solution? A few type: - file system pointer in protected folder, for me is too complex and insicure - filestream - varbinary(max) column - others? any suggestion? Someone with a similar dilemma?

感谢大家。

最佳回答
问题回答

为什么它过于复杂或不安全? 最好在数据库中储存一个档案名称,并从档案系统查阅档案。 你可以利用国家食品安全局的许可,确保档案存放地点的安全,从而只能把你所属的地产安全局的账户放在一起。 该网络的应用(集合)可以向它们提供。 大型档案尤其如此。

I tend to stay away from keeping the files in the file system and only storing the metadata in the database. I prefer to keep the files in the database as it greatly simplifies any backup/recovery strategy. The only exception I have to this is if you know you re going to be storing files across multiple devices, which tends to happen if you know you are going to have more images than you can reasonably store on a single logical drive.

另一项建议 如果你将档案储存在数据库中,我将把档案内容储存在自己的桌上(即只拥有内容和PK)。 如果您在表格中向该实体存档(例如用户表格中的ava图),那么如果有人在用户表格上操作slect*,那么这些档案也会归还,如果你返回大量用户,这些档案也会非常昂贵。

在服务器中,我没有多少个人在<密码>上的经验,因此,我可以很好地发言,但我认为,或<代码>varbianary(max)或许是好的选择。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签