Should web application store images in Database or File system?
As a web developer storing images in the file system would be the easiest and it is the best way. If the images are stored in the database then below are its disadvantages
- On request, the specified file has to be retrieved from database and temp file should be created, which would be referenced in the generated html. This is a time consuming task and it will delay the page load.
- In database, the image data would be stored as BLOB or IMAGE. If a particular record doesnot have any image then also it will consume certain space. To avoid this images should be stored in separate table and it should be accessed via foreign key.
- In shared hosting environment, where the database, disk space, web servers and other tools would be provided by the service provider, the database space would be very much limited and it is good option to utilize the file system. In case virtual private hosting this may not be an issue.
- If multiple servers are required for load balancing then if the images are available in database then it would be easy to take backup or replicate the data.
- Databases are helpful to keep multiple versions of the images.
- It provides some security as against storing all the image files in the file system.
Please post your feedback.
comments powered by Disqus
Tumblr is a microblogging platform that allows users to effortlessly share anything. Tumblr now hosts over 70 million blogs with over 34 billion posts to date. Below is the list of open source used in Tumbler.
SourceForge.NET is most popular and widely used Forge. It helps to host software projects. It has integrated support for Wiki, Forum, Tracker and Full text search. The code base named allura, is completely built on open source stack. This article explains few important one used to build SourceForge.NET.
Facebook a leading social networking website predominantly uses open source technologies to build its application. Here is the list of open source products used and contributed by Facebook.
Wikipedia is a multilingual, collaboratively edited encyclopedia. It is one of the busiest site in the world. It has more than 8 million articles and accessed by millions of users around the world. This article briefly discuss about the open source software used in Wikipedia.
Email is the primary way of communication. Small organization which hosts their website / any other application from a third party hosting service providers may require this email stack.
Pinterest is a tool for collecting and organizing things you love. It is a social networking site where users could pin images and write a note for that. It is now currently serving billions of pages every month. Check out the open source products used in Pinterest.
LinkedIn is a social network for professionals. LinkedIn handles millions of searches as well as hundreds of thousands of updates daily. They sponsored many projects to open source. Here are the list of open source products used by LinkedIn.
Twitter uses many open source products and also contributes most of the code to open source. Here is the list of open source products used by Twitter. This list does not include the projects sponsored by twitter.
opentaps Open Source ERP + CRM, is a fully integrated application suite that supports eCommerce, Customer Relationship Management, Warehouse and Inventory Management, Supply Chain Management, and Financial Management to Business Intelligence and mobility integration out-of-the-box. This article discusses about the open source software used to build Opentaps ERP.
Zimbra is a Enterprise messaging and collaboration software. It is a good alternative to Microsoft Exchange server. Zimbra is a Email Server but they have not written anything related to SMTP server, rather they have integrated well know open source email server in to its package. Zimbra is a system of well connected / integrated multiple open source software which delivers enterprise quality to it. This article explains most important components which helps to build the enterprise product.