what is H2 database ? and when we can use it?
Asked Answered
M

1

7

I've heard of the H2 database, but how does it work? I'm now scraping data from many websites and don't want to visit the same URL that I've already scraped. Is it possible for me to use the H2 database in that case?

Messaline answered 12/4, 2022 at 11:59 Comment(1)
From the h2 tag that you can hover over and read for yourself: "H2 is a relational database management system written in Java. It can be embedded in Java applications or run in the client-server mode. H2 supports regular disk-based as well as in-memory databases." Yes, it's possible to use H2 to save URLs.Snarl
E
6

H2 is an open source Java SQL Database. It can be run in both embedded and server mode. It is widely used as an In-memory database.

In-memory database relies on system memory as oppose to disk space for storage of data. Because memory access is faster than disk access. We use the in-memory database when we do not need to persist the data. The in-memory databases are volatile, by default, and all stored data loss when we restart the application.

If you want to persist the data in the H2 database, you should store the data in a file. To achieve the same, you need to change the datasource URL property in your application properties file.

Learn more about H2 here

Entomologize answered 12/4, 2022 at 12:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.