Database design question/advice sought

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Database design question/advice sought

Post by marksmithhfx » Fri Jan 18, 2013 9:26 pm

Hi, I'm having difficulty figuring out how I can solve a multi-platform database problem. Advice appreciated...

The context: data is being collected on an iPad and needs to be incrementally added to a PC-based desktop database. Currently data is being collected in a SQLite file on the iPad and then backed up to the PC daily using iTunes. The data should not be retained on the iPad any longer than is necessary (ie “completed” records should be deleted from the iPad once they are copied to the archival database). If possible, no manual intervention should be required (ie. it should all be automated). (Note: it may take several forays into the field to “complete” a record. There is a flag that gets set when the data entry person has completed the record.) (Note: no wifi or 3g so a mobile client/server solution is not possible)

One possible Solution: in two parts:

(1) create an application on the PC that is triggered by the iTunes backup process and does the following:
a. Extracts the sqlite file from the iTunes backup
b. Opens the sqlite file and copies “completed” records from the file to an “archival” database on the PC

(2) “completed” records on the iPad are automatically deleted after X number of days (I can handle this part)

Question: can I trigger an application to run automatically on the PC after an iTunes backup?

Any advice or suggestions appreciated (particularly for the Question above).

Thanks

-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Database design question/advice sought

Post by mwieder » Mon Jan 21, 2013 8:56 pm

Don't know if it will help, but Tom McGrath has an iTunes library on revOnline.
If that doesn't do it, maybe AppleScript can come to the rescue.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Database design question/advice sought

Post by marksmithhfx » Wed Jan 23, 2013 4:36 am

mwieder wrote:Don't know if it will help, but Tom McGrath has an iTunes library on revOnline.
If that doesn't do it, maybe AppleScript can come to the rescue.
Thanks Mark. I'll go take a look (and keep my fingers crossed). Something like the equivalent of AppleScript on PC would probably do it.
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Database design question/advice sought

Post by marksmithhfx » Fri Feb 08, 2013 2:48 am

mwieder wrote:Don't know if it will help, but Tom McGrath has an iTunes library on revOnline.
If that doesn't do it, maybe AppleScript can come to the rescue.
Hey Mark, just wanted to let you know Tom McGrath was very helpful in finding a solution to my problem. Such a great community here.

-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply