HSQLDB:内存表和数据丢失

时间:2022-02-08 03:45:02

Situation: memory table is created and database is used as file:. As I understand this case all data must be contained in .script file. My question is what happens if hsqldb after some inserts is closed not in a proper way? For example someone pushes power button on server box.

情况:创建内存表,数据库用作文件:据我所知,所有数据都必须包含在.script文件中。我的问题是如果某些插入后的hsqldb以不正确的方式关闭会发生什么?例如,某人按下服务器盒上的电源按钮。

The core of this question is when does hsqldb save data to file when memory tables are used.

这个问题的核心是当使用内存表时hsqldb将数据保存到文件的时间。

1 个解决方案

#1


1  

There is also a .log file that records all the INSERT, UPDATE and DELETE statements. When the database is restarted, the .log file is read and the data is restored to the point of power loss.

还有一个.log文件,记录所有INSERT,UPDATE和DELETE语句。重新启动数据库时,将读取.log文件,并将数据恢复到断电点。

#1


1  

There is also a .log file that records all the INSERT, UPDATE and DELETE statements. When the database is restarted, the .log file is read and the data is restored to the point of power loss.

还有一个.log文件,记录所有INSERT,UPDATE和DELETE语句。重新启动数据库时,将读取.log文件,并将数据恢复到断电点。