0

Relevant info: Using Python3, mysql database and mysql connector package for connecting to the database. I have a program that uses database to get info that it needs and to write to it. On my machine it works well because I'm connected to the local host but on another machine it won't work. Because program will use real server someday, I want to, if program doesn't have access to the server to use copy of a database that will be stored in his files. I'm new to databases and I can't seem to find any remotely relevant info on this. Help on how can I do this or point me in the right direction where to look, thanks.

  • What have you tried so far? Where are you stuck? Be warned that this is a heavy task, as you have to deal with merging datasets. In case one of your users edits one row while being offline, and another one edits the same row, how would you ensure that the proper data is stored when the first user goes online again? – Nico Haase Oct 19 '22 at 10:12
  • What you want to do is called [database caching](https://en.wikipedia.org/wiki/Database_caching). Look it up and you should find tips and strategies. [Here is an SO question asking about doing it in python](https://stackoverflow.com/questions/9972351/caching-database-data-in-python) Hope this helps! – NotYourName Oct 19 '22 at 10:08

0 Answers0