Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

beachdog

macrumors member
Original poster
Aug 10, 2008
86
0
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

Moderator emeritus
Jun 15, 2000
7,958
7
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

macrumors member
Original poster
Aug 10, 2008
86
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.