How to sync mysql and indexeddb RRS feed

  • Question

  • Hi I am new to windows 8 Dev and need some clarifications and your guidance.

    How do I sync tables from my website's MySQL database with indexedDB on the windows app. 

    Would a simple JavaScript functions to open MySQL, extract and update indexedDB be sufficient? 

    How should I send the tables from the MySQL database on the website to the windows app?

    How can I automate this every time the app is run?  I kind of know this but whats the best method.

    Tuesday, April 15, 2014 6:05 AM


  • Hi Riz,

    There is no standard answer to this since it depends on many factors.  If you 'bing' search database concurrency and synchronization you will see several answers that depend on what you want to achieve and the nature of the data.  I personally would update when the application starts and read only the rows from the database that have been changed since you last updated the database.  You would need to store (in application state) the 'last date time synchronized' and send that to the database (or use it in a query) and make a request for records changed since then.  However this gets SUPER complicated quickly for joined tables and the like.  You can do this update the same time you get your application state as you know the app is initializing at that point.


    I would analyze the data you are thinking of synchronizing to determine what would work best for your scenario and data.

    Sync and save the date/time of last sync in you application state

    Perform your update (async) on startup after you retrieve your application state.

    Perhaps give the ability to manually sync with an icon (again depending on the nature of your data/app this may or may not be desirable.


    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Tuesday, April 15, 2014 12:30 PM