OpenNumismat / open-numismat

OpenNumismat, is intended primarily for registering a collection of coins. But it is also suitable for other types of collectibles - stamps, postcards, badges and more exotic things.
http://opennumismat.github.io/
GNU General Public License v3.0
94 stars 27 forks source link

[Feature Request] Add ability to use a remote SQL / MariaDB Server #73

Open aries223 opened 1 year ago

aries223 commented 1 year ago

Adding the ability to use a centralized SQL / MariaDB database server would give users the ability to have your coin/currency collection be current on any machine you use ON on. For example, Father/Son can build a collection together and share the same DB on their individual machines. Or multiple users at a coin shop can access the ON database on their individual machines and edit the collection as needed. etc...

Currently ON uses a local SQLite database, this means each users machine will have its own unique databases (coins) different from each other. To have the ON databases match on multiple machines one would have to copy the database files to each machine every time a change is made on one machine.

Here is an example of a remote DB connection in an applications prefs that the user would fill in:

on-db-ex

NEKolev commented 1 year ago

I'm not a developer, but a workable alternative is not to upload to the cloud. That way the database would be available at all locations, security from data loss, etc. In principle you could do integration directly with the OpenNumismat Google Drive API with Python. I don't think it's easily doable changing the SQL database engine.

aries223 commented 1 year ago

Wasn't thinking about a remote cloud, but more of an onsite instance of SQL/MariaDB. Its simple enough to spin up a local Ubuntu VM running SQL/MariaDB and then all machines with ON connect to that. (Thats the reason I used a RFC1918 address in the screenshot above).

JanisV commented 1 year ago

This is in the plan, but is unlikely to be implemented. A centralized DB will be slow and it's not a popular feature. I'm leaning more towards a web-server that will use the existing sqlite.

aries223 commented 1 year ago

I doubt it would be slow.. I have a VM running MariaDB/Redis serving multiple instances of DigiKam with 10,000's of images in the DB. Not slow at all.

I guess a web-server / sqlite is sort of the same thing...

NEKolev commented 3 weeks ago

Interesting article that may be of use Optimizing SQLite for servers