Where should I save Photo in web application like Photo Blog?
Where should I save Photo in web application like Photo blog? I mean should I use physical path or database. I planned 开发者_开发知识库to use ASP.NET MVC and MSSQL. If you have any idea, please suggest to me. and any sample db design or app links can provide to me?
Thanks
This is a matter of opinion, but I personally think it makes much more sense to store a photo as a file, and just store the path in the database, than to store BLOBs. I haven't explored the performance penalties if any.
In fact, I haven't ever found the need to use a database for a photoblog. Files for the photos and any associated annotations have worked well enough. I suppose for a really heavily-trafficked site that would not be sufficient.
If the images are not of huge size you can try the Filestream option in sql server 2008.
精彩评论