1
I always run into this question when I have to work with file storage inside a software.
It is ideal that I simply record them in any folder and record the information in the database, with a field pointing to the path where the file is?
Or it is more feasible that I create a "file" field and convert the bytes of this file, thus centralizing all my storage in the database?
In my case it is more specifically '.mp3' and '.mp4' files that are sent to the user via streaming.
As the files can become quite large, I think this can be a problem when storing directly in the bank and so the first option becomes more viavél, but in other cases, there is some case that I should/ can store in the bank?
The question How to model a tree data structure using a relational database? covers the subject well, but for me it is still not very clear this issue of file size, and whether they can somehow affect the performance of my bank
The question is different from the other two... and why I can’t answer?
– Dudaskank
If I open the answer, I turn it into one: The answer is depends on each case, there is no right way and there is no wrong way. A study by a Microsoft staff (https://www.microsoft.com/en-us/research/wp-content/uploads/2006/04/tr-2006-45.pdf) concluded that, in their test, up to 1 MB was worth keeping in the bank, and above that in the file system. as in your case are large files, probably will perform better using same files, and in BD store only meta data, beyond the file path.
– Dudaskank
Something similar for example that Wordpress does
– Dudaskank
@Dudaskank, the question has been closed and is being voted to be reopened. While it is as [duplicate] no changes can be made. Read more about: https://answall.com/help/duplicates
– UzumakiArtanis
@Uzumakiartanis I can vote for?
– Dudaskank
Can you vote? No. Only people with more than 3,000 reputation points and moderators. @Dudaskank
– UzumakiArtanis
Does any of the current 3 links you have upstairs answer your question? Even if the questions there are not exactly the same, the answers solve your problem?
– bfavaretto
Clearly @bigown marked correctly, reading the question and seeing the corresponding posts is possible to come to a conclusion for the "problem" and with that solves the problem of this question.
– Don't Panic
Yes, the links helped solve the problem
– José Henrique Luckmann
@Everson He (bigown) had closed pointing to the wrong place, was correct well after. Part of the confusion here was because of this.
– bfavaretto