Reputation: 81
I was wondering what the easiest and smartest way to organize data for easy retrieval and manipulation. I am creating a program in Java that will keep track of employee information, such as names, number, address, phone numbers, etc. The obvious solution would be to save the information in a text file, but that doesn't seem very smart or elegant. I was looking at databases, but they seem like overkill, since this information will only be accessed by one person at a time.
Upvotes: 0
Views: 1174
Reputation: 185
Answering this kind of question is always like trying to answer, "what kind of car should I buy?" without more information on your needs.
Are you building a desktop application? Web application? Terminal app? What kind of information will you be storing? How much? Etc.
Databases arent anything to fear, to be sure, they can offer structured data storage in an easily retrievable and reliable format. You can also look into embedded databases like HSQL or SQLite or non-relational models like MongoDB (best if you use highly unstructured data).
But I would suggest you share a bit more information on your needs first, then we might be able to tell you if you need the SUV or the sedan.
Upvotes: 0
Reputation: 234795
Databases are not overkill. They're great for organizing data even for embedded systems. (Take a look at SQLite, for example.) Other possibilities, depending on how much data you're talking about, are XML files (for which there are several APIs you could use) and Properties persisted to files.
Upvotes: 4