[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Save files in database: good or bad?

  • Thread starter Thread starter David Abdala
  • Start date Start date
Status
Not open for further replies.
D

David Abdala

Guest
This is a subject that can't be answered: there are good reasons for both approaches, and both are good, or bad, based on each particular case. What I always recommend is having the option: the application should be able to do both, and be able to change the configuration at any point in time, to chage from DB to filesystem or viceversa. If having the option is "too much", then you have to make the choice based in your particular use case (is not the same storing employee face images, that storing PDF invoices or students photo-books). Pros: Filesystem: - not your problem (handled by OS) - does not affects DB times (running nor backup/restore) - easy to hack (replacing files, deleting, adding, etc) DB: - goes where the db goes (easy migration) - integrity is "granted" (better at least) - easy handling (find the record, have the file) Cons: Filesystem: - integrity is not so easy to grant - backup/restore "by hand" - you have to find the file, after the record in the DB - filesystem permissions can bite you.. more than once DB: - grows and grows a lot faster - "slow" backup/restore - some people says performance is affected, but I have no evidence of such thing, and should not happen Conclusion: for me is exactly the same, "in abstract". When you analyze each particular case, then you can make a better choice. In most situations I give the option (a configuration option having a filesystem path, or nothing to use the DB), because I can't know in advance the type of use the application will have. In case you can do both, at application level I mean, you need to "fall back" when you try to retrieve a file (if not in the DB, look for it in the filesystem, and viceversa). I've done a lot of filehandling, in most cases I store them in the filesystem, because I can afford to loose them, but when the files are as important as the rest of the data, they go to the database (I loose everything or nothing). I know my answer won't help you, but you should have a less biased opinion about it (from your post you are biased towards the filesystem) and make a more "agnostic" analysis..

Continue reading...
 
Status
Not open for further replies.
Back
Top