• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

offline LAN Database question

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im going to work on a new application for a sales system with java and SQL ( desktop application )

but my question here is it possible to make database without a server that it only work within a specific internet connection without internet ? what i mean that it only works with company pc's nothing else .

and what do i need to do this application only java and oracle sql ? or do i need something else .

sorry for my english
 
Bartender
Posts: 669
15
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't want the DB to be able to connect to the internet you mean?  You can have a regular computer network just don't hook it up to the internet.  It doesn't change how you program it changes just how you set up your network.
 
Sheriff
Posts: 28326
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your database is going to require a server, there's no getting around that. But there's no reason to be concerned, either. You can (and should) set it up so that it's only accessible within your local network -- this is the standard way to set up a database.

If you plan to write a desktop application for a sales system, well, that's sort of an unusual thing to do now. Desktop applications are very out of fashion. But they are still possible.

As for do you need Oracle SQL, no you don't. There are lots of SQL databases available, Oracle is just one of the possibilities.
 
omar tawfeek
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Your database is going to require a server, there's no getting around that. But there's no reason to be concerned, either. You can (and should) set it up so that it's only accessible within your local network -- this is the standard way to set up a database.

If you plan to write a desktop application for a sales system, well, that's sort of an unusual thing to do now. Desktop applications are very out of fashion. But they are still possible.

As for do you need Oracle SQL, no you don't. There are lots of SQL databases available, Oracle is just one of the possibilities.



can you recommend me desktop application alternatives ? i want to make a small program .exe and make a lan network server without internet .

can you recommend me a server that i can upload database into or the server should be on a server pc ?

sorry i am new to java and i want to learn more :)
 
Paul Clapham
Sheriff
Posts: 28326
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The terminology is confusing you. A "server" can (and often does) mean a computer on which you run various applications whose purpose is to serve other applications. And it can (and often does) mean one of those applications.

For example a "web server" can be an application which responds to HTTP requests by sending back web pages as its response.

None of this has anything to do with Java, really, except that you could write a server application in Java if you liked.

As for desktop applications written in Java, you could use Swing or JavaFX. However it doesn't seem like there's a lot of people using those features to write client software nowadays. It's much more common to use something like REST-ful web services to connect to the server. Of course you could use Swing or JavaFX to use those web services but what I mean is, it's more common to use JavaScript in a browser to do that.

And as for ".exe", yeah, you could do that in Java with some extra work but it's unnecessary and just provides another source of problems for you to stumble over.
 
omar tawfeek
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:The terminology is confusing you. A "server" can (and often does) mean a computer on which you run various applications whose purpose is to serve other applications. And it can (and often does) mean one of those applications.

For example a "web server" can be an application which responds to HTTP requests by sending back web pages as its response.

None of this has anything to do with Java, really, except that you could write a server application in Java if you liked.

As for desktop applications written in Java, you could use Swing or JavaFX. However it doesn't seem like there's a lot of people using those features to write client software nowadays. It's much more common to use something like REST-ful web services to connect to the server. Of course you could use Swing or JavaFX to use those web services but what I mean is, it's more common to use JavaScript in a browser to do that.

And as for ".exe", yeah, you could do that in Java with some extra work but it's unnecessary and just provides another source of problems for you to stumble over.



thats great but how can i upload my application and its database on a server is there any tutorial out there teaching me how ?

also does it work on desktop application and web application ?
 
Paul Clapham
Sheriff
Posts: 28326
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

omar tawfeek wrote:thats great but how can i upload my application and its database on a server is there any tutorial out there teaching me how ?



You aren't going to do that. The server is a computer so you are just going to sign on to that computer (as an administrator, hopefully) and install the database.

And if you're going to write a desktop application, then there's not much point in having it on the server. It needs to be on the computers which belong to the people who are going to use it.

Again, none of this has anything to do with Java. It's just basic computer network management.
 
omar tawfeek
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:

omar tawfeek wrote:thats great but how can i upload my application and its database on a server is there any tutorial out there teaching me how ?



You aren't going to do that. The server is a computer so you are just going to sign on to that computer (as an administrator, hopefully) and install the database.

And if you're going to write a desktop application, then there's not much point in having it on the server. It needs to be on the computers which belong to the people who are going to use it.

Again, none of this has anything to do with Java. It's just basic computer network management.




