Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Ways of accessing databases?
Forum Updated to NodeBB v4.3 + New Features

Ways of accessing databases?

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 3 Posters 1.7k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    adutzu89
    wrote on last edited by
    #1

    Since I did not found a way to succesfully build and load qmysql driver for android app, and webkit is not supported in android, are there any other ways of accessing sql databases?(MySql in particular).

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      The recommend way to access a database from such a device is the use of a web service. You don't want to have your MySQL server opened on the web.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        leon.anavi
        wrote on last edited by
        #3

        [quote author="SGaist" date="1399405485"]The recommend way to access a database from such a device is the use of a web service. You don't want to have your MySQL server opened on the web.[/quote]

        +1 for a web service that acts as an API to access and manage the data at the database seems the best option in this case. Results returned like JSON or XML can be easily processed from the mobile app.

        http://anavi.org/

        1 Reply Last reply
        0
        • A Offline
          A Offline
          adutzu89
          wrote on last edited by
          #4

          I've started on using network classes on retrieving data from a webserver, but can someone explain me why is it so risky to open a remote connection through mysql driver?

          I mean as novice a,for me, is a bit strange as I've seen several posts around forums that the best choice is a web server instead of direct connection, yet I didn't saw any explanations about it.

          Thank you.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            It basically boils down to that: would you like anyone to try getting access to all the data you have in your database ? Run any and every MySQL command against it ?

            Using a web service, you have a (hopefully) well defined API that only offers the operation what you want your user to have. What database system you use (MySQL, PostgreSQL, NoSQL, csv etc..) is hidden behind the service, so you can also change the backend without having to rewrite your application and deploy it again. Furthermore, this allows you to write client for platforms that don't have a native client.

            Rule of thumb is only use direct database access when you're in a controlled environment. Otherwise don't, security of your data is also at stake.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • A Offline
              A Offline
              adutzu89
              wrote on last edited by
              #6

              You got a point there, I thought about it but want it to make sure. Thank you for your explanation.

              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