Results 1 to 9 of 9
  1. #1
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default Embedded Database ?

    Hi,

    I'm developing Swing application that uses database. Currently I'm using MySQL server for database, where I have to configure server IP, port number, user name, password and database name.

    The problem is :
    I will be distributing this application to my friends, and they won't be having MySQL installed. Nor saying to install MySQL and configure application property in there computer is good idea.

    What I'm looking is for embedded database or compact version such that whoever use this application need not to configure database. Just copy zip of this application and paste in his/her PC and run there.

    Any suggestion is welcome and thank-you.

    -Regards

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    I like the "H2" database. H2 Database Engine (redirect) Their documentation on their site is very complete, and there are example web application context start up listeners you can install into your web.xml to have the embedded database started within your web applicaiton. I have even placed H2 databases inside my WEB-INF in the web application.

    Another popular and more mature embedded database is the "hypersonic SQL" database. It also has many of these features.

    Others include that Java DB (e.g. Apache Derby) that is actually usually bundled with Java run times 1.6 or later.

    Of all these, I prefer H2 though for its SQL completeness and similarities with MySQL . and the simplicity of many features (e.g. web admin console, optional server mode process to boot it up on network port if you want to, and jdbc driver) all in a single .jar file.

  3. #3
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Thanks for the reply travishein.
    I looked at 'H2' site and soon will be trying it, hope it will meet my requirement.
    And yeah, I totally forgot about Java DB, I should give it also a try.
    I will report further progress.

    -Reagrds

  4. #4
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Hi,
    H2 database, when I went thru it, my first thought was "Is it only for web-apps. Can I really use it in my desktop apps?".
    What i really liked about H2 is, it's small and easy to configure. But I don't think its that DB which I was looking for.

    But what i came across while searching the WEB, I can use files to store data instead of DB, as data security isn't that importance. What I want is to store data in some proper ways and retrieve in same manner.

    But still there is some confusing regarding which to choose (DB or file)? Which is better suited, when I will have couple of hundreds data? I mean i'll have person name, tel no, address etc as data.

    -Regards

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,225
    Rep Power
    20

    Default

    If you need to search the data then I'd suggest a db.
    What was wrong with H2?

  6. #6
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Tolls, thats a good point. I definitely have to search data.
    And nothing wrong with H2, just that I'm not well custom to it.

    - Regards

  7. #7
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,762
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Prajin View Post
    Tolls, thats a good point. I definitely have to search data.
    And nothing wrong with H2, just that I'm not well custom to it.

    - Regards
    Why not have a look at JavaDB (Derby); as already mentioned it comes with your Java 1.6 JDK distribution and is an ordinary, fully compliant SQL 92 database engine. It comes with two drivers: an embedded one and a network driver. Give it a try; the distribution comes with full documentation and is a breeze to set up.

    kind regards,

    Jos

  8. #8
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Yeah, I'm giving a try with JavaDB for couple of days, just some test is left.

    -Regards

  9. #9
    Join Date
    Sep 2010
    Posts
    12
    Rep Power
    0

    Default Hi

    you can use h2 database H2 Database Engine , but you have to join h2 lib to project to access it's driver . so you can use sqlite SQLite Home Page

Similar Threads

  1. Insert and retrieve embedded Buttons from JTextPanel
    By peterme in forum Advanced Java
    Replies: 7
    Last Post: 01-20-2010, 11:57 PM
  2. Embedded Java Middleware in STB Technologies
    By neel_vk in forum Jobs Offered
    Replies: 1
    Last Post: 08-11-2009, 04:46 PM
  3. i need a IDE for embedded java
    By santhosh_el in forum AWT / Swing
    Replies: 2
    Last Post: 04-29-2009, 09:23 AM
  4. Replies: 1
    Last Post: 10-06-2008, 03:55 AM
  5. Extracting embedded files
    By kasturi in forum New To Java
    Replies: 0
    Last Post: 02-07-2008, 01:25 PM

Posting Permissions

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