dwyl / learn-postgresql

🐘 Learn how to use PostgreSQL and Structured Query Language (SQL) to store and query your relational data. 🔍
212 stars 23 forks source link

Prisma #77

Open nelsonic opened 3 years ago

nelsonic commented 3 years ago

I hadn't used Prisma before today. https://github.com/prisma/prisma It's much nicer than other other Node/TS ORMs. Try it: https://www.prisma.io/docs/getting-started/quickstart-typescript

It's not quite "5 mins", but close enough. image image

If you're using Postgres/MySQL in Node.js, this is the way to go.

nelsonic commented 3 years ago

Includes a basic query interface: npx prisma studio

image

nelsonic commented 3 years ago

Tomorrow I will be diving into this example: https://github.com/prisma/prisma-examples/tree/latest/typescript/graphql-apollo-server

nelsonic commented 3 years ago

The project switched to DynamoDB and it's much worse than PostreSQL. The query syntax is clumsy, there are no joins between tables and scans are slow. All so that they don't have to manage a Database. Which is bonkers considering there is Aurora: https://aws.amazon.com/rds/aurora which is fully managed cheap and fast.

Keeping this Open as the tutorial I'm writing uses Node.js and Prisma is a good idea in Node-land.