Which Database for Swift iOS App

0 Lauritz De · June 4, 2015

I want to develop an iOS app with Swift which has to store some documents and userprofiles with a few attributes on a Server. What do i need to develop such an app? Can I use MongoDB with Swift? Or should I rather use a SQL Database? 


Post a Reply


Oldest  Newest  Rating
0 Monty Mason · November 12, 2015
I believe you can (please refer to the link below for details) use MongoDB with Swift (or at least use it for your iOS app).

Link: http://www.raywenderlich.com/61264/write-ios-app-uses-node-jsmongodb-web-service

As far as choosing a relational or NoSQL database goes, it depends on what the requirements will really be for the database. If you want to make sure the data integrity is solid, then go with relational as they've built in (ie. Primary and foreign keys) features. If you want to be a little lax, easy going on the integrity enforcement then MongoDB should be no problem.

MongoDB is less structured in comparison to a relational database, speaking from what I've seen of the two. There are primary keys still, but in the form of self assigned ID values in MongoDB, where as in relational databases you've complete control over this. So even if you assign your own ID values, MongoDB will still do it for you.

Also you would need to consider how easy do you want to make it for yourself on the programming side? (as long as it does not sacrifice much on the overall product).

You'll also have to keep in mind about performance. There are numerous articles online comparing the performance of NoSQL vs Relational (primarily MySQL) databases. From their studies, they find there isn't much difference really as long as the relational database is optimized properly, it is just as effective as NoSQL, perhaps even better.
0 karthika qpt · January 28, 2016
I think SQLite is used.SQLite is also known as Embedded because it is available as library that is linked with our application.

i suggest this video for sql beginners 
  • 1

SQL & Databases


Everything SQL and Databases related in here!

Bucky Roberts Administrator