Solved

Sqlite & Mysql Synchronization

Posted on 2008-06-19
5
3,677 Views
Last Modified: 2013-11-19
Hi,

I am developing a desktop internet enabled application in Adobe AIR with HTML & JavaScript. It will have a local database(sqlite) to store data. The application will also have an associated web site with data stored in MySQL.

I need to synchronize the data on the server and on the desktop periodically. Synchronization has to work both ways i.e. updated information on the server should be transmitted to the local database and vice versa.

Is there any in-built function/command/script that manages this synchornization both ways(local to remote & vice versa).
0
Comment
Question by:iilv
5 Comments
 
LVL 12

Expert Comment

by:lexxwern
ID: 21820732
You'll have to build a server side application that handles the synchronization. I fail to see how you could interact with the MySQL server using Javascript.

Another alternative could be to use Flex/AIR based MySQL drivers to directly access and update it. Check this out: http://code.google.com/p/assql/

- lexxwern
0
 

Author Comment

by:iilv
ID: 21821063
I am sorry. I forgot to mention that we would be using PHP to access
the server side database.

Therefore what I am looking for is a PHP script that compares and
synchronizes the two databases.
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 250 total points
ID: 21836378
"Is there any in-built function/command/script that manages this synchornization both ways(local to remote & vice versa)."

There is no connectivity at all between these two DB models.  Adobe likes it that way.

In PHP, you simply read the data from various fields into the database, and post them to MySQL fields.  It is simple in concept, but arduous in detail, since all fields to be copied have to be manually entered.  But once you put someone to the task of itemizing them all, then it will be simple in PHP.

Remember, if you change /add / subtract field names, those have to be changed in the PHP to work right.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 21858435
iilv:  There is no script that does what you want -- yet.  So good luck as you set about this task.  Here are some ideas that may lessen the burden.  Most data bases can export their tables along with a "create table" statement that can be used to recreate and reload the table.  Most data bases can do a "show tables" and "show columns" command - those can help you keep the data structures in sync.  Normally, you will want to know which of the data bases is authoritative for each table, and possibly for each field.  The authoritative data base would be the controlling element as you do the synchronization.  

Good luck!
0
 

Expert Comment

by:dmsoft
ID: 23638671
Take a look at the tool for SQLite and MySQL synchronization at  http://dbconvert.com/convert-sqlite-to-mysql-sync.php?DB=10
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now