Solved

Sqlite & Mysql Synchronization

Posted on 2008-06-19
5
3,788 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 110

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
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.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

627 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