用于管理文档的数据库模型 [英] Database model to manage documents

查看:124
本文介绍了用于管理文档的数据库模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用sql server 2008建立与管理jpg,doc,msg,pdf等文档相关的表。

I need to build a tables related to manage documents such as jpg,doc,msg,pdf using a sql server 2008 .

我知道sql server支持。 jpg图片,所以我的问题是是否可以将其他类型的文件上传到数据库中。

As i know sql server support .jpg images, so my question is if it's possible to upload other kind of files into a db.

这是表格的一个示例(如果需要,可以重新定义)

This is an example of the table (could be redefined if it's needed).

Document : document_id int(10)
           name        varchar(10)
           type        image (doesnt know how it might works)

这些是表的初始值,但我不知道该怎么做

Those are the initial values for a table, but i dont know how to make it useful for any type.

pd:我需要分配一个目录将此文档保存到服务器吗?

pd: do i need to assign a directory to save this documents into the server?

推荐答案

几乎可以将任何文件类型存储在sql服务器表中...如果这样做,几乎可以肯定会后悔。

You can store almost any file type in an sql server table...if you do, you will almost certainly regret it.

将元数据/文件的指针存储在数据库中,然后将文件本身存储在磁盘目录中

Store a meta-data / a pointer to the file in your database instead, and store the files themselves on a disk directly where they belong.

您的数据库大小-以及运行该数据库所需的硬件-将会非常迅速地增长,因此您将承受不必要的大笔费用发生。

Your database size - and thus hardware required to run it - will grow very rapidly, so you will be incurring large costs that you do not need to incur.

这篇关于用于管理文档的数据库模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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