Swift ORM Libraries
Swift ORM Libraries
Swift ORM libraries are specialized for iOS and macOS application development. Core Data is Apple's official framework, SwiftData leverages modern Swift language features, Realm provides a NoSQL database, and GRDB offers a lightweight SQLite-focused implementation. They maximize the use of Swift's type system.
GitHub Star Comparison
No | Name | GitHub Stars | Description | Trend | License | Type | Official Site |
---|---|---|---|---|---|---|---|
1 | SwiftData | ⭐ 68.8k | SwiftData is "a SwiftUI-optimized Core Data replacement" announced by Apple at WWDC23 in 2023, serving as a data persistence framework for Swift and SwiftUI. With the concept of "declarative and Swift-native data modeling," it provides intuitive model definition through @Model macros, automatic SwiftUI view updates via @Query, automatic CloudKit synchronization, and more. Leveraging Core Data's robust storage engine while delivering a modern Swift development experience, it represents Apple's next-generation data persistence solution. | stable | MIT | Library | - |
2 | FMDB | ⭐ 13.9k | FMDB is "a thin Objective-C wrapper around SQLite's C API" developed as a long-beloved SQLite wrapper in iOS development. With the concept of "SQLite for humans," it provides complex SQLite C API operations through a simple and intuitive Objective-C interface. Comprehensively supporting features necessary for iOS app development such as transaction management, custom functions, and thread safety, it has established a solid position as a lightweight database solution that is not as heavy as Core Data. | stable | MIT | Library | - |
3 | SQLite.swift | ⭐ 10.0k | SQLite.swift is developed as "A type-safe, Swift-language layer over SQLite3" - a Swift-exclusive SQLite database access library. It functions as a thin wrapper over SQLite3, providing database operations leveraging Swift's type safety and expressive syntax. Supporting all Apple platforms including iOS, macOS, watchOS, and tvOS, it is widely adopted in mobile app development and Mac application development as a lightweight alternative to heavyweight frameworks like Core Data and Realm. | stable | MIT | Library | - |
4 | GRDB.swift | ⭐ 7.6k | GRDB.swift is "a SQLite toolkit for Swift applications" developed as the most feature-rich SQLite library in the Swift ecosystem. With the concept of "type-safe and reactive database operations," it provides complex database operations through Swift-like type-safe and intuitive APIs. Comprehensively supporting all functionality needed for modern iOS/macOS app development such as ValueObservation, DatabasePool, and migration management, it has established a solid position as an enterprise-level database solution. | stable | MIT | Library | - |
5 | Core Data | ⭐ 5.4k | Core Data is Apple's framework for object graph management and persistence, providing a robust solution for iOS and macOS development. Rather than directly manipulating data, Core Data abstracts complex data management by treating data as objects. With powerful features centered around NSManagedObjectContext including memory management, relationship handling, lazy loading, and automatic change tracking, Core Data delivers the reliability and performance required for enterprise-level application development. | stable | MIT | Library | - |
6 | Realm Swift | - | Realm Swift is "an object database for iOS and macOS applications" designed as a Swift-native database solution. Developed as an alternative to SQLite, it enables high-performance data operations through an intuitive object-oriented API without complex SQL queries. With built-in reactive programming, automatic UI updates, thread safety, and encryption capabilities, and optimizations specifically for mobile application development, it supports high-quality iOS/macOS application development. | stable | MIT | Library | - |