Different types of mobile app databases and storage solutions
Even within the mobile databases sphere, there are many different types of database and data storage solutions to consider.
Database Types
Relational database - Data is stored in tables using primary and foreign keys to form relationships between tables. The most common mobile relational database is SQLite.
Key-value database - This stores information by using keys as identifiers with an associated value. It’s often used to store small bits of information. Common examples in mobile databases would be UserDefaults in the iOS SDK, and SharedPreferences from Android.
Object-oriented database - This is a database that can work with complex data objects as used in object-oriented programming languages, such as Swift or Kotlin. It can execute fast queries with complex data. Code is often simpler as well due to similarities in structure between the database and object in code. Atlas Device SDKs provide an object-oriented database.
As well as the type of database itself, there are also different types of database storage.
Storage Types
Cloud storage - Cloud database storage is where the database is hosted and accessed within the cloud. Many of the above-mentioned database types have solutions that allow for the database to be hosted in the cloud. One example of a cloud database solution is MongoDB Atlas, a developer data platform that offers a database that can synchronize with Atlas Device SDKs on-device database, for sharing data across platforms and application types, amongst other great product features.
Local storage - This is where the database itself is stored locally to the device which hosts the application accessing the database. In the case of a mobile database, this would be stored on the phone.
Server storage - Although a cloud storage solution uses a server under the hood. Some may prefer to self-host a database on a server they own and manage—for example, for security reasons. This still requires internet access for the application.
Cloud/local storage - This hybrid approach used by products such as
Atlas Device SDK in tandem with Device Sync, an Atlas App Service, allows for the best of both worlds. Data is available both on the device and in a cloud-hosted database, using sync to take care of keeping the data consistent between both.