Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sqlite & Mysql Synchronization

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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

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…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

705 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