It's called a "Client Server" database system (or 2 tiered).
But, that's the OLD way to do it.
Now, everything should be done through a browser.
The application is online on an Application Server
and the database is also online.
Browser, Application Server, backend. (3 tiered)

Edited 5 Years Ago by hfx642: n/a

I have had this same question. Though I could not figure out how to get it to work you use Mysql and JDBC to make an online database on a server. you then connect to the server and write, or read from the database. please message me if you figure it out.

I have had this same question. Though I could not figure out how to get it to work you use Mysql and JDBC to make an online database on a server. you then connect to the server and write, or read from the database. please message me if you figure it out.

1) You can have DB enabled to receive connection from other sources then localhost which is default setup on most database instalations
2) You can provide service to which your desktop application will send request, this processed and DB queried, afteer that respond is generated and forwarded to client (your desktop application). This is commonly described as web service (The Java Web Services Tutorial)

Thanks for the replies. So basically, it's not just as simple as changing the url that I use when I connect to my database on my pc?

And also thanks for the tutorial link. If you have other references for solving my problem, please share it to me. thanks! :)

1. The answer is "Yes."
>;->

2. If the database is on your local LAN, rather than accessed through the Internet, then you generally can access it just by changing the URL that you use.

3. Connecting from a desktop application through the Internet to a database is generally a bad idea, for both performance and security reasons.

Using web services, as peter_budo suggested above, is generally the best answer for business applications.

For a quick and dirty development-time workaround, consider Virtual Private Network (VPN) tunneling.

There are vendor products to do JDBC on a client against a server database (http://www.idssoftware.com/jdbchttps.html), but be aware of performance and security issues: Secure sockets from an untrusted client PC does not protect you from hackers! If the client boxes are "trusted," then you may as well put them on the LAN, via VPN if appropriate.

This article has been dead for over six months. Start a new discussion instead.