I have been creating a large application to be used in my workplace and it needs to be expanded upon.
I have begun migrating my data to SQLite databases which works very well in handling multiple, concurrent SELECT requests.
However, we now have multiple users that need to be able to write data back to the database at any given moment. The databases currently reside on a shared network drive.
There are two problems with this scenario:
- Only one write operation may be performed at a time. If more than one user is attempting to write at the same time, one of them will fail and Java throws an SQLException.
- I do not have access to install a database server. I am fairly new to databases but I understand a database server is one way to allow concurrent write access to databases. However, in my work environment, I do not have the ability to install or administer such software.
Are there any other options for this scenario? Would there be a way for Java itself to handle the issue with the databases being locked?
I was thinking of just opening a new thread and continually trying to write to the database until it's successful, but such a brute-force tactic seems really irresponsible and unnecessary.