Let it be clear that in this answer I am talking about purely desktop applications. I am not talking about client server where the client is an executable to run on the desktop and the database will be on the server for access by multiple clients.
In the client/server scenario the desktop application will be installed separately from the server, so the question would not fit.
The scenario described in the question is for applications standalone, where the database is closely linked to the executable and will only be accessed by it.
Mysql
Without many details it is not easy to give an accurate answer, but in a general way it is not worth using Mysql for a desktop application like this. Then the other questions would not make sense. Of course has to install together, but should not.
- Mysql needs to be installed, a lot can happen wrong in this process. Not to mention the size that should go along with the application.
- And you have to keep running. It takes up a lot of memory. And unsuspecting users can easily compromise their operation when they detect weird things on your computer (it can run on demand, but it doesn’t help much and can bring other problems).
- It’s common to need maintenance, and it’s not that simple.
- It is a cannon to kill bird. Much of what it offers is not necessary in this scenario.
- There may be other problems in specific scenarios. For example, there may already be a Mysql on the machine for something else. You would have conflict or you would need to be prepared to deal with it, which is too much for something that should be simple.
Sqlite
- Sqlite is the standard database for desktop applications (not servers).
- It can do essentially everything that Mysql can. The difference is that it is not a server (great in this case), and that it cannot do a lot of really simultaneous writing as big as Mysql, but the difference is not brutal and on the desktop this should not occur, on the contrary, it will probably only be necessary to write one at a time.
Information about the additional component you need to attach to the project for your use can be obtained from official page of it. You don’t need to install it, it becomes part of the application.
The Nuget packages found on the download page are easier to handle.
Contrary to what some people think, Sqlite can also be used, and I use successfully, in client/server scenario (has my answer down showing how), but then may not be the most suitable solution. See more about its use.
If you have specific questions, ask them in individual questions.
I have seen around using software installers (INNO SETUP and etc) and together, with these installers the databases and etc. Now, relational databases should be taken care of. If on the client’s machine there is no installed one, the installer will install it, but it is necessary that whoever is purchasing your system has an understanding to follow the installation. I don’t know if it would be a good one. As for Sql Lite, I don’t know.
– pnet
You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? Something needs to be improved?
– Maniero