I want to make a program in C #. The essence of the program is to download a list of goods from the Internet and then work with it locally. (Already there will be no connection to the Internet) + then (in a day, a week) the user connects to the Internet and saves his changes.

The procedure is clear to me:

  • Get a database dump from the server (MySql database on the server)
  • Save data on the user's computer
  • Work with goods locally.

Then

  • Create database dump
  • Send to server
  • Save to server database

Now to the questions:

  1. I just started learning C # and opened the video tutorials. And they use MS SQL there. Everything is clear with it, there are no problems, BUT (as I understood it), for the operation of this database, it was necessary to install MS SQL Server. To develop it, there is no problem to install it, but the user who receives the ekzeshnik will not have a server to pick up the database ... How to be here? Use SqlLite? Or the user will not need to do anything.
  2. How to transfer data from one database to another? Is making a direct connection safe? Or take just a text dump of the database from the server?
  3. The user will receive their data by login and password. I can check the login and password for the first time (there is a connection to the Internet). And how then to check the user login (When starting the program you need to check, even if there is no connection)? Save locally and compare? How to save a pair (login, password) locally and safely? I think in simple txt at the root of the program is not very correct.

    1 answer 1

    I had a similar task. There is one remote base, the main one, from which it was necessary to take data, change it locally and send it back to the main base. I did so.

    Created a local sqlite database - does not require any server settings. Created a similar table structure in it. Pulling data from the main base in his. Changed, then sent back.

    I can check the login and password for the first time (there is a connection to the Internet). And how then to check the user login (When starting the program you need to check, even if there is no connection)? Save locally and compare?

    In sqlite you create users and for them you configure authorization. Without internet connection.