1
3 Comments

Ask IH: What database did you use in your app, and why?

Hello fellow Indie Hackers,

Can you share here what database did you choose for your project, and why?

In my case I went with a No SQL database from Google called Firestore, it's part of the Firebase ecosystem.

It's very fast and a natural fit for a web application, because the data is stored in JSON-like format of collections and documents.

But it has limited query capabilities, and sometimes I have to denormalize the data to make it work, creating potential data synchronization issues.

Sometimes I wonder if I had just gone for a plain Postgres database wouldn't it have been much easier. this would have made it easier tooto find developers that understand the database well.

Because right now, finding Firestore developers is not that easy. I usually have to find someone with a good knowledge of the frontend (Angular), and then cross train them in Firestore via video courses.

What about you, what database did you choose and why?

Did you use Mongo or some other No SQL database, or just plain old SQL databases like Postgres?

If you did use SQL databases, did you ever regret it, due to performance issues for example?

Thank you for any insights on this,
Cheers,
Vasco

on April 21, 2022
  1. 1

    PostgresQL, my data is relational. Always pick the best tool for the job. Trying to fit relational data in MongoDB or using PostgresQL for unstructured data is always a bad idea.

    1. 1

      The problem is, all data is relational more or less, right? There are always at least some connections between the data. On a MongoDB database, there will always be some relations between data in different collections.

      And with Postgres, did you run into performance issues, does it scale well?

      With Firestore, I think at least I will never have to worry about scale. My data is also relational but the data model is quite simple: courses, services, users, payments, questions, answers, and not much more.

      I'm oversimplifying, but the core data model is this, and so far it hasn't been a problem to fit this into a NoSQL database.

      1. 1

        Not all data is relational, but it’s the most common case.

        With postgres, I had to put pgpool in front of it, but otherwise so far so good. There are many autoscaling solutions I have not needed to try. The last company I worked for had very large PostgresQL instances.

        so far it hasn't been a problem
        Sometimes I wonder if I had just gone for a plain Postgres database wouldn't it have been much easier

        Both options have tradeoffs. You just choose which tradeoffs you are going to live with.

Trending on Indie Hackers
I built a text-to-video AI in 30 days. User Avatar 66 comments What 300 Builders Taught Us at BTS About the Future of App Building User Avatar 52 comments I built something that helps founders turn user clicks into real change 🌱✨ User Avatar 49 comments From a personal problem to a $1K MRR SaaS tool User Avatar 32 comments How An Accident Turned Into A Product We’re Launching Today User Avatar 29 comments You don't need to write the same thing again User Avatar 29 comments