The question:
How to correctly store files for thick client app (Ora DB <-> Win App)?
A) If we store files in DB, DB is hard to manage and, as I understand, violates best practices.
B) If we store files on disk, then how to access them – windows share is out of question b.c. security and other communication with server is only DB connection.
Any ideas how to store those files and access them to insure security and consistency?
P.S. Redesigning app for web is to expensive.
The Solutions:
Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.
Method 1
Files are “best” managed in a file system.
Files systems can be made remotely available through file shares.
Your use case appears to preclude the use of these. That’s unfortunate, because it’s probably your easiest option.
OK, so you need another way of getting files from your central location where the files are stored to the client application.
Yes, you could put them into the database.
As you say, it’s not ideal but it’s an option. You’ll need a lot of storage, depending on the files’ sizes, but that’s just disk space that you’d need anyway. Retrieving big chunks of data will make queries [a bit] slower but, technically, it’s not that big a challenge.
Another, and better, alternative might be to have some other piece of software to make your centrally-stored files available to your “remote” application.
That would be a Web Server.
Even if you’re only operating on an internal network, this is the best tool for the job. It’s scalable, securable and easily operated and – bonus – it acts as a “stepping stone” towards moving your application to the web.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0