Sqlite wrapper solution
From 呼吸的草稿本
Contents |
Entropydb
http://code.google.com/p/entropydb/
EntropyDB is an embedded object database for Mac OS X 10.5 and iPhone OS written in Objective-C. It is built on top of SQLite. You can embed it in your own application or you can use it for RAD (Rapid Application Development) or Rapid Prototyping for iPhone with the open source Rapid tool. It has the following advantages:
- It is simple to use since it is an object database, i.e., you don't have to use SQL but you only work with Objective-C objects.
- The database can be embedded in both OS X 10.5 applications and iPhone applications (the current version can be used in the iPhone Simulator).
- No configuration is required.
* Instances of descendants of NSObject can be stored directly without providing any additional information. - Database contents can be synchronized among multiple database instances automatically.
EntropyDB can be used similarly to db4objects (db4o). The current preview version is distributed as a static library and can be embedded in Xcode projects by adding the header files and the file libEntropyLib.a to Classes and Frameworks, respectively.
sqlitepersistentobjects
http://code.google.com/p/sqlitepersistentobjects/
Wouldn't it be nice if your Objective-C data objects just knew how to save and load themselves? It'd be nice if you could just call "save" and trust that your object would save itself properly somewhere, and that when you wanted to load it back in, you could just call a class method to retrieve the object or objects you wanted?
Well, now you can. This project uses the objective-C runtime to implement a pattern similar to ActiveRecord, but driven by the object's properties rather than the tables in the database.
The objects are completely self-contained - you do not need to write SQL or even create a SQLite file. You just subclass an existing class, and your model objects inherit the ability to load and save themselves from the database.
FMDB
https://github.com/ccgus/fmdb This is an Objective-C wrapper around SQLite: http://sqlite.org/
Pldatabase
http://code.google.com/p/pldatabase/ A SQL database access library for Objective-C, initially focused on SQLite as an application database. The library supports both Mac OS X and iPhone development.
(LastFM iOS app is using this)
