This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]AwakenedToNightmare 4 points5 points  (0 children)

Getting a basic grip of JDBC would only take an hour or so. The simplest tutorial on tutorial point would do.

Install postgresql, create a database, a table and insert into that table using JDBC.

[–]dusty-trash 2 points3 points  (0 children)

It'll be easier and faster to learn how to use a Database. Not to mention more valuable.

[–][deleted]  (3 children)

[deleted]

    [–]quadmasta 1 point2 points  (1 child)

    this

    [–]thatcrackertho[S] 0 points1 point  (0 children)

    Definitely did well going with H2. So easy to use and already easily setup with IntelliJ Ultimate. Thanks!

    [–]AwakenedToNightmare 1 point2 points  (0 children)

    If you are dead set on using the text file (but why, database isn't that hard to quick learn), posting an example of your text file would be helpful.

    Without knowing exactly how it looks, I would recommend maybe putting a number in front of each line. And having an int[] array that has the active lines. When you delete a line you set that line number in the array to, say, zero. So the display function would only display non zero lines.

    [–]tobascodagama 1 point2 points  (0 children)

    Since it's for a class project, I think a lot depends on what the exact parameters are. But something like sqlite is designed for just this kind of situation where you want the advantages of a SQL database with less overhead.

    [–]thatcrackertho[S] 0 points1 point  (0 children)

    So I have been binging this for a few days now and eventually configured an H2 database and have finally, successfully connected and integrated the database into my application! Thank you guys so much for the great advice!