Database access: what should I do here? I'll explain my situation here, I hope I'm posting this on the correct site, otherwise I'm sorry and I'll move this to somewhere else. I've built a Java program in order to control sales, inventory, prices, etc of a small business. The program communicates with a SQL database inside the WAMP folder.

It works fine. 100% fine. But here is where the problem begins. It would be better if I could access the database from more than one computer. I should be able to host it online, but one of the computers wouldn't always be online and the database has to be updated when the offline computer accesses it. For example, if I insert a new row on a table using one of the computers while accessing the database, when I'm not online I need to have that row there.

Could I use a CD, a flash drive, or should I download it every time I need to access it offline? Maybe there is a simple solution and as I'm a beginner in all this I hope you can help me out.
First things first, if your application needs a data set to function then it needs access to that data set. Normally the computer would be networked to the central repository, but if that isn't possible then the computer needs to have a local copy that synchronizes with the central repository whenever it can communicate with that repository.

Your application will need to maintain some sort of change log since the last synchronization. Then when the application discovers it can communicate with the central repository it will need to synchronize the local changes with the remote changes. Keep in mind this can cause problems. 

For instance if your application is a sales database for Acme Widgets a sales person might check inventory to verify they have 15 gizmos in stock. They proceed to sell those gizmos at the fair, but when they get home to and synchronize their laptop the realize that during the day 5 other sales representatives in the home office sold 15 gizmos each. Now you have over sold your gizmos.

In order to avoid the catastrophe of over selling gizmos you should ask management to get cellular data plans for the laptops so they always have access to the central database. Alternatively you might not care if the database synchronization results in oversold gizmos. I don't know the details of your application.