diff --git a/README.md b/README.md index 8cf150904..2639b8bd1 100644 --- a/README.md +++ b/README.md @@ -46,21 +46,21 @@ More than a set of tools that leverage SQLite abilities, GRDB is also: For a general overview of how a protocol-oriented library impacts database accesses, have a look at [How to build an iOS application with SQLite and GRDB.swift](https://medium.com/@gwendal.roue/how-to-build-an-ios-application-with-sqlite-and-grdb-swift-d023a06c29b3). -### GRDB and Other Database Libraries +### The GRDB Advantage -There are already great Swift database libraries. To name a few: [FMDB](https://github.com/ccgus/fmdb), [SQLite.swift](http://github.com/stephencelis/SQLite.swift/pulls), [Core Data](core data swift), and [Realm](https://realm.io). +GRBD addresses your database needs, like other great Swift database libraries. like [FMDB](https://github.com/ccgus/fmdb), [SQLite.swift](http://github.com/stephencelis/SQLite.swift/pulls), [Core Data](core data swift), or [Realm](https://realm.io). -GRBD also addresses your database needs, with a few improvements. **Indulge yourself and let GRDB run the extra mile for you:** +**Indulge yourself and let GRDB run the extra mile for you:** 1. **Great SQL support**. Other libraries make you feel dirty when you use raw SQL, or leave you naked when you have to turn database data into application values and objects. *GRDB welcomes your SQL skills, and you will feel it.* See the [SQL API](#sqlite-api). -2. **Sensible error handling**. While FMDB makes it easy to overlook errors, SQLite.swift treats your local database as if it was some dangerous poison downloaded from Internet. *GRDB won't let any error go, and yet doesn't force you to handle errors that simply shouldn't happen.* See [error handling](#error-handling) for more information. +2. **Flexible Records**. Nobody wants to deal with raw SQL rows all day long. FMDB and SQLite.swift won't help you converting them to and from Swift structs or classes. FMDB has [marcoarment/FCModel](https://github.com/marcoarment/FCModel), but it relies on Key-Value-Observing - which does not fit very well with Swift. Core Data and Realm objects are a pain to use in a multi-threaded environment. *GRDB provides ready-made Swift protocols that turn your custom structs and classes into records that you can freely fetch and store in the database.* See [records](#records) and the [query interface](#the-query-interface). -3. **Flexible Records**. Nobody wants to deal with raw SQL rows all day long. FMDB and SQLite.swift won't help you converting them to and from Swift structs or classes. FMDB has [marcoarment/FCModel](https://github.com/marcoarment/FCModel), but it relies on Key-Value-Observing - which does not fit very well with Swift. Core Data and Realm objects are a pain to use in a multi-threaded environment. *GRDB provides ready-made Swift protocols that turn your custom structs and classes into records that you can freely fetch and store in the database.* See [records](#records) and the [query interface](#the-query-interface). +3. **Threading confidence**. Core Data is quite error-prone as soon as your application leaves the trivial zone. SQLite.swift is easy to misuse in a multi-threaded application. Realm prevents sharing records between threads. FMDB has no support for [WAL mode](https://www.sqlite.org/wal.html). *GRDB builds on top of protocol-oriented programming and immutability to provide a sane and efficient threading environment.* See [Four different ways to handle SQLite concurrency](https://medium.com/@gwendal.roue/four-different-ways-to-handle-sqlite-concurrency-db3bcc74d00e) and [How to build an iOS application with SQLite and GRDB.swift](https://medium.com/@gwendal.roue/how-to-build-an-ios-application-with-sqlite-and-grdb-swift-d023a06c29b3). -4. **Threading confidence**. Core Data is quite error-prone as soon as your application leaves the trivial zone. SQLite.swift is easy to misuse in a multi-threaded application. Realm prevents sharing records between threads. FMDB has no support for [WAL mode](https://www.sqlite.org/wal.html). *GRDB builds on top of protocol-oriented programming and immutability to provide a sane and efficient threading environment.* See [Four different ways to handle SQLite concurrency](https://medium.com/@gwendal.roue/four-different-ways-to-handle-sqlite-concurrency-db3bcc74d00e) and [How to build an iOS application with SQLite and GRDB.swift](https://medium.com/@gwendal.roue/how-to-build-an-ios-application-with-sqlite-and-grdb-swift-d023a06c29b3). +4. **Performance**. GRDB [performs better](https://github.com/groue/GRDB.swift/wiki/Performance). And it supports SQLite [WAL mode](https://www.sqlite.org/wal.html) that brings extra performance to multi-threaded applications. -5. **Performance**. GRDB [performs better](https://github.com/groue/GRDB.swift/wiki/Performance). And it supports SQLite [WAL mode](https://www.sqlite.org/wal.html) that brings extra performance to multi-threaded applications. +5. **Sensible error handling**. While FMDB makes it easy to overlook errors, SQLite.swift treats your local database as if it was some dangerous poison downloaded from Internet. *GRDB won't let any error go, and yet doesn't force you to handle errors that simply shouldn't happen.* See [error handling](#error-handling) for more information. 6. **API Design**. Do you sometimes find that SQLite.swift is hard to remember and use correctly, or that FMDB is somewhat verbose? *Give GRDB a try.*