SQLite docs?

Discussion in 'iOS Programming' started by beachdog, Aug 27, 2008.

  1. beachdog macrumors member

    Aug 10, 2008
    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?
  2. kainjow Moderator emeritus


    Jun 15, 2000

    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.
  3. beachdog thread starter macrumors member

    Aug 10, 2008
    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.

Share This Page