哪个更好的方法存储图像 - 文件夹或SQL Server作为二进制? [英] Which is a better method for storing images - folder or SQL Server as binary?
问题描述
任何建议将不胜感激!
谢谢,
Tristan
存储为二进制是您将数据库大小打到不可思议的大小。如果要使用SQL Server的快速版本,每个数据库限制为4GB,您的照片库将很快完成。
优点是您可以轻松地操纵每个文件和每个用户的访问限制。您只需查看用户权限,并决定是否退回映像。
I am planning the development of a photo gallery application for a client. I am developing the app in asp.net 3.5 and would like to develop it so that I can re-use the application across multiple platforms using various front-ends. Basically, I am wondering what are the dis-advantages and advantages of storing images in the database as binary files as opposed to simply storing the files in an application folder.
Any advice would be greatly appreciated!
Thanks, Tristan
The disadvantage of storing as binary is that you blow the database size to incredible sizes. If you were to use an express edition of SQL Server, which is limited to 4GB per database, you photo gallery would "finish" quite soon.
The advantage is that you can easily manipulate the access restrictions per file and per user. You just look at user rights and decide whether you serve back the image or not.
这篇关于哪个更好的方法存储图像 - 文件夹或SQL Server作为二进制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!