can you tell me where i can find this or how i can install 1 computer for network ?

i am so sorry i dont know how to do this :(
 
Paul Clapham
Sheriff
Posts: 28326
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems that you aren't working for a company which already has a network, right?

Okay. First you're going to need at least two computers. So if you only have one computer so far, you need to go out and buy another one.

And if you're going to have a network, then you need to have a network controller running on one of the computers which is going to be in the network. Depending on what operating system you chose for that machine, there are instructions available on-line for how to set up a network controller there.

And the machines are going to have to be connected somehow. Traditionally they were connected by cables but you might be able to omit that step and use Wi-Fi as your network.
 
Paul Clapham
Sheriff
Posts: 28326
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually... instead of having somebody try to explain networking to you in bits and pieces, you could try reading a book instead. Here's a good one for beginners: Networking For Dummies.

You may find tutorials online if you care to search but the field of networking is large enough that a book is a better source.
 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:The terminology is confusing you. A "server" can (and often does) mean a computer on which you run various applications whose purpose is to serve other applications. And it can (and often does) mean one of those applications.



This is something that confuses everyone. It dates back to when machinery was feeble enough that a single machine could basically only run one service.

A better term for a machine (whether physical or virtual) is "host". That way you can use "server" to specifically mean software that provides an indicated service. And when you want to minimize ambiguity, say what kind of service (web server, file server, LDAP server, DNS server, etc.)
 
omar tawfeek
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Actually... instead of having somebody try to explain networking to you in bits and pieces, you could try reading a book instead. Here's a good one for beginners: Networking For Dummies.

You may find tutorials online if you care to search but the field of networking is large enough that a book is a better source.



yes im not working at a programming company , i am working atm at a small company as a designer but i want my carrier to be a programmer so i am trying to make a small application and setup it for them so i can work in a programming company .

i am really thankful for you paul for this book i am sure that it will serve the needs of mine , thank you again ♥
 
Paul Clapham
Sheriff
Posts: 28326
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Learning how computer networks work is an important skill in programming these days, so learning to set one up yourself is a very good idea.

However, you could still work on the other part of your project right away. It's possible to have your client application and your database server on the same machine -- I have a project like that running on my home computer. Sure, in a professional context the two things will be running on different machines, but it's just a tiny change in configuration to make that happen.
 
Tim Holloway
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote: Sure, in a professional context the two things will be running on different machines



Not always. Especially if you're running pre-packaged systems. Sometimes the nasty little suckers will have their own private instance of MySQL or PostgreSQL bundled right in. Since I do keep my databases centralized (it's a lot easier to back up, restore and monitor that way), I've had more fun than I want to think of persuading some of those critters to use MY   database server, not theirs!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

From what I understand is that you are asking about the hardware, that whether you can deploy your database on a normal desktop PC instead of a server machine.

You could actually deploy your application and database on a single PC, not an issue, but it all comes down to the fact that how many users are actually going to connect to the server at a time. Since you have an application, that will be accessed by users and hence use the database, each connected user, will be utilizing resources (CPU & RAM). So based on the no. of users that would be connecting to the application and using the database, you need to have enough resources. It also depends on what type of activity each of the users are going to do through the application, are  they going to run heavy reports on the system, then again, the resource requirements change.

The other thing to consider is, that how critical would this data be for your company, is this a one time-project that will last for a month or so, or is the data being generated important for your company and will be needed for a long time. If that's the case, then you should consider putting in extra hard disks in the machine and configuring RAID for data reliability. Since a server class machine would already have hardware RAID built-in, you would need to configure software RAID on the machine.

You should also consider the amount of transactions that would be occurring in the database, if the users increase. normal desktop hard disks have a limit for coping up with such intensive reads and writes, and you would then tend to have frequent disk failures, where as disks on server are of enterprise level and are built for handling continuous intensive operations.

So when choosing your hardware, make your decisions wisely, considering current and future requirements (at least for the next 2 years) if this is a production level application.

For the second part of your question, yes, you can use Oracle DB, you can use the free version Oracle XE, but you need to have verify the limitations that it has, it can only cater to about 10-12 GB of data,  and will only user certain amount of RAM and CPU core. Again, based on the points i have provided above, perform your requirements assessment accordingly.
 
This is awkward. I've grown a second evil head. I'm going to need a machete and a tiny ad ...
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic