Results 1 to 14 of 14
  1. #1
    etherkye is offline Member
    Join Date
    Jun 2009
    Posts
    17
    Rep Power
    0

    Default 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.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    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.

  3. #3
    etherkye is offline Member
    Join Date
    Jun 2009
    Posts
    17
    Rep Power
    0

    Default

    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?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by etherkye View Post
    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.

  5. #5
    etherkye is offline Member
    Join Date
    Jun 2009
    Posts
    17
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    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?

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    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.

  7. #7
    etherkye is offline Member
    Join Date
    Jun 2009
    Posts
    17
    Rep Power
    0

    Default

    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...

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by etherkye View Post
    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.

  9. #9
    etherkye is offline Member
    Join Date
    Jun 2009
    Posts
    17
    Rep Power
    0

    Default

    Would it be safe to assume new computers will come with driver to run MS Access databases if they come with windows?

  10. #10
    etherkye is offline Member
    Join Date
    Jun 2009
    Posts
    17
    Rep Power
    0

    Default

    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 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 12:54 PM. Reason: Added error messages

  11. #11
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    805
    Rep Power
    6

    Default

    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:cool:

  12. #12
    etherkye is offline Member
    Join Date
    Jun 2009
    Posts
    17
    Rep Power
    0

    Default

    Stupid microsoft making .msi installers...

  13. #13
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    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.

  14. #14
    etherkye is offline Member
    Join Date
    Jun 2009
    Posts
    17
    Rep Power
    0

    Default

    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

Similar Threads

  1. database
    By kswiss in forum AWT / Swing
    Replies: 0
    Last Post: 03-26-2009, 11:51 AM
  2. help with database
    By fahien_akim in forum NetBeans
    Replies: 0
    Last Post: 03-07-2009, 01:44 PM
  3. Replies: 2
    Last Post: 02-11-2009, 04:43 AM
  4. database insertion
    By abhiN in forum New To Java
    Replies: 0
    Last Post: 01-17-2008, 07:24 AM
  5. Database in a PDA
    By percivalwcy in forum JDBC
    Replies: 2
    Last Post: 08-08-2007, 03:10 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •