Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All ,

I need to attach document for some say id..
but which way i should do it by coping byte content to the Database or should we create a copy to the our server and while reading we can read from file.What should be the best approach?

Thanks,

Amit
Posted
Updated 31-Aug-10 20:34pm
v2

I think the best approch would be to Store it in DB,
for the reason you can Move your DB anywhere, No Need to take care of File location, and will be safe from deletion, and will be Confidential.

Thanks
 
Share this answer
 
Comments
Amit Patel1985 1-Sep-10 3:03am    
but per file size can be 10 MB or more and file can be multiple so it will increase size of database so is it best way to create a root folder for attachment and do .
Hiren solanki 1-Sep-10 6:01am    
yes, you are right, but as you will store it on disk then it will need that much space too. then why not to store it in DB.
Makes sense.
It doesn't make sense. To access such file from db more processing time reqd.

So my suggestion is to place such file in a folder and only copy the path of that file in db.

Hope this may help u.. :)
 
Share this answer
 
Comments
Christian Graus 1-Sep-10 6:16am    
There are pros and cons, that's why both approaches exist and are used by different people. Without a better explanation from the OP, no-one can really tell him which way will work best for him.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900