> 1 - What if you are working on more complex setups than 1 table? I
> want 2 tables, which have a one-to-many relationship (a simple example
> is a Polygons table, and a Points table). How am I supposed to return
> a cursor that would allow access to the polygon's information,
> including the points? Good links welcome...

Do a join in your SQL query.

> What happens with crashes? I have seen some adapters around, and they
> seem to make all data edits directly to/from the database. Is this
> safe?

That depends on how well the code is written.

> It seems like it would be better to have objects that are
> manipulated, and written to the database when they are ready.

That is not intrinsically safer than what you think is unsafe.

> If an
> app crashed unexpectedly after half of a row had been edited

Is that like digging half a hole?

> then the
> database could have bad data. I would rather loose an entire row, than
> have a half-correct row.

Individual SQL statements are atomic; multiple statements can be made
atomic via transactions.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to