I'm writing a credit card applicatoin that I wish to store, retrieve, sort, and check data. I'm using Java and that i possess the GUI plus some functionality written already however i have no clue how you can store data in Java. I've done a really bit of use SQLite after i was writing an application for my android phone and was searching for something of that nature maybe.

I have to store information that's associated with one another, for instance think about a previous address book. The title, address, telephone number, current email address, etc. could be associated with one another and match for just one entry within the address book. Similarly I have to store a lot of data in by doing this and have the ability to search it for needed data. I'd like to have the ability to retrieve the information in a way that I possibly could obtain the address value for "title".

I have to be aware of simplest way to do this. After googleing it I discovered info on Java DB but I'm not sure if this is just what I'm searching for or using it.

Please answer by supplying me with info on things to use to keep the information and when possible point me in direction of a tutorial regarding how to utilize it.

Thanks.

---------------------------------------EDIT--------------------------------------------

I appreciate the assistance however i am still not setting it up. I wish to use SQLite and that i adopted the hyperlink that Kristian Antonsen gave and that i downloaded the SQLiteJDBC factor but now i'm lost. I'm clearly in new territory here and completely lost.

Can someone produce an "idiots guide" regarding how to make use of this and have great results during my application?

Many thanks.

A simple and simple to use database you should use is db4o. The positive thing about db4o is you can store common Java objects inside your database! You don't need to map these to tables and back!

Alternatively, if you want to make use of the SQL language (much like SQLite), you should use H2DB. JavaDB, can also be an alternative choice. Each of H2DB and JavaDB can be used embedded databases and distributed together with your application.

If you choose to use SQL, you have to learn JDBC (Java Database Connectivity). It allows you talk to the SQL database of your liking. If JDBC appeared too level for the taste, you'll be able to learn JPA (Java Persistence API).

However, IMHO, unless of course proven otherwise, db4o appears the best choice to use situation and situation for me.

To be able to use SQLite, try after this discussion: Java and SQLite


That old version (In my opinion still it holds):

The Simplest Way: serialize your computer data object on exit, p-serialize it on startup. For any sample application, prototype, or perhaps a quick test drive it works miracles, and doesn't require much coding.

For downvoters: yes I actually do make use of this approach each time I have to begin with something. I don't have to worry about particulars, and that i know I'm able to change my persistence layer afterwards. It will assistance to postpone important storage choices until I understand what type of data I've.

More difficult way would involve a database, but that needs an effective data design—if you do not share it, it's difficult to recommend anything specific. The reasonable options might be SQLite, mySQL, MongoDB or just about any database. What fits better inside your situation is difficult to express.

I must support Kristian Antonsen on his comment because HashMaps are the most useful approach to store data in Java. If you wish to store data in alphabetic order, TreeMap may be the easier way.

Apart from what Kristian Antonsen already pointed out, I ought to also mention Hibernate. I simply lately selected up by dealing with a number of YouTube videos for example this playlist

From things i collected, it's a better solution that's built on the top of JDBC (which may be tiresome).

I recommend you decide according to what any project needs and also the time you've.