Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sqlite & Mysql Synchronization

Posted on 2008-06-19
5
Medium Priority
?
3,842 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 750 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 750 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

916 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