对于重要程度不是特别高的场合,可以大量使用SQLite库保存历史数据,平时用不到的时候只占硬盘,不占内存。
SQLite 文档还贴心地指出了什么时候用 client/server SQL 数据库(如MySQL):
- Is the data separated from the application by a network? → choose client/server
- Many concurrent writers? → choose client/server
- Big data? → choose client/serverOtherwise → choose SQLite!