如何保存如PDF,DOCX,XLS在SQL Server 2008中的文件 [英] How to save documents like PDF,Docx,xls in sql server 2008

查看:256
本文介绍了如何保存如PDF,DOCX,XLS在SQL Server 2008中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个Web应用程序,让用户上传文件,如图像和文件。此文件分为两部分:

I develop a web application that let users to upload files like images and documents. this file divided into two parts :


  1. 二进制文件

  2. 文件夹

我想允许用户搜索该载的文档。 specialy使用全文搜索。我应该为这两个文件类型使用什么数据类型?

I want to allow users to search documents that uploaded. specialy using full text search. What data types I should use for these two file types?

推荐答案

您可以将数据存储在二进制和使用全文搜索国米preT二进制数据并提取文本信息:.DOC,.TXT, .xls的,.PPT,热媒。所提取的文本索引是和查询(请确保您使用CONTAINS关键字)变为可用。不用说,全文搜索已成为enabled.Not知道如何增加全文索引会影响您的系统 - 即,它的大小。您还需要看看执行计划,以保证指数在查询时被使用。

You can store the data in binary and use full text search to interpret the binary data and extract the textual information: .doc, .txt, .xls, .ppt, .htm. The extracted text is indexed and becomes available for querying (make sure you use the CONTAINS keyword). Needless to say, full text search has to be enabled.Not sure how adding a full text index will affect your system - i.e., its size. You'll also need to look at the execution plan to ensure the index gets used at query time.

有关详细信息,看看这个:

For more information look at this:

http://technet.microsoft.com/en -us /库/ ms142499(SQL.90)的.aspx

优点:
在数据库中存储的数据的主要优点是,它使数据自足。由于所有的数据被包含在数据库中,备份数据,从一个数据库服务器移动数据到另一个,复制数据库,等等,是非常容易。

Pros: The main advantage of storing data in the database is that it makes the data "self-contained". Since all of the data is contained within the database, backing up the data, moving the data from one database server to another, replicating the database, and so on, is much easier.

也可以启用文件的版本控制,也更容易为负载均衡的网络农场。

also you can enable versioning of files and also make it easier for load balanced web farms.

缺点:
你可以在这里阅读:<一href=\"http://dba.stackexchange.com/questions/3924/sql-server-2005-large-binary-storage\">http://dba.stackexchange.com/questions/3924/sql-server-2005-large-binary-storage.但是,这是你必须要想通过有效的文件搜索要做的事情。

Cons: you can read it here: http://dba.stackexchange.com/questions/3924/sql-server-2005-large-binary-storage. But this is something that you have to do in order to search through the files efficiently.

或者说,我可以建议其他的事情可能是在数据库中存储的关键字,然后连接相同的文件共享到文件。

Or the other thing that I could suggest is probably storing keywords in the database and then linking the same to file in the fileshare.

下面是一篇文章讨论ABT使用FileStream和数据库:<一href=\"http://blogs.msdn.com/b/manisblog/archive/2007/10/21/filestream-data-type-sql-server-2008.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/manisblog/archive/2007/10/21/filestream-data-type-sql-server-2008.aspx

Here is an article discussing abt using a FileStream and a database: http://blogs.msdn.com/b/manisblog/archive/2007/10/21/filestream-data-type-sql-server-2008.aspx

这篇关于如何保存如PDF,DOCX,XLS在SQL Server 2008中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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