FMDB Wrapper VS Core Data : which is easier to use & maintain?
I am confused because FMDB is very old but still many developers are using it, while Core Data is new and is only supported by 3.0 and later sdk.
Some have said that FMDB is easy to use and some said Core Data. Please help me so I can go in the right direction.
Thanks in Advance
The next time you need to store data, you should have a better idea of your options. Core Data is unnecessary for random pieces of unrelated data, but it's a perfect fit for a large, relational data set. The defaults system is ideal for small, random pieces of unrelated data, such as settings or the user's preferences.
Core Data can use SQLite as its persistent store, but the framework itself is not a database. Core Data is not a database. Core Data is a framework for managing an object graph.
Core Data is not a relational database or a relational database management system. It can use SQLite as one of its persistent store types, but it is not in and of itself a database. You could set up Core Data to just use an in-memory store just to get the change tracking and management features without persistence.
FMDB is an Objective-C wrapper around the C-style API provided by Apple for SQLite. It's important to note the SQLite is not an Apple proprietary technology. SQLite is an open source C-language library used by Apple, Android, Skype, and many other clients and applications to provide a robust database engine.
I have used both heavily across a lot of projects now.
FMDB is very straightforward, if you know SQL it can even be pretty easy to use. But what you have to do through the lifecycle of an app as the data model changes is:
What Core Data brings to the life cycle is this:
The hell that Core Data puts you through is:
So what would I recommend? To paraphrase the old quote about Democracy, Core Data is the worst data persistence system - except for all the others. Even with the new definition of pain and suffering that Core Data will bring to your life, it is still less work and easier to work with than FMDB or other data persistence layers.
FMDB is more straightforward and if you are OK putting lots more time into changes and data model definition that may be OK. But generally I would recommend people bite the bullet and use Core Data unless there is a clear reason not to.
A few quick tips:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With