javascript - How to save data locally
仅有的幸福
仅有的幸福 2017-06-05 11:12:44
0
3
515

Recently I encountered a requirement when writing a desktop software using electron: to save the data filled in by the user locally. My usage is to save the data locally in the form of a file, but I encountered a problem. The more you save, the bigger the file will be, like this. The speed of reading files will become slower and slower, and the files must be re-read every time, which is really slow. . . So I would like to ask all developers, how can a desktop software save data locally? Is there any kind of database that can be integrated into the software and then the software can be used?

仅有的幸福
仅有的幸福

reply all (3)
phpcn_u1582

indexeddb

    阿神

    sqlite
    Highly recommended

      为情所困

      For this problem, it depends on your data volume. For data that is not particularly large, you can use SQLite or divide the data file into multiple files to store, and create an index for each file. Here you can refer to the inverted index, and then fetch the data When doing so, use relevant algorithms to locate the corresponding file and retrieve the data.
      ,,,,,,,
      For a large amount of data, you need to change the design plan and take advantage of nosql type databases, such as redis and hbase.

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!