So far, we’ve been keeping all of our data in memory, using data structures like ArrayList
and HashMap
. This is fine for small example projects, but it has a pretty huge downside: whenever your code is restarted (any time you make a change), all of your memory is reset and you lose all of your data.
This is a companion discussion topic for the original entry at https://happycoding.io/tutorials/java-server/databases