Picking a Database is Hard...

Поділитися
Вставка
  • Опубліковано 30 чер 2024
  • Wanted to talk about my current thought process on picking a database. What you need is almost certainly different from what I need, this is just to give you some insight into how I think about this stuff.
    my stuff
    discord: / discord
    x (twitter): / bmdavis419
    insiderviz: www.insiderviz.com
    blok: www.theblokapp.com
    timestamps
    0:00 what I'm building
    1:40 Sqlite/Turso
    5:15 MongoDB (and Firestore)
    6:50 planetscale
    10:00 supabase
    13:30 AWS
  • Наука та технологія

КОМЕНТАРІ • 84

  • @Soulis98
    @Soulis98 3 місяці тому +15

    Long live the king PostgresSQL!!!

  • @SadeghMirzaee-fd8lg
    @SadeghMirzaee-fd8lg 3 місяці тому +3

    (Irrelevant again but actually relevant) Happy to see that your posture, body language and even your facial expressions improved so much. :) good job buddy. 👍

  • @emmanuelU17
    @emmanuelU17 3 місяці тому +21

    Just spin up a vps. It's cheaper that way

    • @scott_itall8638
      @scott_itall8638 3 місяці тому

      So VPS for say a Sveltekit app and Pocketbase?

    • @emmanuelU17
      @emmanuelU17 3 місяці тому

      @@scott_itall8638 No just pay for a VPS and host all your project there. It’s a lot cheaper when you have a gazzilion amount of side projects. Spin up whatever services, database you need. If you need more compute scale up vertically. Easy

  • @r-i-ch
    @r-i-ch 3 місяці тому +1

    Thanks for the rundown!

  • @nro337
    @nro337 3 місяці тому

    Great video, really important that it ultimately comes down to one's use case.

  • @tedspens
    @tedspens 3 місяці тому +2

    Thanks, Ben. This is the comparison I need. Like your project, what i'm working on also calls for a relational db and, ideally, will need to scale very large very quickly. In fact I'm considering dishing out the $40 a month for planet scale for just that reason. I'm not familiar with Turso and not sure I'd feel comfortable trusting the scalability without a proven track record.

    • @bmdavis419
      @bmdavis419  3 місяці тому +1

      Yea its a really tough call, I love new tech, but the DB is a scary ass place to have new tech idk we will see

    • @dandogamer
      @dandogamer 3 місяці тому

      Define the scale you need and what do you mean by really quickly?

    • @tedspens
      @tedspens 3 місяці тому +1

      @@dandogamer There are no hard numbers or timelines, only that if successful, it will require massive resources.

    • @vicentealmeida1336
      @vicentealmeida1336 3 місяці тому +2

      The founders have a very solid track record, plus they are now working with some big clients. But yes nothing proven yet.

  • @user-qq7yc1qp8z
    @user-qq7yc1qp8z 3 місяці тому +1

    For personal staff I use supabase, for clients we use postgress on AWS RDS in the company.

  • @sabin454
    @sabin454 3 місяці тому +1

    amazing video

  • @tomreisinger3836
    @tomreisinger3836 3 місяці тому +5

    Have you already taken a look at Neon DB?

  • @iriel492ki
    @iriel492ki 3 місяці тому +12

    DynamoDB is 100% slept on. Spend a little time learning how to model for it and you can build out some tremendously complex apps. Yeah, it's not going to get you super strong relationships like a relational DB, but the fact that it is absurdly cheap, scales to zero, and remains hyper performant at insanely high scale makes it one of the top choices for indie hackers and start ups imo.
    Source: I have a side project that generates almost 1k MRR built on appsync, lambda, and dynamodb and it costs me literally less than $2 a month. And I'll never have to worry about scaling in/out a db while always having ultra performance. It's full auto pilot and I love it.

    • @kylerjohnson988
      @kylerjohnson988 3 місяці тому +2

      I hate AWS, but I have to admit you make some good points. How do you get a total count of records? Do you create an aggregate document and update counts on add/delete operations?

    • @iriel492ki
      @iriel492ki 3 місяці тому

      @@kylerjohnson988 That's exactly how I've done it at my job. If you have a low write frequency you can just directly update that counter. Alternatively, if you expect a lot of writes/updates you can always use a dynamo stream and have a lambda manage that counter async.

    • @robgreene3745
      @robgreene3745 3 місяці тому

      ​@@kylerjohnson988you don't

    • @user-qq7yc1qp8z
      @user-qq7yc1qp8z 3 місяці тому

      @@kylerjohnson988why you hate aws ? It’s the best cloud provider rn.

  • @rahulagarwal968
    @rahulagarwal968 3 місяці тому

    When using Planetscale, how to connect it with Flutter and How can I implement Auth and Storage ? Since I am new to Flutter and have only used Firebase and Supabase.

  • @MattHeslington
    @MattHeslington 3 місяці тому

    13:06 You should have perhaps started with this. You're basically talking about which brands you like if all you need a database for is to put stuff in tables in SQL. There are significant differences between SQlite, MySQL and Postgres if your databse needs go a little bit beyond that.And while MongoDB is called non-relational as it is NoSQL, it's extremely easy to write relational-style queries with it using Mongoose.

  • @yunyang6267
    @yunyang6267 3 місяці тому +1

    Ben in 2030: Next.js or Svelte? Planetscale or Turso? NextAuth or Lucia?

  • @devyb-cc
    @devyb-cc 3 місяці тому +2

    Also, with the AI hype makes it a lot harder to choose one, for seamless integration with embeddings. Sooo many choices (like frontend frameworks 💁)

  • @vicentealmeida1336
    @vicentealmeida1336 3 місяці тому

    What you think of some hybrid database stack here, is it absurd to use supabase and turso together. Using supabase features, like auth, webhooks... to interact with turso database. Supabase free tier has quite a small storage space for the database, combining somehow with turso big storage capacity could be interesting.

    • @gie4830
      @gie4830 3 місяці тому

      I'm also thinking of going with this. I'm currently still using supabase auth and db but planning on switching. After reading the drizzle orm, it looks like an easy migrate. The last thing I'm still considering is how is tursos libsql at larger scale and how long will the current pricing stay low like this.

    • @vicentealmeida1336
      @vicentealmeida1336 3 місяці тому

      Also you could keep supabase storage for frequent writen data, like a usersession that stays in supabase while the session is active. If the user logs out or session expires move it to Turso, get it again once the user logs in again. It seems to be a way to navigate the free tier and keeping the strength of each service. Also supabase doesn't seem to have a limit on data. @@gie4830

  • @abdirahmann
    @abdirahmann 3 місяці тому +3

    Ben i'll make life easy for you, just use postgres with supabase, you'll never go wrong, but don't use the supabase API, its a trap, they over-promise and under-deliver. You can't run transactions using their API, once you get away from tiny TO-DO apps, it just falls apart, but i like their auth ngl, Postgres is SOLID and the supabase dashboard is a nice addon.

    • @zBrain0
      @zBrain0 3 місяці тому

      I am currently building out a project using supabase and your comment intrigues me. As far as I can tell the way to create a transaction like operation would probably be to create an endpoint out of a stored procedure. Alternatively, for things that do require a transaction I suppose I could use a sveltekit endpoint and have a backup plan like drizzle available. Curious what you are using for an API back end? Appreciate any feedback.

    • @abdirahmann
      @abdirahmann 3 місяці тому +1

      @@zBrain0 Please just save yourself some headache, DON'T write postgres functions to call over rpc, I'll tell you why:
      1. They are SUPER HARD to debug
      2. How are you going to do input validation, you'll have to write a bunch of IF statements in PG which are ugly and HUGE AF!, you might say... well use pg_jsonschema, i hear you but the community arround it is small and docs are pathetic!
      3. The worst DX imaginable!, no autocomplete, no nothing, its like writing regular text! HORRIBLE
      4. Having a ton of business logic in Postgres will slowly make your RLS rules Huge and very unoptimized!, you slowly find yourself writing business logic in RLS rules!
      5. Your codebase will be disjointed, some logic in pg functions and others in JS, you'll be miserable!
      Just write all your API in a normal backend, am not just saying this, I've gone through this horror of rewriting my entire app to have a proper backend and if you ever spent time in github issues, you'll quickly see the frustration of devs.
      Simple feature requests take forever to be implemented by supabase! Its insane, one of the features, "transactions in supabase" has been open for 5 years, they haven't fixed it since they launched, CRAZY!!
      SUPABASE Storage is also somewhat bad because they don't maintain it very well, its a light wrapper on S3 and the storage server has inconsistent responses, this has also been an issue for ages but they just don't care, they'll rather invest in flashy AI nonsense than fix a trivial bug in their backlog!
      I really wish they did better than this, when i discovered supabase, i was sold, but then reality hit me 💀💀.
      Their dashboards are great though and auth is good!
      anyways take care 😃👍

    • @abdirahmann
      @abdirahmann 3 місяці тому

      @@zBrain0 i made a very detailed and really good reply but UA-cam decided to remove it for some odd reason, maybe it was a very huge comment! tldr, you'll be having a nightmare writing rpc functions, not debuggable and they are just awful, spend time in suapabse github issues and you'll see what am talking about!

    • @abdirahmann
      @abdirahmann 3 місяці тому +1

      @@zBrain0 youtube just keeps deleting my replies, idk what to tell ya!

    • @bmdavis419
      @bmdavis419  3 місяці тому +1

      honestly I agree, I've said before that IMO supabase is just postgres, with awesome open source tools built on top (dashboard, auth, storage, etc.) the client API library is rough tho

  • @Ramnathk
    @Ramnathk 3 місяці тому

    Any reason u did not consider Fauna or Surreal DB that look like a good fit for your social app?

    • @bmdavis419
      @bmdavis419  3 місяці тому

      Too new and I'm a SQL guy

  • @cotyhamilton
    @cotyhamilton 3 місяці тому +4

    It’s me, I’m the one who shits on mongodb

  • @itsResists
    @itsResists 3 місяці тому +2

    Any opinions on Railway for using MySQL or postgreSQL?

    • @bmdavis419
      @bmdavis419  3 місяці тому +2

      it works great, but it lacks a lot of the features these other providers have and requires you do more work yourself. Great for dev, but in prod that gets dicey

    • @vatsalyavigyaverma5494
      @vatsalyavigyaverma5494 3 місяці тому

      ​​@@bmdavis419 yes that's my huddle tbf, like I can do horizontal pod autoscaling for astro/svelte/nextjs in kubernetes but for database i am still noob

    • @bmdavis419
      @bmdavis419  3 місяці тому

      @@vatsalyavigyaverma5494 same and that is EXACTLY why I use a provider, DB is the one piece that cannot break period, I don't want to risk that

  • @vatsalyavigyaverma5494
    @vatsalyavigyaverma5494 3 місяці тому +1

    Why not postgres? Like I host everything and never develop for big companies so I use MySQL or postgres

    • @bmdavis419
      @bmdavis419  3 місяці тому

      Supabase is how I would use postgres

  • @loek8638
    @loek8638 3 місяці тому

    excel is goat

  • @zozephh
    @zozephh 3 місяці тому +1

    I came here to complain about not seeing Postgres on the thumbnail

  • @zBrain0
    @zBrain0 3 місяці тому +1

    I see a couple of comments about the thumbnail but nobody has mentioned the fact that you put Excel on there. Well played LOL I watched the entire video just to see if you actually tried to make an argument for that.

    • @bmdavis419
      @bmdavis419  3 місяці тому +2

      Excel is there because it’s the best database, which requires no explanation

  • @lcarv20
    @lcarv20 3 місяці тому +1

    Firestore in the thumbnail as a trap hein? XD

    • @bmdavis419
      @bmdavis419  3 місяці тому +7

      just take everything I said about mongoDB and replace the word MongoDB with Firestore, and its the same thing lol

  • @ustav_o
    @ustav_o 2 місяці тому

    i like turso bc its fast and its free plan its rlly good

  • @chizidotdev
    @chizidotdev 3 місяці тому

    Saw the title and my brain instantly screamed PostgreSQL.
    Edit: Title is a bit incomplete… Should be “Picking a Database Provider is hard”

  • @martg0
    @martg0 3 місяці тому +1

    What about DynamoDB?

    • @lardosian
      @lardosian 3 місяці тому +1

      AWS is pain in his words so you can rule that one out!

  • @ouss
    @ouss 3 місяці тому

    Convex is the future

  • @averstrum6372
    @averstrum6372 3 місяці тому +1

    Excel on the thumbnail of this vid?

    • @bmdavis419
      @bmdavis419  3 місяці тому

      B/c it’s the best database

  • @drewbird87
    @drewbird87 3 місяці тому +1

    Have you met Convex?

    • @SonAyoD
      @SonAyoD 3 місяці тому

      I have!

  • @FredT34
    @FredT34 3 місяці тому

    You Should Try EdgeDB
    Seriously !!

    • @abdirahmann
      @abdirahmann 3 місяці тому

      is this even a real db? 🤣🤣🤣💀

    • @MattHeslington
      @MattHeslington 3 місяці тому

      As soon as the free cloud tier becomes available, I can see edgedb being a serious contender. Really powerful data structures and querying and built-in auth

    • @MattHeslington
      @MattHeslington 3 місяці тому

      No Geospatial data querying though

  • @labhamjain3915
    @labhamjain3915 3 місяці тому

    For me it was pretty clear I'll use localhosted pg 😂

  • @user-xi9cw4wq6l
    @user-xi9cw4wq6l 3 місяці тому

    For me its always Mongo or Postgre

  • @Cruzylife
    @Cruzylife 3 місяці тому +1

    serverless is not soy dev...fast and easy to ship

    • @bmdavis419
      @bmdavis419  3 місяці тому

      agreed, its just the current thing people are mad about lol, VPSs are trendy

  • @ashimov1970
    @ashimov1970 3 місяці тому +2

    Why no consideration given to Xata? It's definitely the best of the best nowadays

    • @bmdavis419
      @bmdavis419  3 місяці тому +2

      I don't have any experience with it, its on the (long) list of stuff I want to try

    • @PTBKoo
      @PTBKoo 3 місяці тому

      I’ve been testing xata and moving data over from planetscale and drizzle just released a xata connector. One of the reasons I chose xata is they have the best free tier (15gb with no limits on reads and writes). They use aws aurora pg under the hood and it seems good so far but who know how long this free tier will last as it seems to good to be true.

  • @ThannMalin
    @ThannMalin 3 місяці тому

    There is no wrong with Firebase

  • @laztheripper
    @laztheripper 3 місяці тому

    It isn't hard because the only good choice is postgres :)

  • @naga_sg
    @naga_sg 3 місяці тому +2

    first

    • @tedspens
      @tedspens 3 місяці тому +1

      First reply!

  • @hakuna_matata_hakuna
    @hakuna_matata_hakuna 3 місяці тому +1

    how are you still shilling those rug pullers , if you're building a social site a graph db is the way to go anyways