none
placing attachments in db field or into file system RRS feed

  • General discussion

  • This is a general question regarding whether it is better to store the attachments (docs, xlsx, pdf, txt, etc) in the db attachment field or into a file system on a shared server folder. I've worked with both and the way it was decided was what the db was all about. An example would be a db tracking part numbers could have 100's of thousands with each part having attachments.  In a file system there would now be 100's of thousands file folders holding all the attachments for each part number.  I've also had where there would be a handful of new file folders added each year.  And I've had each of these scenarios where the attachments end up in a db table in sql server or in ms access. But I've never really found out what others think should be done.

    So I open this discussion to many others out there who have had similar issues.  What is really the better way to store attachments to a record?

    Thanks....John

    Tuesday, June 3, 2014 1:13 AM

All replies

  • Hello John,

    It is up to you where to store attachment files. Each solution has its own pros and cons. There is a file size limit which you can reach easily adding attachments to the db. But from the opposite side of view nobody will be able to see files on the disk. I'd recommend storing attachments on the disk if you don't store any secure information in attachments.

    Tuesday, June 3, 2014 8:35 AM
  • You might get a better discussion on this topic in a forum that targets databases or windows systems, rather than one that focuses on programming Office applications using their APIs?

    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, June 3, 2014 1:25 PM
    Moderator
  • One of the key performance issues that I could perceive would be in searching for the appropriate object, especially in wan connected scenarios.

    al


    Al Edlund Visio MVP

    Tuesday, June 3, 2014 1:42 PM
  • I believe that storing the docs in the DB is the way to go. some examples:

    TFS stores the controlled files in the DB (Source Safe did not and was replaced with TFS)

    SharePoint stored files in the database

    Oracle's Agile (Document management targeting engineering drawings) uses the DB

    I would have to assume FaceBook uses a database.

    Tuesday, June 3, 2014 1:48 PM
  • I would like to thank everyone who replied; Eugene Astafiev, Cindy Meister, Al Edlund, and Rogge.  I looked over the current method and it is a file system which currently has a few thousand folders and will continue to get bigger.  I did some further analysis and it is decided to go with the storage in the db.  Thought I would let you all know. 

    Thank you....John

    Thursday, June 5, 2014 12:38 AM