Search code examples
databaseflutterbackend

Which database should I use for my Flutter application?


I am making an application in Flutter, which requires to save the daily data that the users input in the application. The user has 10 daily actions to do.

The app needs to:

  • Save the daily data that the user inputs in those 10 actions.
  • Make a daily, weekly, monthly, quarterly and yearly summary of the data, divided by each action.

At the start of the development of the app I was thinking of using Firebase, but I feel like it is not the best option.


Solution

  • If your app only needs to support offline data saving mechanism which not required any internet connectivity then you would use:

    • Isar (It is a no-sql/non-relational local/offline database which has interactive inspector editor)
    • Object Box (It is a no-sql/non-relational local/offline database)
    • Hive (It is a no-sql/non-relational local/offline database)
    • Sqflite (It is a sql/relational local/offline database)
    • Drift (It is a sql/relational local/offline database which is build on top of sqlite)

    Otherwise you can use:

    • Firebase (It is a no-sql/non-relational online backend as a service)
    • AWS Amplify (It is a cloud based backend as a service)
    • Parse Server (It is a kind of sql/relational online backend as a service)
    • Realm (It is a no-sql/non-relational mongodb based online backend as a service)
    • AppWrite (It is a no-sql/non-relational online backend as a service)
    • Supabase (It is an online backend as a service)

    If you want to write dart based custom backend:

    • Dart Frog (It is a minimalistic backend framework)
    • Serverpod (It is a sql based backend framework)

    If you came from Java/Native Android or React Native background:

    • Spring Boot (It is a Java (Kotlin) based enterprise level backend framework)
    • Nest JS (It is a progressive Node JS based reliable backend framework)

    According to your provided information, I think Firebase or AWS Amplify (for online backend as a service) and Isar (for local db and for flutter web support use Sqflite or Drift instead of Isar) would be good option.