ODM vs ORM
ODM - Object Document Model
Generally used to interact with Document based DB.
Example - Mongoose
ORM - Object Relational Mapping
Generally used to interact with Relational DB
Example - Prisma, Sequelize
the Query engine of prisma is built on top of Rust
Step 1 - Add the Prisma CLI as a development dependency.
npm install prisma typescript ts-node @types/node --save-dev
Step 2 - Next, initialize TypeScript:
npx tsc --init
Step 3 - You can now invoke the Prisma CLI by prefixing it with npx
npx prisma init
The above command does two things - Create prisma folder and adds schema.prisma file and creates an .env file which stores the url for the DB