Junior — Middle
What database management systems have you used in your projects?
sobes.tech AI
Answer from AI
In iOS projects, I most often used the following database management systems:
- Core Data — Apple's framework for managing object data models, which allows saving and retrieving data using an ORM approach.
- SQLite — a relational database that can be accessed directly through SQL queries. Often used via wrappers, such as FMDB.
- Realm — a modern mobile database that is easy to use and efficient for storing objects.
Example of using Realm:
import RealmSwift
class Dog: Object {
@objc dynamic var name = ""
@objc dynamic var age = 0
}
let realm = try! Realm()
let dog = Dog()
dog.name = "Rex"
dog.age = 3
try! realm.write {
realm.add(dog)
}