你认为将数十亿个图像保存到数据库是个好主意吗? [英] Do you think it's a good idea to save billions of images into Database?

查看:95
本文介绍了你认为将数十亿个图像保存到数据库是个好主意吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我和我的同事们正在讨论如何建立一个庞大的存储系统,可以存储数十亿张可以快速搜索和下载的图片。

Recently, I and my colleagues, we are discussing how to build a huge storage systems which could store billions a pictures which could searched and download quickly.

一个fickr,但不是一个在线画廊。这意味着,大部分的图片将永远不会下载。

Something like a fickr, but not for an online gallery. Which means, most of these picture will never be download.

我的大学建议我们应该直接保存所有这些文件在数据库。我真的觉得这不是一个好主意,我认为数据库没有设想恢复大量的二进制文件。但我有很强的理由为什么这不是一个好的想法。

My colleages suggest that we should save all these files in database directly. I really feels that it's not a good idea and I think database is not desgined for restore huge number of binary files. But I have very strong reason for why that's not a good ideas.

你觉得怎么样。

推荐答案

在处理二进制对象时,请遵循以文档为中心的架构方法,而不是将数据库中的pdf和图像等文档存储在数据库中,您的数据库的性能问题。只需将文件存储在文件系统上,并将路径放在数据库的表中。对要用于序列化并将其保存在数据库中的数据类型的大小也有物理限制。只需将其存储在文件系统上并进行访问即可。

When dealing with binary objects, follow a document centric approach for architecture, and not store documents like pdf's and images in the database, you will eventually have to refactor it out when you start seeing all kinds of performance issues with your database. Just store the file on the file system and have the path inside a table of your databse. There is also a physical limitation on the size of the data type that you will use to serialize and save it in the database. Just store it on the file system and access it.

这篇关于你认为将数十亿个图像保存到数据库是个好主意吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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