在数据库中存储用户的个人资料图片:小尺寸图像,因此在数据库中?
如何在服务器上存储和检索用户的个人资料图片?在数据库中还是使用文件系统?我听说对于小图像来说,存储在数据库中更合适。如果大小在 60*60 px 到 80*80 px 之间较小,那么与文件系统相比,检索会更快!?
[我的数据库是 Cassandra。]
How to store and retrieve the profile pic image of the users on the server ? In the database or using File System? I heard that storing in DB is preferable for small images. If size would be small around from 60*60 px to 80*80 px then retreivals would be faster as compared to file system!?
[My database is Cassandra.]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 Cassandra 中以原始字节存储图片。如果您使用Java,您可以参考以下链接 -
https://github.com /rantav/hector/tree/master/core/src/main/java/me/prettyprint/cassandra/io
另外以下讨论可能会有所帮助 -
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Storing-photos-images-docs-etc-td6078278.html
You can store a picture in Cassandra in raw bytes. if you are using Java, you can refer the following link -
https://github.com/rantav/hector/tree/master/core/src/main/java/me/prettyprint/cassandra/io
Also the following discussions might help -
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Storing-photos-images-docs-etc-td6078278.html