在MySQL中保存图像 [英] saving image in mysql

查看:91
本文介绍了在MySQL中保存图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨........
我对在mysql中保存映像存有疑问.
是否必须直接使用Blob数据类型存储图像.
或者我必须保存图像的路径哪个方法更好.
请帮助我

hi........
i have a doubt regarding saving images in mysql.
whether i have to store images directly using blob datatype.
or i have to save the path of the image which method is better.
please help me

推荐答案

我投票赞成将路径保存为首选项,但可能有理由将图像保存为blob数据类型.

如果使用数据库的人可能无法访问图像的存储区域,那么将图像存储在数据库中可能是有道理的.

我不存储图像(静态的小图像除外(未更新,未由用户提供))

就我而言,它更可取,因为我通常是管理数据库的人(Oracle/SQL Server),随着数据库规模的扩大以及出现问题时,这将成为一项更大的任务.

但是任何一种模型都是可以接受的.
I vote for saving the path as a preference but there may be a justification for saving images as a blob datatype.

If the storage area for the images might be inaccessible to those using the database then it may make sense to store the image in the database

I don''t store images (except for small ones that are static (not updated, not user supplied))

In my case it''s more of a preference because I''m usually the one who manages the database (Oracle/SQL Server) and this gets to be more of a task as the database grows in size and when things go wrong.

but either model is acceptable.


这篇关于在MySQL中保存图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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