views:

91

answers:

1

So I have an iphone app that downloads data from a shared database. It switches between views and when it returns to the "data" view I'd like to download only the new data in the database. What is the best way to achieve this?

+1  A: 

Are the rows in the tables of the database unique? Off the top of my head, you could store the list of table row ids that you already know of then compare against that when reading the "new" rows (unless the existing rows will change their data).

Nick Bedford
The existing rows can change. They are timestamped though. i guess I can use that but I was worried about this not scaling well.
ennuikiller
As far as implementation goes (not performance), the two things I would do is store timestamp against row id and use those to compare against incoming changes. That's as minimal as could I think of approaching it, really.
Nick Bedford