1

my current task is to enhance an already active web application with Permissions. for doing so I need to persist multiple tables:

Users
groups
Roles
Products

and more.

I will have small amounts of data, (a few dozen lines) but multiple tables. the question is, what is the best database to use in such a scenario? thought about h2 since its in-memory and can save images in case the server is down not all of the data is getting lost.

1

H2 Database Engine does sound like a good fit for your needs.

You can run H2 either “embedded” meaning available only within one app, or as a server accepting connections from one or more apps.

However, you should not be running it as an in-memory database. That mode is for special needs where speed is paramount and you don’t care about losing your data. For example, running tests during software development.

Your case is not special. You definitely care about saving your data. Speed performance is not an issue for a small dataset infrequently used. The job of the database is to efficiently handle exchanging data with clients while managing caches and writing to storage. Even if speed was a concern, saving your business data is paramount. So run H2 in persistent mode, not in-memory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.