SQlite Database in iphone

12 views
Skip to first unread message

ratna yellapragada

unread,
May 10, 2012, 6:11:34 AM5/10/12
to BYU CocoaHeads
Hi.Am new to iphone development area.I know how to create tables using
terminal in ios applications.But can you explain me how to create the
tables using sqlite programatically in iphone

Rick Roberts

unread,
May 10, 2012, 10:46:11 AM5/10/12
to byu-coc...@googlegroups.com
You should look into using FMDB. Here is a link:


This will make working with sqlite a lot easier. But depending on what you are trying to do thee are a lot of ways to persist data on the iPhone. Core Data would be something else to look into.


--
This was sent to members of the "BYU CocoaHeads" google group.
To post to this group, send email to byu-coc...@googlegroups.com
For our job posting guidelines see http://cocoaheads.byu.edu/wiki/cocoaheads-job-posting-guidelines
To unsubscribe from this group, send email to
byu-cocoahead...@googlegroups.com
Be sure to visit our website at http://cocoaheads.byu.edu

Dave DeLong

unread,
May 10, 2012, 10:48:13 AM5/10/12
to byu-coc...@googlegroups.com
If you're already familiar with SQL and are still "new to iphone development", then I would definitely recommend going with FMDB and staying away from Core Data for now.  Core Data is not a beginner's framework.

Dave

Ontario Britton

unread,
May 10, 2012, 10:53:33 AM5/10/12
to byu-coc...@googlegroups.com
Hi Ratna-

  If your data is relational or just repetitively hierarchal, then sql or coreData is great.

  If your data is simply hierarchal, consider saving an NSDictionary or NSArray directly to a plist:

NSMutableDictionary* dictionary = [NSDictionary dictionaryWithContentsOfFile:fileName];

//... Do something in an NSMutableDictionary

[dictionary writeToFile:fileName atomically:YES];

If your data isn't hierarchal at all, consider the simpler NSUserDefaults.

Thanks,
Ontario Britton
Reply all
Reply to author
Forward
0 new messages