PDA

View Full Version : SQLite docs?




beachdog
Aug 27, 2008, 10:35 PM
Can someone point me to documentation on the SQLite db? So far I have only found the sample SQLiteBooks sample, which is useful but I imagine there must be some more thorough reference material online, though I haven't found it.

As far as the SQLiteBooks sample goes, I have some questions:

- the sample populates the initial data by means of SQL DDL statements (inserts). Is this common? My app has lots of data to load into the database, I was thinking it would be easier for me to store it as an xml document as a resource in my bundle somehow, then parse that via sax on startup and insert into the DB. Any thoughts?



kainjow
Aug 28, 2008, 04:04 AM
http://www.sqlite.org/docs.html

Don't store in XML if you're just going to transfer it to SQLite. Store it in SQLite from the start. XML will be too slow and use up too much memory - that is why there is no built-in DOM parser for XML on the iPhone.

beachdog
Aug 28, 2008, 08:38 AM
http://www.sqlite.org/docs.html

Don't store in XML if you're just going to transfer it to SQLite. Store it in SQLite from the start. XML will be too slow and use up too much memory - that is why there is no built-in DOM parser for XML on the iPhone.

I was thinking to use SAX, which is available on the iphone and is much faster. Do you still feel there would be an issue with that?

Also, I am only talking about the one-time task of loading data into the tables the first time my application runs on someones iphone. But maybe I am missing the point -- should I be thinking of creating the database and populating all of the data into it in my development environment on OSX, then saving that database -- with all data in it, just as I want it -- as a resource in my app? Of course, that would be simpler.