Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a very beginner question regarding web development.

I've had some experience with JSP, Hibernate, and MAMP to create a simple system for tracking inventory and sales. But this was all done locally on one computer.

This time, I want to create a system that could be accessible online. It's to help my mother track her business wherever she goes. So there would be similar aspects like tracking inventory and sales. I understand that you have to have a server in which to host all the files in. But I don't understand how you can access your database online. Or what sorts of applications or products should be used.

Currently the host of my database is localhost. How do put it online such that you can still do CRUD operations? Are there any guides to do this?

share|improve this question

closed as off-topic by gnat, MichaelT, ChrisF Nov 7 '13 at 22:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, MichaelT, ChrisF
If this question can be reworded to fit the rules in the help center, please edit the question.

9  
+1 to counter the (IMHO) undeserved downvotes. Indeed, this is a beginner question. As such, it is IMHO perfectly legal here. It could surely be improved further, but it is fairly clear, real and useful as it is. Let's be nice to newcomers shall we? And if someone sees a real, valid reason to downvote, at least add a comment to explain your issue please. –  Péter Török Jun 13 '12 at 16:00
    
If you already have a localhost setup enabled, just forward the port on your router and type in your web ip address. You can find it by googling "What is my ip address." You then put that ip address in your browser and it will take you to your application. –  TomJ Jun 13 '12 at 16:34
    
@PéterTörök Thank you very much. I was afraid this was too silly to ask among highly experienced people. –  Dezrik Jun 13 '12 at 23:53

3 Answers 3

up vote 7 down vote accepted

In web applications, the database is rarely accessed directly by external clients. Clients interact only with the web frontend, which in turn queries or updates the database. The latter may sit on the same physical server, or (in high traffic sites, to balance the load) on a different - but only locally accessible - server.

This has (at least) the following advantages:

  • no need to develop a special client - you only need a web browser
  • tighter security (the only intrusion point is your web app)
share|improve this answer
2  
+1. You don't "put a database online," you put an interface to the database online. –  Mason Wheeler Jun 13 '12 at 21:03

Many hosting providers will provide you with a database (e.g. MySQL). When you host your application on their server, you will still likely use localhost as the host because the application and database will be on the same server.

share|improve this answer
2  
Or they will tell you what hostname to use. Just as many hosts have their databases on a different server. –  CaffGeek Jun 13 '12 at 16:19

This is more of a conceptual answer, but here it goes...

If you want to persist data, across multiple computers you obviously need to store the data; which you accurately identified as using a "Database" and second you need to access the data. When accessing the data from the web people write web applications that access the database, and write frontends in html/css/javascript to display the information.

If you are looking to retrieve the data across the internet from another program (maybe installed on your mothers laptop) you can implement a Web-API such as REST, XMLRPC, JSONRPC, etc.

It is important to note that some type of security is needed if you are exposing the web server to the internet if you don't want others accessing your mothers information.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.