[英]Storing large number of images database or filesystem
I am working on a project where we need to store large no of images say some 10 millions so which is the best way to store the images.Best way in terms of speed and efficient. 我正在开发一个项目,我们需要存储大量没有图像说大约1000万,所以这是存储图像的最佳方式。在速度和效率方面最好的方式。 It is a web based project so the image retrieval should be fast.
它是一个基于Web的项目,因此图像检索应该很快。
Database 数据库
Storing images as base64 in database. 将图像存储为数据库中的base64。
we are working on a nosql database. 我们正在开发一个nosql数据库。
File System 文件系统
To make an unique id and store it under an folder. 创建唯一ID并将其存储在文件夹下。
1)Database 1)数据库
2) File system 2)文件系统
refer http://perspectives.mvdirona.com/2008/06/30/FacebookNeedleInAHaystackEfficientStorageOfBillionsOfPhotos.aspx 参考http://perspectives.mvdirona.com/2008/06/30/FacebookNeedleInAHaystackEfficientStorageOfBillionsOfPhotos.aspx
also see Storing Images in DB - Yea or Nay? 还看到在DB中存储图像 - 是或不是?
There is a trade off - it will depend on your exact situation and needs. 有一个权衡 - 它将取决于您的确切情况和需求。 The benefits of each include
每个的好处包括
Filesystem 文件系统
Performance, especially caching and I/O 性能,尤其是缓存和I / O.
Storing file paths in the database to be best. 将数据库中的文件路径存储为最佳。
There are a couple of issues: 有几个问题:
Database 数据库
If you have a SQL 2008 DB, have a look at FileStream in this SO article - this gives the best of both worlds. 如果你有一个SQL 2008数据库,请看这篇SO文章中的FileStream - 这可以提供两全其美的优势。
See Storing Images in DB - Yea or Nay? 请参阅在DB中存储图像 - 是或否?
Edit 编辑
See for Nosql: 参见Nosql:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.