Question

I need to sore attachments at server side. I can store them either under blob column of database or under file directory. My question is which one is more reliable, scalable and maintainable?

EDIT:-

if we go for file system, we have to handle synchroniztion yourself. Is n't it ? For example if two users are trying to create/update the File under same directory how will we handle concurrency with filesystem?

Was it helpful?

Solution

Storing data in directory is more reliable due to indexing and data fetch and other operation. Just store the path of the file into DB and store that file into directory.

When there's lot's of data store request came on server it's very hard and complex to handle so much request. So it's better to store data on directory so accessing of data becomes more faster and when the daily scale of DB storage increase then these become so important so when you start any system first of all study it well and then decide that what to do or which technique will be the best ? When more data are there in DB then clustering and indexing become more important.

If you want to use it for small data storage then blob it good option but for large data I ll not recommend you because I have made online data store web application and faced this situation so at end I have used to store data in directory and just path in DB.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top