API with NestJS #33. Managing PostgreSQL relationships with Prisma

API with NestJS #33. Managing PostgreSQL relationships with Prisma

API with NestJS #33. Managing PostgreSQL relationships with Prisma. We learn about various types of relationships and implement them with PostgreSQL and Prisma. We learn about various types of relationships and implement them with Postgres. The seventh part of this series, we use Prisma.

  • 1.  API with NestJS #1. Controllers, routing and the module structure
  • 2.  API with NestJS #2. Setting up a PostgreSQL database with TypeORM
  • 3.  API with NestJS #3. Authenticating users with bcrypt, Passport, JWT, and cookies
  • 4.  API with NestJS #4. Error handling and data validation
  • 5.  API with NestJS #5. Serializing the response with interceptors
  • 6.  API with NestJS #6. Looking into dependency injection and modules
  • 7.  API with NestJS #7. Creating relationships with Postgres and TypeORM
  • 8.  API with NestJS #8. Writing unit tests
  • 9.  API with NestJS #9. Testing services and controllers with integration tests
  • 10.  API with NestJS #10. Uploading public files to Amazon S3
  • 11.  API with NestJS #11. Managing private files with Amazon S3
  • 12.  API with NestJS #12. Introduction to Elasticsearch
  • 13.  API with NestJS #13. Implementing refresh tokens using JWT
  • 14.  API with NestJS #14. Improving performance of our Postgres database with indexes
  • 15.  API with NestJS #15. Defining transactions with PostgreSQL and TypeORM
  • 16.  API with NestJS #16. Using the array data type with PostgreSQL and TypeORM
  • 17.  API with NestJS #17. Offset and keyset pagination with PostgreSQL and TypeORM
  • 18.  API with NestJS #18. Exploring the idea of microservices
  • 19.  API with NestJS #19. Using RabbitMQ to communicate with microservices
  • 20.  API with NestJS #20. Communicating with microservices using the gRPC framework
  • 21.  API with NestJS #21. An introduction to CQRS
  • 22.  API with NestJS #22. Storing JSON with PostgreSQL and TypeORM
  • 23.  API with NestJS #23. Implementing in-memory cache to increase the performance
  • 24.  API with NestJS #24. Cache with Redis. Running the app in a Node.js cluster
  • 25.  API with NestJS #25. Sending scheduled emails with cron and Nodemailer
  • 26.  API with NestJS #26. Real-time chat with WebSockets
  • 27.  API with NestJS #27. Introduction to GraphQL. Queries, mutations, and authentication
  • 28.  API with NestJS #28. Dealing in the N + 1 problem in GraphQL
  • 29.  API with NestJS #29. Real-time updates with GraphQL subscriptions
  • 30.  API with NestJS #30. Scalar types in GraphQL
  • 31.  API with NestJS #31. Two-factor authentication
  • 32.  API with NestJS #32. Introduction to Prisma with PostgreSQL
  • 33. API with NestJS #33. Managing PostgreSQL relationships with Prisma

As applications grow, the number of different entities also increases. A crucial part of learning how to design a database is creating relationships between them. This is because our entities will often relate to each other in some way.

Relational databases such as PostgreSQL are an industry standard for quite some time now. Although there are NoSQL alternatives such as MongoDB, SQL might still be considered a better choice, especially for structured data that contains a lot of relations.

In this article, we learn about various types of relationships and implement them with Postgres. Instead of using TypeORM as we did in the seventh part of this series, we use Prisma.

Throughout the article, we often use functionalities developed in other parts of this series. If you want to see the full code, you can find it in  this repository.

javascript nestjs typescript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

What is TypeScript? Why TypeScript? and Why Not TypeScript?

TypeScript extends JavaScript by adding Types. There are many great reasons to switch to TypeScript. Especially if your team uses JavaScript. There are some reasons to not use TypeScript as there are with any language or framework.

Will TypeScript Replace JavaScript? Learn TypeScript | TypeScript Tutorial 2021

In today's video, I'm gonna show you all the basic concepts you need to know to be successful with TypeScript as well as how you can start using TypeScript right away with React. TypeScript will make you a better JavaScript developer for several reasons. You’ll feel confident when writing code. Fewer errors will appear in your production code. It will be easier to refactor code. You’ll write fewer tests. And overall, you’ll have a better coding experience in your editor.

Building Modern Nodejs Application using Nestjs and TypeScript

Building Modern Nodejs Application using Nestjs and TypeScript - In this article, we will see how to build REST API using Nestjs with TypeScript. Building Modern Nodejs Application using Nestjs and TypeScript

Hire Dedicated JavaScript Developers -Hire JavaScript Developers

Hire dedicated JavaScript Developers who are proficient in AngularJS, ReactJS, NodeJS, & VueJS frameworks. Get flexible hiring models as per your business requirements.

TypeScript Tutorial For JavaScript Developers - TypeScript Basics

TypeScript Tutorial For JavaScript Developers - TypeScript Basics. I will show you guys 4 example of JavaScript code, and how to convert it to TypeScript. This is a typescript beginners tutorial.