Results 1 to 14 of 14
Thread: What database shall i use?
- 06-25-2009, 10:20 AM #1
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, 10:32 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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, 10:38 AM #3
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, 10:41 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 06-25-2009, 10:51 AM #5
Member
- Join Date
- Jun 2009
- Posts
- 17
- Rep Power
- 0
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, 12:22 PM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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, 12:25 PM #7
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, 12:58 PM #8
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 06-26-2009, 09:58 AM #9
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, 12:48 PM #10
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.
java.io.IOException: Cannot run program "SSCERuntime-ENU-x86.msi": CreateProcess error=193, %1 is not a valid Win32 applicationJava Code:Runtime rt = Runtime.getRuntime(); Process p = rt.exec("SSCERuntime-ENU-x86.msi");
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 12:54 PM. Reason: Added error messages
- 06-26-2009, 01:30 PM #11
Hi Etherkye,
Even Iam not able to run .msi files.I think only exe will run.
Eranga,
Any suggestions from your end?
-Regards
RamyaRamya:cool:
- 06-26-2009, 01:31 PM #12
Member
- Join Date
- Jun 2009
- Posts
- 17
- Rep Power
- 0
Stupid microsoft making .msi installers...
- 06-26-2009, 05:58 PM #13
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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, 06:03 PM #14
Member
- Join Date
- Jun 2009
- Posts
- 17
- Rep Power
- 0
Similar Threads
-
database
By kswiss in forum AWT / SwingReplies: 0Last Post: 03-26-2009, 11:51 AM -
help with database
By fahien_akim in forum NetBeansReplies: 0Last Post: 03-07-2009, 01:44 PM -
How to convert access database to mysql database?
By vrk in forum Advanced JavaReplies: 2Last Post: 02-11-2009, 04:43 AM -
database insertion
By abhiN in forum New To JavaReplies: 0Last Post: 01-17-2008, 07:24 AM -
Database in a PDA
By percivalwcy in forum JDBCReplies: 2Last Post: 08-08-2007, 03:10 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks