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

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,349
339
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 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.
 
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.
 
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?
 
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.