Database Management Systems (DBMS) are popular as a uniform data storage, and they have become increasingly popular with proliferation of mobile and web development, where file systems are either not available at all, or have restricted access.
Such proliferation has caused certain bias to using DBMS (and specifically SQLite as a built-in DBMS on mobile platforms) as a universal solution to data storage needs.
However file systems are not the thing of the past. The advancement of mobile software brings back necessity of design templates similar to those on desktop systems. In particular, the need arises to use files and file-based approaches to management of heterogeneous information. So files are still in demand and they are more suitable for many classes of data management tasks.
Here I would like to discuss the use cases where the file system is more suitable solution than DBMS.
Data encryption is a complicated goal which is to some extent contradictory to the nature of DBMS. The database needs to know size and in many cases content of the data fields for operating efficiently. This limits flexibility in data management. Modern DBMS (mostly client-server ones) provide means to encrypt table fields, but on mobile devices these capabilities are absent. Also, field encryption doesn’t hide metadata and doesn’t disguise the structure of data and the number of entries. So each developer needs to invent his own encryption schemes, and proper implementation of encryption is a hard to achieve goal.
At the same time encrypting files and the file system in whole is trivial. SolFS and some other file systems implement on-the-fly encryption and decryption of files in streaming mode, so you (the developer) don’t need to care about this. Moreover, certain file systems, such as SolFS, support both whole-storage and per-file encryption and you can use different keys and encryption mechanisms for different files and the storage itself. And if you need to plug your own encryption (eg. certificate-based), this is not hard to do as well via callback mechanisms offered by SolFS.