你在哪里存储asp.net中的图像 [英] Where do you store image in asp.net

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

问题描述

我的项目是学校管理网络项目。在我的项目中,我必须存储图像。我应该将图像存储在数据库中还是其他。请告诉​​我如何操作并解释为什么这样做。大多数人都将图像存储在项目和服务器中。

那可以吗?为什么?请快速回答我。谢谢所有。

My project is school management web project.In my project, I have to store image.Where I should store image in database or other.Please give me away how to do it and explain me why do that. Most people are stored image in project and server.
That is OK? Why?Please quickly answer me.Thanks to all.

推荐答案

在我看来,你应该存储在 FileSystem 中,因为当你需要存储时具有高分辨率的图像,然后您将存储在数据库中的字节数据将不必要地使其过载。

同时读取和写入数据库到数据库是时间消耗,这将使您的应用程序变慢。



如果您存储在 FileSystem 中,您将可以更好地控制它。如果需要,您可以使用压缩算法。但就您的学校管理系统而言,您可能不需要。



所以,去 FileSystem 。它会比数据库更好。 :)
In my opinion, you should store in FileSystem because when you need to store images having high resolutions, then the byte data you will store in Database would unnecessarily make it overloaded.
Also reading and writing images into Database is time consuming, which will make your application slow.

If you store in FileSystem, you will have the better control over it. You can go for compression algorithms, if you require. But as far as your School Management System is concerned, you may not require that.

So, go for FileSystem. It would be better than Database. :)


检查这些链接:

http://www.aspforums.net/Threads/127524/Save-File-in-Folder-on-disk- vs-save-file-in-database-Advantages-and-Poorages / [ ^ ]

http://www.extremeexperts.com/sql/faq/StoreImages.aspx [ ^ ]

http://www.dofactory.com/topic/1379/best-practice- store-images-in-db-or-on-file-system.aspx [ ^ ]

http://stackoverflow.com/questions/2517752/images-in-database-vs-file-system [ ^ ]
Check these Links:
http://www.aspforums.net/Threads/127524/Save-File-in-Folder-on-disk-vs-save-file-in-database-Advantages-and-Disadvantages/[^]
http://www.extremeexperts.com/sql/faq/StoreImages.aspx[^]
http://www.dofactory.com/topic/1379/best-practice-store-images-in-db-or-on-file-system.aspx[^]
http://stackoverflow.com/questions/2517752/images-in-database-vs-file-system[^]


使用ASP.NET在数据库或文件系统中存储上载的文件 [ ^ ](这有比较文件系统与数据库 - 优点/缺点等,)
Storing Uploaded Files in a Database or in the File System with ASP.NET[^](This has comparison File System vs Database - Advantages/Disadvantages, etc.,)


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

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