Save files to Storage or Mysql Database?

Asked

Viewed 10 times

-3

Personal the question may be 'simple', but in the company where I work the analyst requested that PDF files be saved in bank (Mysql - using Mediumblob type). But in Windows I always save files(pdf, pns, jps, etc) in Storage folder, which for me is the best to do.

I would like to know which positive/negative points to save yourself in the bank?

And saving the files in the Storage folder can generate some kind of problem?

After that I want to go over these reasons for them to change their minds.

  • 1

    I would only increase from Mediumblob to Longblob, spend one byte more information on the table lines, but it ensures much more space. There is no downside to write to DB, as long as you don’t have high server cost and don’t waste bandwidth between machines. And it still has guaranteed referential integrity, which on file becomes more difficult. If saved in the folder, you have to have a separate filesystem backup routine. Although using this type of framework, performance and consistency may not be the main focus of the project, but "fast delivery", you have to evaluate this to decide.

  • 1

    On the question, can [Dit] and give more concrete parameters so that it is possible a technical answer, that the question is reevaluated by the community. To understand what kind of question serves the site and, consequently, avoid closures and negativities worth reading What is the Stack Overflow and the Stack Overflow Survival Guide (summarized) in Portuguese.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.