Solved

Sqlite & Mysql Synchronization

Posted on 2008-06-19
5
3,689 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

914 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

22 Experts available now in Live!

Get 1:1 Help Now