
06-25-2009, 11:20 AM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 17
Rep Power: 0
|
|
What database shall i use?
I wish to write an application which will be required to store large quantities of information which needs to be kept on the same computer as the application and does not require anything to be installed on the computer first.
Therefore I was wondering if there was a form of database that could be run using java so that it can be self contained. I do need this data to be stored throughout uses and comptuer shutdowns.
I also need to be able to send copies of it over a network to other computers quickly as there will be a central computer running a main program, and then several others running a slave program which will update the database once per day, and possibly request certain data during the day.
Would anyone here know a sutible database type structure that i can use for this?
This program will neither have access to install anything, can not use the command line, may not have internet access, and everything must be contained within the .jar.
|
|

06-25-2009, 11:32 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,504
Rep Power: 11
|
|
|
Basically it depends on your application. Amount of data you want to store, how you want to query data from the database, how you want to distribute your data to third party and so on.
We have several options, MS Access, SQL, Oracle. Working with Access is not an easy task actually. My suggestion is MS SQL, and with indexing. If you are using large number of data entries, indexing is really helpful to improve performance in your application.
When you comes to sending data to another party through the network, you have to take a backup from the database or generate a script, and pass it through the network. Normally the backup file is larger than the script file. So it'll take time. On the other hand, if you pass a script, need to execute the script in relevant database.
Each way have advantages and dis-advantages.
|
|

06-25-2009, 11:38 AM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 17
Rep Power: 0
|
|
|
The application will have one table which will probably have over 6000 entries so it defently needs indexing. And the data will be sent over the network to third parties, although i'm not sure how often yet, depends how i decide to make certain parts of it work.
And i thought SQL required the host computer to install something on it first?
|
|

06-25-2009, 11:41 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,504
Rep Power: 11
|
|
Originally Posted by etherkye
|
|
And i thought SQL required the host computer to install something on it first?
|
To work on with SQL, you just want to install SQL server in your machine. That's all.
|
|

06-25-2009, 11:51 AM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 17
Rep Power: 0
|
|
Originally Posted by Eranga
|
|
To work on with SQL, you just want to install SQL server in your machine. That's all.
|
Thats a problem then as this program I'm writing is for a company and will be sold to people who propably won't have a clue how to use a computer properly.
So i kinda can't ask them to install a SQL server program before they run the one i'm writing.
Or is there some method for java to check if the program is installed or not and then to install it itself?
|
|

06-25-2009, 01:22 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,504
Rep Power: 11
|
|
|
I don't think installing the SQL server programatically is an easy task. Normally you have to do some configurations, like credentials, at the installation.
If your application is a server-client application, then you don't need to install the database in the clients' machine. Seems to me your application is such.
|
|

06-25-2009, 01:25 PM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 17
Rep Power: 0
|
|
|
Ah.
The 'Server' program is a central control hub on the clients computer. While the 'Clients' are computers elsewhere in the building. I have no access to any of the computers. Would be easier if i had access to the computers that would be the servers.
Trouble is, i can't install anything on the server computers either...
|
|

06-25-2009, 01:58 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,504
Rep Power: 11
|
|
Originally Posted by etherkye
|
|
Trouble is, i can't install anything on the server computers either...
|
I've no idea about this, without installing components required how can you do a development.
The best way I can see is, setup the database in a server and all the clients access the same server. All the required data taken from that server.
|
|

06-26-2009, 10:58 AM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 17
Rep Power: 0
|
|
|
Would it be safe to assume new computers will come with driver to run MS Access databases if they come with windows?
|
|

06-26-2009, 01:48 PM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 17
Rep Power: 0
|
|
After much research i have found out java can run other programs XD
So i downloaded MySQL 5.1 installer, and it refuses to do anything.
'error while setting up environment for the application'
So i downloaded MS SQL. When i open the .msi normaly the installer loads, when i try to get java to run it, the .exec command just freezes and the program stops.
|
Code:
|
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("SSCERuntime-ENU-x86.msi"); |
java.io.IOException: Cannot run program "SSCERuntime-ENU-x86.msi": CreateProcess error=193, %1 is not a valid Win32 application
Am i doing something wrong on the installer or can java just not run .msi files?
Cause using something like this would solve the problem of getting the drivers onto there computers.
Last edited by etherkye; 06-26-2009 at 01:54 PM.
Reason: Added error messages
|
|

06-26-2009, 02:30 PM
|
 |
Senior Member
|
|
Join Date: Apr 2009
Location: Chennai
Posts: 588
Rep Power: 1
|
|
|
Hi Etherkye,
Even Iam not able to run .msi files.I think only exe will run.
Eranga,
Any suggestions from your end?
-Regards
Ramya
__________________
Ramya
|
|

06-26-2009, 02:31 PM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 17
Rep Power: 0
|
|
|
Stupid microsoft making .msi installers...
|
|

06-26-2009, 06:58 PM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,504
Rep Power: 11
|
|
|
You have to look at two things here in this case.
1. Always specify the extension. I hope you've done it.
2. If you break rule one and you get error 193(even not in some cases), check for files with the same name as the one you intend to call. (error 193 actually means that what you are trying to execute is not a valid Win32 process)
Those errors are return by the Windows OS and pass to the Java application through the Java Native Interface. You can read more about those error codes in Microsoft official web site.
|
|

06-26-2009, 07:03 PM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 17
Rep Power: 0
|
|
|
Currently found a method to extract a zip file to the C drive, then to load class files from it. So i have a zip called EPOS_SQL which contains javaMXL and javaJ. Apprently javaMXL runs SQL database at runtime without installation. I suppost i better learn how to use them both XD
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 12:53 PM.
|
|