What choices do Swift developers have for a robust relational database engine embedded in their apps? Especially for Cocoa native (Xcode) macOS or iOS apps?

By ‘robust’ I mean architected to prioritize preserving my data (versus performance or such), ACID compliant, strong support for date-time handling, savvy handling of concurrency, stable runtime without exaggerated crashing or memory usage or CPU hogging, and preferably native support for UUID as a data type including as primary key.

SQLite is too lite.

MySQL is not as robust or powerful as I would like.

Postgres is robust and powerful, but not suitable for embedding.

H2 Database Engine seems to be an excellent database but, being written in pure Java, requires a JVM to be embedded as well. Embedding a JVM is doable on macOS but I don't know about iOS. Similar to H2 is Apache Derby and HSQLDB. Not sure how to connect to any of these as there is no JDBC driver that can be called from a native Xcode app.

I wonder about Firebird 3, but I am unfamiliar.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.