Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 13, 2009, 08:37 AM   #1
arnieterm
macrumors regular
 
Join Date: Aug 2008
Core Data and SQLite for iphone

I have reviewed CoreDataBooks sample that is using Core Data [an object oriented approach] and SQLite for iphone. I have an app that is also using SQLite database and requires a large number of data entry usually on a daily basis. I have 4 tables out of which 2 are main and holding one to many relationship as given below:

Table1 [Main table that wil contain one row for each day of month]
Table2 [That may contain one or more row for each row of Table1]

Each row of Table1 is uniquely identified by the date for that day. I am storing date as double in the table. Is it okay to use Core Data with sqlite here. Will it make reading/writing data faster than when using only sqlite3.
As I have to plot a graph also based on data for all days of a particular month.

Can anybody suggest that should I use Core Data along with sqlite or only sqlite as usual?
arnieterm is offline   0 Reply With Quote
Old Nov 13, 2009, 12:31 PM   #2
AndyCodez
macrumors regular
 
Join Date: Aug 2009
I think you would have to choose one or the other. Core Data uses a sqlite database but you don't directly use sqlite methods like you are doing currently. I don't think you can port your current database to Core Data. When you do the mapping it creates the sqlite database with other fields than what you are mapping to.
__________________
13" Macbook White, 2.00 ghz, 4 gig mem, 120g hd.
iphone 3g - 8gig.
Time Capsule 500g.
iFlashCardPro - Flash Cards
AndyCodez is offline   0 Reply With Quote
Old Nov 14, 2009, 02:07 PM   #3
MacDonaldsd
macrumors 65816
 
MacDonaldsd's Avatar
 
Join Date: Sep 2005
Location: London , UK
Quote:
Originally Posted by arnieterm View Post
I have reviewed CoreDataBooks sample that is using Core Data [an object oriented approach] and SQLite for iphone. I have an app that is also using SQLite database and requires a large number of data entry usually on a daily basis. I have 4 tables out of which 2 are main and holding one to many relationship as given below:

Table1 [Main table that wil contain one row for each day of month]
Table2 [That may contain one or more row for each row of Table1]

Each row of Table1 is uniquely identified by the date for that day. I am storing date as double in the table. Is it okay to use Core Data with sqlite here. Will it make reading/writing data faster than when using only sqlite3.
As I have to plot a graph also based on data for all days of a particular month.

Can anybody suggest that should I use Core Data along with sqlite or only sqlite as usual?
As AndyCodez said, you use either CoreData or SQLite. CoreData is using SQLite under the hood to handle the object persistence, but you don't write any of that SQLite, nor do you ether see it.

For what you are doing, ether is fine. CoreData makes it simpler though.
MacDonaldsd is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
core data binding not working Javajax Mac Programming 3 Jul 10, 2011 01:23 PM
Help Needed - Xcode 4 Options: Use Core Data Include Unit Tests Mitch1984 iPhone/iPad Programming 3 Feb 26, 2011 03:42 PM


All times are GMT -5. The time now is 08:52 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC