What is the best solution for storing user application data locally?

I am adding contact functionality to my program, and I want to save the contact list for each individual user, what is the best solution for this? I am new to XML and databases, and I don't know what would be better, or if there is a database solution that is stored locally.

+3
source share
3 answers

It depends on which platform you are targeting, and the size and complexity of the data structures you want to keep. Obviously, an open and easy-to-read format, such as XML or JSON or something else, is preferable, but things like a SQLite database or even a custom save format may be suitable for larger applications.

So, the most important things to consider are:

  • Support for your platform / language of choice
  • The importance of human readability / hacking (can be desirable or very undesirable, and note that this also affects the ability of third-party developers to create applications that consume your stored data).
  • The size
  • Speed โ€‹โ€‹of access to data (with a potential compromise, how much memory will be required to load all this into memory at once)

, , , . SQLite , , / ( ), , ( sqlite ), .

+6

. SQLite, , . .

EDIT: , #, System.Data.SQLite.

+1

Well, it's all about the nature of your data:

  • CSV, XML, JSON if it is a configuration file
  • SQLite if is database oriented data and you need to search

What language do you use?

+1
source

Source: https://habr.com/ru/post/1743438/


All Articles