I'm planning on making a desktop application that stores hash values of files as the key, and the value is some metadata.
Should I use JDBC, or serialize a hashmap/table? I don't know anything about JDBC yet, so I'm not sure how to choose.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
I'm planning on making a desktop application that stores hash values of files as the key, and the value is some metadata.
Should I use JDBC, or serialize a hashmap/table? I don't know anything about JDBC yet, so I'm not sure how to choose.
JDBC is a tool to interact with a relational database...and a relational database is just that - its strength is in storing data across tables which can then be joined and queried in different ways. If all you wish to do is store key/value pairs, I'd say an alternative is to just store it in flat file format (I'm not a huge fan of serialization for saving data in this manner as it locks you into a particular implementation)
You could use java.util.prefs.Preferences if the metadata is simple. Have you designed for hash collisions?