I have a program which is constantly getting information from a website and is constantly updating. As of now I store all that information in an arraylist
and then when I am done I write it to a text file.
I need to manipulate that information; however, it creates a massive text file and I can't constantly read and write information to a text file because it takes too long. So someone told me to look into using a database. The only database I have ever used was a MySQL database for a website, never with java.
Is there any way to make a database local? As in only on my computer (don't want to pay for web hosting when I am the only one accessing this information at my computer)? I was looking a little bit into SQLite but one of the things I saw was that it does not allow concurrency. I'm thinking of multi-threading my program and having it read and write different sections at the same time. Is this possible?
Basically what I'm asking for here is:
It sounds like your friend is correct and a database would greatly help you improve performance.
*The API for accessing databases--e.g. sending queries and retrieving results--will generally be the same but JDBC can't hide differences in things like SQL. If you use an ORM like Hibernate, it can usually make it much easier to handle all the little incompatibilities between databases.
You need embeddable Java database, e.g. HSQL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With