Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How should I save user data to server so that other users can view it? Is a DB overkill? 🌾



  • I want to make a sort of Rubik's cube type thing out of ListViews and QStringListModels. I want the users to be able to add to these lists. What are the various options? Should I come up with a custom protocol or just use a DB? Are graph DB's supported?

    Also why use a DB? I never understand this point. Why not have a server running or do a peer-to-peer architecture that simply saves stuff to files?

    The string lists will contain many smallish strings such as:

    "Hom", "F", "G", etc

    or "A_1, A_i, A_j"

    or "i-1, i, i+1, i+2, i+3, ..."

    Usually not much bigger because the listviews will be tightly side-by-side so that the whole picture like "Hom_G(E_i, A)" is created compositely out of the many Rubik's cube-like ListViews. The user then scrolls through them sort of like how the Alarm clock time is set on the iPhone.

    There could be thousands to millions of things in a list, and some of the lists are generated on-the-fly or as-needed for example "i+1, i+2, ...".

    It's a mathematical "Rubik's cube". However, your next question might be how are various things connected relationally. That I haven't figured out yet, so maybe that's why I would need a DB.

    Any suggestions welcome.


  • Lifetime Qt Champion

    @enjoysmath said in How should I save user data to server so that other users can view it? Is a DB overkill? 🌾:

    Also why use a DB? I never understand this point.

    Because then you will automatically have the server which can be accessed by the clients. And you will have transactions to make sure parallel write access does not break your data. Also, SQL databases (I guess you mean such databases if you write "DB") give you very powerful query language. Not sure you need that for your project.

    To me your use case doesn't sound like you need a relational database. You probably can simply have a shared drive where the clients read/write the files.


  • Lifetime Qt Champion

    @enjoysmath said in How should I save user data to server so that other users can view it? Is a DB overkill? 🌾:

    Also why use a DB? I never understand this point.

    Because then you will automatically have the server which can be accessed by the clients. And you will have transactions to make sure parallel write access does not break your data. Also, SQL databases (I guess you mean such databases if you write "DB") give you very powerful query language. Not sure you need that for your project.

    To me your use case doesn't sound like you need a relational database. You probably can simply have a shared drive where the clients read/write the files.



  • @jsulm Thank you! That makes a lot of sense. I will go with a SQLite database (or whatever is simplest).


Log in to reply