What is the best way to associate a file with a piece of data?

前端 未结 8 945
别跟我提以往
别跟我提以往 2020-12-29 13:52

I have an application that creates records in a table (rocket science, I know). Users want to associate files (.doc, .xls, .pdf, etc...) to a single record in the table.

8条回答
  •  自闭症患者
    2020-12-29 14:17

    And now for the completely off the wall suggestion - you could consider storing the binaries as attachments in a CouchDB document database. This would avoid the file name collision issues as you would use a generated UID as each document ID (which you what you would store in your RDBMS), and the actual attachment's file name is kept with the document.

    If you are building a web-based system, then the fact that CouchDB uses REST over HTTP could also be leveraged. And, there's also the replication facilities that could prove of use.

    Of course, CouchDB is still in incubation, although there are some who are already using it 'in the wild'.

提交回复
热议问题