Reputation: 21
Dear All, I am developing an automative tool.for this I need file attachement functionality.Back end using Mysql 5.2,Appache tomcate server.Can any body suggest me uploading file to DB is better OR uploading it to server is better. Thanks in advance.
Upvotes: 2
Views: 815
Reputation: 12575
Read this post for which is best .Meanwhile may i know what kind of file(image,movie,text doc) , what is it's file size?
File paths in the DB is definitely the way to go
Storing Images in DB - Yea or Nay?
HighLights:
File store. Facebook engineers had a great talk about it. One take away was to know the practical limit of files in a directory.
Needle in a Haystack: Efficient Storage of Billions of Photos
Upvotes: 3
Reputation: 240890
DBMS has following advantages
You can access it from multiple site, if you store in FS you need some protocol to transfer it
With DBMS you will have relation things directly while for FS you need to manage it programatically
With DBMS you can have advantage of ORM.
My vote goes to DBMS
Upvotes: 1
Reputation: 3984
Uploading the file to the server and having an entry for its path in the DB is a better approach.
Upvotes: 1