954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Java Online Database

Hi, I'm wondering if it's possible to have a desktop app with a database online?

Can you give me an example? :P

darwin_nacional
Newbie Poster
5 posts since Jul 2011
Reputation Points: 10
Solved Threads: 1
 

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)

hfx642
Posting Pro
515 posts since Nov 2009
Reputation Points: 248
Solved Threads: 105
 

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.

sirlink99
Practically a Master Poster
661 posts since Oct 2010
Reputation Points: 45
Solved Threads: 19
 
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 )

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

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! :)

darwin_nacional
Newbie Poster
5 posts since Jul 2011
Reputation Points: 10
Solved Threads: 1
 

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.

JeffGrigg
Posting Whiz in Training
218 posts since Aug 2011
Reputation Points: 192
Solved Threads: 28
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: