Update remote mysql database from an online mysql database.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Neil Domingo
    New Member
    • Feb 2011
    • 2

    Update remote mysql database from an online mysql database.

    I have an online hosted website that uses mysql database.

    Now, what I am trying to do was to update my remote database. What I mean was, a different mysql database that is not online.

    I used php and mysql in my website and vb.net and mysql on the remote computer.

    I needed something of an update button on my vb.net application to synchronize my online mysql database with the remote mysql database.

    To give you a clearer scenario:

    I have an online grading system wherein the instructors in my school can upload the grades of their students. I also have a kiosk type stand within the school that the students can use to view their grades. The problem arises, how can I update the kiosks' database and gather data from the online database?
  • NetDynamic
    New Member
    • Feb 2011
    • 27

    #2
    If the kiosk has web access why not just run the script on the server thru a browser or application? Why have 2 db's?
    I have no idea what to suggest since you gave no details on how the kiosk even works.

    Comment

    • Neil Domingo
      New Member
      • Feb 2011
      • 2

      #3
      Hi NetDynamic! Thank you for the reply.

      "I have no idea what to suggest since you gave no details on how the kiosk even works."
      ->The kiosk simply displays the queried grades of the student that logged into it.

      "Why have 2 db's?"
      ->For the speed of querying purposes, I have decided to separate the kiosk database from the online database.

      "If the kiosk has web access why not just run the script on the server thru a browser or application?"
      ->Exactly the thing that I was asking for. Yes, the kiosk has web access to be able to update and synchronize its database from the online database.


      Take for example, antivirus in your system will update its database from its online source. How then can it be achieved?

      Can I rephrase my question? How can I connect my vb.net application into an online mysql database?

      Comment

      • dgreenhouse
        Recognized Expert Contributor
        • May 2008
        • 250

        #4
        I understand that you've invested time in the kiosk vb app, but you'd probably make your life easier if you operate the kiosk in "full screen" browser mode and have a student "read/only" access page running on the webserver.

        If you really need to maintain the vb/kiosk app, one possible solution would be...
        1- Create periodic csv files on the webserver via a cron job
        2- Create a scheduled task on the kiosk to download the csv to a temp location on the kiosk
        3- Modify the kiosk database with the downloaded data

        Other solutions/scenarios are possible, but would probably be more complicated.

        Other thoughts...

        I don't know what platform you're running on the webserver (PHP, .NET, etc.), but you could create a database abstraction layer on the webserver that does something like the following:

        1- Have a url specific to the update select records that have been updated/created since some defined time period
        2- The vb app does a request to a url on the webserver that then return records (probably as xml) to the vb app that then updates its local database.

        That way you don't have to worry about sending large volumes of data to the kiosk.
        Last edited by dgreenhouse; Feb 26 '11, 11:46 PM. Reason: Further thoughts...

        Comment

        Working...