在数据库或文件系统中存储图像是否好? [英] Is it good to store images in database or file system?

查看:147
本文介绍了在数据库或文件系统中存储图像是否好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

在DB中存储图片 - 是或否?


建议您储存图片时使用: -




  • 档案系统 $ b
  • 数据库



这是一个概念问题,我想总结一下,哪种方法在不同的项目中更好。 >

注意:请证明哪种方法更好。


解决方案

哪个更好取决于你的情况(当然)。将它们保存在数据库中意味着系统几乎完全可移植。一切都紧密联系在一起,并一起。



缺点是一切都紧密相连,你需要找到数据库检索图像。这包括运行任何需要连接到数据库的代码来处理图像信息。这是很大的开销。


Possible Duplicate:
Storing Images in DB - Yea or Nay?

What you recommend for storing images in:-

  • File System or
  • Database

This is conceptual question, I want to conclude, which approach is better in different projects.

Note: please justify which approach is better.

解决方案

Which is better depends on your situation (of course). Keeping them in a database means that the system is pretty much completely portable. Everything is tightly linked and "travels" together.

The downside is that everything is tightly linked and you need to hit the database to retrieve the image. This includes running any code needed to connect to the database an process the image information. That's a lot of overhead.

这篇关于在数据库或文件系统中存储图像是否好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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