Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to connect two or more pyqt5 desktop apps to one database locally or remotely

How to connect two or more pyqt5 desktop apps to one database locally or remotely

Scheduled Pinned Locked Moved Unsolved Qt for Python
8 Posts 2 Posters 694 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LT-K101
    wrote on last edited by
    #1

    I have developed a pyqt5 desktop application using sqlite as database and installed for 5 users with each user having a separate database. Is it possible to point all five users to one database because I want to avoid backing up the database file everyday for each computer locally or remotely networked?

    JonBJ 1 Reply Last reply
    0
    • L LT-K101

      I have developed a pyqt5 desktop application using sqlite as database and installed for 5 users with each user having a separate database. Is it possible to point all five users to one database because I want to avoid backing up the database file everyday for each computer locally or remotely networked?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @LT-K101
      Do you mean they should be able to write simultaneously to one database stored on a shared network drive (not what SQLite is for, why not MySQL server etc.?), or do you mean just each have their own database files separately as now but physically on a network share to simplify backing up?

      L 1 Reply Last reply
      0
      • JonBJ JonB

        @LT-K101
        Do you mean they should be able to write simultaneously to one database stored on a shared network drive (not what SQLite is for, why not MySQL server etc.?), or do you mean just each have their own database files separately as now but physically on a network share to simplify backing up?

        L Offline
        L Offline
        LT-K101
        wrote on last edited by
        #3

        @JonB Yes exactly, they should be able to write simultaneously to one database stored on a shared network drive.

        JonBJ 1 Reply Last reply
        0
        • L LT-K101

          @JonB Yes exactly, they should be able to write simultaneously to one database stored on a shared network drive.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @LT-K101
          Then I would use a database designed for that.

          L 1 Reply Last reply
          1
          • JonBJ JonB

            @LT-K101
            Then I would use a database designed for that.

            L Offline
            L Offline
            LT-K101
            wrote on last edited by
            #5

            @JonB Is there any tutorial for this please? I have checked online but I have not chanced on any tutorial.

            JonBJ 1 Reply Last reply
            0
            • L LT-K101

              @JonB Is there any tutorial for this please? I have checked online but I have not chanced on any tutorial.

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @LT-K101 Tutorial for what? Knowing that SQLite is not suitable for what you want (unless you don't care about efficiency) is fundamental to SQLite, nothing to do with Qt.

              L 1 Reply Last reply
              1
              • JonBJ JonB

                @LT-K101 Tutorial for what? Knowing that SQLite is not suitable for what you want (unless you don't care about efficiency) is fundamental to SQLite, nothing to do with Qt.

                L Offline
                L Offline
                LT-K101
                wrote on last edited by
                #7

                @JonB Thanks for the heads up

                JonBJ 1 Reply Last reply
                0
                • L LT-K101

                  @JonB Thanks for the heads up

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #8

                  @LT-K101
                  Just so you know. I wouldn't use SQLite for this, but if for whatever reason you wish to stick with that I read somewhere that one "can" have it multi-user-writes but every write (transaction?) locks the database from other processes trying to write (I don't know whether they wait or fail). Also from my experience shared locks across machines/network are slow. It might be tolerable if your write-lock contentions are infrequent. You would have to test, and make sure the separate SQLites properly see each other's changes.

                  The "best" solution is a single SQL server (e.g. My SQL) running on the same machine as where the database files are located.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved