iOS FMDB or Core Data ?

Which implementation would you recommend I use?

  • FMDB

    Votes: 0 0.0%
  • Core Data

    Votes: 4 80.0%
  • Raw mySQL_lite

    Votes: 1 20.0%

  • Total voters
    5
  • Poll closed .

whitedragon101

macrumors 65816
Original poster
Sep 11, 2008
1,248
261
I am coding a questionnaire iphone app (maybe ipad eventually but not yet). People will go out into the field and ask questions. In SQL terms I picture the structure thusly :

THIS_APP_DETAILS_TABLE (just one row of data to be stored)

id_details_primaryKey | your_name | team_leader_name | team_leader_id | other_details....


RECORD_OF_ANSWERS_TABLE (many rows of data to be stored)

id_answers_primaryKey | name | answer_1 | answer_2| answer_3 | etc etc

The app would store the answers to disk and also display them in a table and allow them to be edited.

Would this be better implemented as core data or as fmdb?
(which would mean I need to learn core data as I am from a SQL background and have never used core data).

Do you agree that 99% of the time core data is the best way to code database driven apps rather than fmdb (or even raw mysql_lite) ?
I ask that question as it does seem to be the prevailing answer when I googled it, but I want to be sure before learning an alien and proprietary data structure from scratch. Basically I don't want to discover I chose the wrong camp after I put all the work in.
 

MrFusion

macrumors 6502a
Jun 8, 2005
599
0
West-Europe
I am coding a questionnaire iphone app (maybe ipad eventually but not yet). People will go out into the field and ask questions. In SQL terms I picture the structure thusly :

THIS_APP_DETAILS_TABLE (just one row of data to be stored)

id_details_primaryKey | your_name | team_leader_name | team_leader_id | other_details....


RECORD_OF_ANSWERS_TABLE (many rows of data to be stored)

id_answers_primaryKey | name | answer_1 | answer_2| answer_3 | etc etc

The app would store the answers to disk and also display them in a table and allow them to be edited.

Would this be better implemented as core data or as fmdb?
(which would mean I need to learn core data as I am from a SQL background and have never used core data).

Do you agree that 99% of the time core data is the best way to code database driven apps rather than fmdb (or even raw mysql_lite) ?
I ask that question as it does seem to be the prevailing answer when I googled it, but I want to be sure before learning an alien and proprietary data structure from scratch. Basically I don't want to discover I chose the wrong camp after I put all the work in.
Definitely core data. It's ease to use and build right into UIKit. Start a new project and tick the core data option box. Everything is set up for you and you get iCloud included for free.
 

moonman239

macrumors 68000
Mar 27, 2009
1,525
22
I am coding a questionnaire iphone app (maybe ipad eventually but not yet). People will go out into the field and ask questions. In SQL terms I picture the structure thusly :

THIS_APP_DETAILS_TABLE (just one row of data to be stored)

id_details_primaryKey | your_name | team_leader_name | team_leader_id | other_details....


RECORD_OF_ANSWERS_TABLE (many rows of data to be stored)

id_answers_primaryKey | name | answer_1 | answer_2| answer_3 | etc etc

The app would store the answers to disk and also display them in a table and allow them to be edited.

Would this be better implemented as core data or as fmdb?
(which would mean I need to learn core data as I am from a SQL background and have never used core data).

Do you agree that 99% of the time core data is the best way to code database driven apps rather than fmdb (or even raw mysql_lite) ?
I ask that question as it does seem to be the prevailing answer when I googled it, but I want to be sure before learning an alien and proprietary data structure from scratch. Basically I don't want to discover I chose the wrong camp after I put all the work in.
I use Core Data. It's easy to use and well-documented, and it allows you to use one of multiple database types, including SQLite.
 

whitedragon101

macrumors 65816
Original poster
Sep 11, 2008
1,248
261
Start a new project and tick the core data option box. Everything is set up for you and you get iCloud included for free.
I already have a project with a large story board and all the links (e.g classes, buttons, variables, modal navigation stuff) and code done. Can I still tick the box once the project has been created? Or can I transfer the story board and files to a new project (which I could create with the core data box ticked) and maintain the links?
 

MrFusion

macrumors 6502a
Jun 8, 2005
599
0
West-Europe
I already have a project with a large story board and all the links (e.g classes, buttons, variables, modal navigation stuff) and code done. Can I still tick the box once the project has been created? Or can I transfer the story board and files to a new project (which I could create with the core data box ticked) and maintain the links?
Do it the other way around. Create a new project with core data and copy the relevant code over to your existing project. Don't forget to add a core data model file.

Perhaps just play around in a new project first to get the hang of it. The iOS master-detail template is a nice starting point.
 

ChristianVirtual

macrumors 601
May 10, 2010
4,124
265
* ** *
After some initial misunderstanding on my side I now enjoy CoreData. Relative easy to use in single client mode; not yet tested with iCloud. I also tried FMDB before which worked also well but I still had to code the glue between data base and model in memory. Here CoreData wins.
For highest performance I might would use hand coded SQLite but unlikely these days.