Which database do you use with RedwoodJS?

Hi everyone🖐, I am curios to know which database does the RedwoodJS community used while developing in RedwoodJS and whether it is in production already.

I know that RedwoodJS is using Prisma, hence RedwoodJS can only works well with SQLite, MySql and PostgreSQL right?

I’m using Postgres. Heroku’s free tier is perfect.

1 Like

For the most part people are using Postgres on Heroku or another major Postgres provider like Azure and other Postgres like things such as Supabase. But it really depends what you mean by “works well with.”

Prisma gives you a lot of extra functionality that you would expect from a query builder or ORM but some developers are fine just writing raw queries for their database.

Redwood can be fairly easily hooked up to any database that has a GraphQL API such as FaunaDB and really any database with a JavaScript driver can be wired up to Redwood. There has also been discussion around JSON databases like LowDB.

2 Likes

I recently switched over to Postgres from MySQL/MariaDB mainly because of this (technical details here).

I roll my own infrastructure in Kubernetes, but using Azure Database for MariaDB for critical things. I’ll most likely end up using Azure Database for Postgres later on. (Side note; Microsoft is really good at picking bad names for their product offerings).

If you end up using Postgres, you might find this db-reset script helpful during early prototyping. Granted, it’s not pretty but it does the job for now.

2 Likes

Postgres is just the best open source database, no questions about it. Arguably even the best among all databases.

1 Like

+1 for Postrgres – but I have been trying out https://supabase.io/.

1 Like

I’m not familiar with databases, would love to learn your thoughts on the features of PostgreSQL that you like over MySQL.:smiley:

That’s a really great question, the differences between Postgres and MySQL are varied and subtle.

From a high level perspective while both are technically considered open source projects, MySQL was purchased by Oracle (Sun at the time of purchase) while Postgres has always been more of a community lead effort. That tends to nudge people one way or the other depending on how they philosophically feel about that.

At a low level, Postgres has one canonical storage engine while MySQL has many different storage engines that can be swapped out, InnoDB and MyISAM being the most common.

In terms of querying they are very similar, each follows similar variants of SQL which is why they are so commonly compared to each other.

Here are some other good resources about the differences:

PostgreSQL Vs. MySQL: Differences In Performance, Syntax, And Features

Why I Choose PostgreSQL Over MySQL/MariaDB

1 Like