H2 in-memory database usage instructions

An introduction to
H2 database H2 database is an open source in-memory database. It is completely written in java, and the size of the jar package is only about 1.5M, which can be easily added to the project. At the same time, you can access the database through a browser to perform data addition, deletion, modification, and query operations.

Two H2 database related information
H2 database has an official website http://www.h2database.com/. There are more detailed h2 information above. Download the zip package on the homepage of the official website. After unzipping, you can get the latest jar package, source code and documentation of h2. Visit the faq page of the h2 official website: http://www.h2database.com/html/faq.html to solve common problems encountered during the use of h2.

3. Accessing the H2 database through a browser The
   H2 database can be accessed through a browser to perform data addition, deletion, modification, and query operations. Double-clicking the h2 jar will open a browser window. As shown in the following figure: The


 
above jdbc url, user name and password are all default and can be modified according to the actual situation. The H2 database file is stored in C:\Users\current user directory\test.mv by default. The jdbc url, user name and password in the above figure are the configuration for accessing this default file.
   After the connection to the H2 database is successful, as shown in the following figure:


 
Click the table name on the left to generate the sql for querying the table by default, and some common operations can be performed by viewing the prompts on the page.
The overall operation is similar to the normal database client operation.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326938528&siteId=291194637