I'm developing an application that needs to store lots of records in an organized way. Specifically, I'm writing a personal finance app. As you can imagine, this app will contain records of financial transactions that must be sorted in various ways: by date, by amounts, by recipient, by account, etc. And of course, the app will need to quickly get, say, all transactions between certain dates, quickly sum up some records, and so forth.
I'm still in the design phase, and I'm planning to use SQLite as the backend storage for the app, since OS X already ships with a SQLite framework. I thought to myself that it might be nice to abstract out the database-connection layer so that I may re-use the code in other projects, and then I thought that maybe someone else may have already done this.
Then I thought it might not be a good idea at all. I've read a little bit about CoreData on OS X, and thought that maybe I should be using CoreData for this purpose. However, I don't know if CoreData really fits my goals. It seems more like a way to abstract out an app's controllers and tie UI widgets to models, rather than providing an API to make it fast and easy to run possibly complicated queries on structured data.
So my question is really three related parts:
- Is there an ORM for Cocoa? I'm looking for something like Django's ORM layer, or Rails' ActiveRecord. (I only need it to connect to SQLite databases, though.)
- Or should I just use CoreData for this? Will it fit my needs well?
- Or am I barking up the wrong tree, and should be looking at another framework that accomplishes my goals with a different technique?