Results 1 to 6 of 6

Thread: Java and database

  1. #1
    Join Date
    Jun 2009
    Posts
    53

    Java and database

    I'm developing a java application for my cousin who will be a psychologist. During the holidays, I was looking for subjects to learn because I'm not an expert in java, so I wanted to get ahead! My project is progressing slowly, normal, even when I started and then of course come back but not in a hurry.

    I created a picture of the system, in order to arrange the person (patient). Until then I can create and initialize all in graph no problem it works. The trick of course is that once the program is closed, the table in memory is destroyed, so it will not re-open it and I thought making a "database" using a file!

    For now, I use a .txt, I have my serialized class Person for the record, however, when the food that I can restore by typing the first line. Because that's the problem I have no way of knowing how many times I have to use the method "readObject ()" because at the beginning my program does not know how many people are registered in my text file!

    Therefore I wonder if you have a solution, I eventually thought of using the system database, so a key like "ID" (Person 1, Person 2 ,....) where I would have an ID to each person who corresponds to its location in the table ...

    You know what? How can I organize patient details in my text file?

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Java and database

    MySql is a free RDBMS and efficient especially for simple databases. The program runs as a server providing multi-user access to a number of databases. You can even find a lot of tutorials and faqs about the DBMS/MySQL. MySQL works on many different system platforms, including BSDi, FreeBSD, Linux, Mac OS X, NetBSD, Novell NetWare, OpenBSD, OpenSolaris, IRIX, Solaris, Symbian, SunOS, and Microsoft Windows.

  3. #3
    Join Date
    Nov 2008
    Posts
    1,185

    Re: Java and database

    There is a database management system dedicated to Java (and written in Java). It is not an independent server, but a library that it simply adds to his project that uses readily as any implementation of JDBC. This DBMS is called HSQLDB (HyperSQL DataBase). It supports nearly full ANSI-92 SQL (BNF tree format) plus many SQL:2008 enhancements. Additionally, it includes tools such as a command line SQL tool and GUI query tools.

  4. #4
    Join Date
    Jun 2009
    Posts
    53

    Re: Java and database

    Okay I'll see it! But I do not want an external database, I want here to stay on the pc. Clearly this should work without an internet connection, then, is that these solutions meet this criteria? And I suppose that this database will save a file to me to place, so surely at the root, but if I ever want to encrypt, what algo should I use?

  5. #5
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Java and database

    Yes the two solutions meet these criteria, you do not need an Internet connection. Why do you want to encrypt the file from database?

  6. #6
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Java and database

    Quote Originally Posted by DotNetUser View Post
    There is a database management system dedicated to Java (and written in Java). It is not an independent server, but a library that it simply adds to his project that uses readily as any implementation of JDBC. This DBMS is called HSQLDB (HyperSQL DataBase). It supports nearly full ANSI-92 SQL (BNF tree format) plus many SQL:2008 enhancements. Additionally, it includes tools such as a command line SQL tool and GUI query tools.
    The creator of HSQLDB embarked on creating a new database called H2. HSQLDB is no longer maintained it seems (to check) so if ever you incline to the solution I suggest you see H2 instead of. You just add a jar file to your project to use H2, then you do not need an Internet connection to access it. H2 is more efficient, I think it may be a good solution for your project.

    H2 features:
    * Very fast, open source, JDBC API
    * Embedded and server modes; in-memory databases
    * Browser based Console application
    * Small footprint: around 1 MB jar file size

Similar Threads

  1. Implement Simple Database using BST in Java
    By maxmidg412 in forum Software Development
    Replies: 2
    Last Post: 31-07-2011, 03:22 AM
  2. How a Java program can be connected through database ?
    By Chellam in forum Software Development
    Replies: 4
    Last Post: 09-12-2010, 08:41 AM
  3. Database generator for java
    By Miles Runner in forum Software Development
    Replies: 5
    Last Post: 06-03-2010, 01:56 PM
  4. Java in oracle 9i database
    By Gerri in forum Software Development
    Replies: 4
    Last Post: 03-02-2010, 08:35 PM
  5. Problem while database connection in java
    By Jagriti in forum Software Development
    Replies: 3
    Last Post: 17-11-2009, 11:32 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,565,093.85226 seconds with 17 queries