I am working on writing a program similiar to an address book. I am still in the design process. I want to have different pages a user can flip through. It will bring up the data for the particular person that page is associated with. I am not sure how to store this data. I could store it in a text file and load it every time but that doesn't seem like the best way. I think using a database may be best but i am not sure how this would all work. how to access it and write and remove from it in my program. Help greatly appreciated.
I could store it in a text file and load it every time but that doesn't seem like the best way
If you're trying to learn to use databases that's fine. However I'm not convinced that reading from a text file and loading the info into memory every time is not the "best way" in this scenario. What problems do you see with that method? [ August 21, 2004: Message edited by: David Weitzman ]
If you're curious to learn about accessing a database with a Java program, I'd recommend taking a look at the JDBC assignments of the JavaRanch Cattle Drive. That's how I got started learning it.
Seconding David. If you want to learn, fine, but if this is just about writing an application with relatively small data sets then XML serialization seems just the ticket.
- Peter
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Don't get me started about those stupid light bulbs.