ruelluna
ruelluna

Reputation: 797

iOS - database sqlite class/plug-in/library

I want to use a custom class that could handle querying easily. Are there more convenient ways in handling database in Objective C? Can you suggest open-source library or class that do this? Thank you for your answers in advance!

Upvotes: 1

Views: 1062

Answers (4)

jnortey
jnortey

Reputation: 1625

Easy to use object oriented sqlite wrapper that I created:

https://github.com/Nortey/TankDB

At the moment, its not meant for heavy duty queries or bulk updates. For that I would take everyone else's advice on FMDB. TankDB is more suited for beginners.

Upvotes: 0

Krumelur
Krumelur

Reputation: 32597

Have you had a look at Core Data? It can persist Obj-C objects to a SQLlite database.

Basically Core Data is an Obj-C <-> SQLite object mapper, which allows you to design your database schema in Xcode and work with the data as with normal Obj-C objects.

Xcode will provide you with visual database schema editing as well as code generation. This way you get typed classes for all tables in the database, which I find a great help (auto completion, compile-time checking, etc).

In addition to this, Core Data can take care of data migration for you. Say that in version 2.0 of your application, you want to store your data a little bit differently. You can then define a mapping between your own model and the new model, and the migration will take place as soon as your data context is loaded.

If you want to go the Core Data path or learn more about it, I recommend starting with a tutorial and checking out the sample code.

Upvotes: 0

MackeiaN
MackeiaN

Reputation: 61

FMDB is a nice library I have used a lot with success.

FMDB - Github

FMDB - article

Upvotes: 1

Lee Armstrong
Lee Armstrong

Reputation: 11450

Not an inbuilt class but take a look at FMDB that makes it nice and simple!!

https://github.com/ccgus/fmdb

Upvotes: 3

Related Questions