Results 1 to 5 of 5
  1. #1
    skania is offline Member
    Join Date
    Jun 2013
    Posts
    15
    Rep Power
    0

    Default Flat File Database for Java

    Hey guys, I've been hitting Java pretty hard in the past week, and am currently working on a small project to get familiar with different ins and outs of Java. I have done some tinkering with databases, so I am a little familiar with SQL, PHP, GDBM (in C). In my current project, I am developing a very mind-less game (completely text-based). In the game, would like to have quick access to dozens of items, and objects so I figured now would be as good as time as any to get familiar with a database.

    I have started with using Java to connect to a wamp server on my desktop, but would really like the database to be stored locally (on a flat file) so that I can move the game to a different platform without needing to install additional software.

    After googling for a bit, I can't seem to find an answer for a good flat file database that would let the program transfer from platform to platform and still be able to execute without other software.

    Does anyone have any knowledge of how I can achieve this with Java? Is there a particularly better flat file database than all the rest? Any input/direction would be appreciated! (Also tutorials would be magnificent!)

    Thanks!

    /edit: I'm developing in Eclipse, so anything that is built in NetBeans is still a little out of reach for me :)

  2. #2
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,664
    Rep Power
    5

    Default Re: Flat File Database for Java

    If you must use a database, use an embedded Java database. I recommend to use H2:

    H2 Database Engine

    Disregard the installer that you can download, to use H2 you need nothing more than the jar on the classpath. The trouble with a database like this however is that the file structure is very readable, making it possible to tinker with those files outside of your application/game.

  3. #3
    skania is offline Member
    Join Date
    Jun 2013
    Posts
    15
    Rep Power
    0

    Default Re: Flat File Database for Java

    Thank you. I saw H2 mentioned in one of the sites I looked at, but it was only the link, not explanation. I'm not too worried with someone tinkering with the program, it's just a little project to help me really get a solid understanding of java.

    I really appreciate your input.

  4. #4
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,664
    Rep Power
    5

    Default Re: Flat File Database for Java

    I don't see how a database is going to help you understand either the Java language, the Java tools or the Java platform, but whatever floats your boat!

  5. #5
    skania is offline Member
    Join Date
    Jun 2013
    Posts
    15
    Rep Power
    0

    Default Re: Flat File Database for Java

    I've already learned a lot of the basics of Java, classes, methods, members, ect. I just want to expand into databases and then sockets/networking, ect.

Similar Threads

  1. Replies: 0
    Last Post: 01-17-2012, 08:25 AM
  2. Replies: 4
    Last Post: 05-27-2011, 04:13 PM
  3. Creating a flat tool bar with images
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-02-2008, 08:10 PM

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
  •