-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/03/12 10:55, Rose, John B wrote:
> In this particular example, a particular researcher would be creating
> the initial version of the database on their own computer, but once
> they got out in the field they may update the copy they have on their
> mobile device and take that copy back to replace the original on their
> desktop.

Android still remains a red herring.  Forget the mobile device.  How are
you going to cope with all these copies of data, multiple databases,
multiple users, multiple updates and people wanting to share their data?

Sure you could stick your head in the sand and hope for the best but you
will get burned *very* badly.  You will end up with lost data, corrupt
data etc.  You have humans in the loop - they are fallible.

So how would you handle it if the mobile device was actually a regular
Windows laptop?  How would databases get generated, copied and uploaded
without tears?

By far the best thing you can do is use a server to hold the master data,
and be how various devices synchronize.  Devices would then have the
equivalent of two databases.  One is a read-only cache of existing data,
and then second would be a log of local changes (updates, deletions,
additions etc).

Synchronization would then involve telling the server of the log of local
changes which it can integrate into the existing data in the most
applicable way, and it can provide the read-only cache data too.  With
this approach the master copy of the data exists only once, and in only
one place.  All the concurrency issues go away.  And if you use HTTP/REST
then pretty much every programming language and device supports it.

Heck you could even write your client app in HTML5 using offline support
so the user doesn't have to be connected, and local storage until you can
upload the changes.  (Local storage is implemented using SQLite in most
browsers btw!)

http://www.html5rocks.com/en/features/offline

If you did this then it would work on pretty much any mobile device
including future ones.  You can then still write specific apps for
specific platforms if you wanted deeper integration on those.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk9RJhUACgkQmOOfHg372QRLrQCeJeEQ+Osth0TssuEfkpHfH8hv
xPoAoOJIKSgy9CL9fLVFxHFKKkz9FWOY
=Aqb8
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to