Results 1 to 6 of 6
Thread: Types of Data Persistence
- 09-25-2010, 03:05 PM #1Member
- Join Date
- May 2010
- Rep Power
Types of Data Persistence
I'm working on a program that I need data persistence with, and I was wondering what options I had?
I know that I can read/write text files but I don't feel that's the best method for the program I'm trying to create (something to help me keep track of credit card spending)
The only other method that I know for persistence is to use a database, but I was wondering one thing:
If I were to send the program to someone else to use, would they have to install a database program on their computer? If so is there any alternative to a database for storing information?
I don't quite understand how programs store data if it's not written in a plain text file, and not stored in a database.
- 09-25-2010, 03:13 PM #2
A lot more recent open office kinds of documents use a complicated XML type of file structure.
- 09-25-2010, 05:33 PM #3
One possible way is, if you don't like to keep a database on clients' PC, keep a central database in a server and communicate with it. But the problem is that all of your clients need to be connect to the internet. Best way to communicate is though web services, using XML streams.
- 09-27-2010, 01:27 PM #4Moderator
- Join Date
- Apr 2009
- Rep Power
I wouldn't recomend a central store, even if you aren't suppliyng this to clients and are only doing this for friends/colleagues. This is simply because financial data might be considered "sensitive".
Keep it locally, which you've already thought comes down to a database or some form of text file (either plain, xml, whatever). The decision on what to do there is then a case of what it is this thing is intended to do...and what your knowledge areas cover...and if you are using this as a learning exercise.
Me? I'd use a database, but then I know what I'm doing in that field, and I could probably code it faster than xml, which would be my second choice (albeit a bit distant).
- 09-28-2010, 03:18 PM #5
I agreed that use of a central store is not a good idea, specially when you want to log transaction details. Have to use replicas within a distributed store. But maintaining that is not an easy task at all.
- 09-28-2010, 03:30 PM #6
- By Manfizy in forum New To JavaReplies: 2Last Post: 07-07-2009, 08:29 PM
- By Tshegofatsom in forum Advanced JavaReplies: 6Last Post: 05-15-2009, 03:30 PM
- By venkatteshb in forum New To JavaReplies: 1Last Post: 08-27-2008, 05:42 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 03-28-2008, 07:29 PM
- By bluekswing in forum New To JavaReplies: 4Last Post: 01-12-2008, 12:48 AM