Why ORMs
Course: Prisma - chapter 2
1. Simpler syntax (converts objects to SQL queries under the hood)
Section titled “1. Simpler syntax (converts objects to SQL queries under the hood)”
2. Abstraction that lets you flip the database you are using. Unified API irrespective of the DB
Section titled “2. Abstraction that lets you flip the database you are using. Unified API irrespective of the DB”
3. Type safety/Auto completion
Section titled “3. Type safety/Auto completion”
4. Automatic migrations
Section titled “4. Automatic migrations”In case of a simple Postgres app, it’s very hard to keep track of all the commands that were ran that led to the current schema of the table.

CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(100), email VARCHAR(100) UNIQUE NOT NULL);
ALTER TABLE usersADD COLUMN phone_number VARCHAR(15);As your app grows, you will have a lot of these CREATE and ALTER commands.
ORMs (or more specifically Prisma) maintains all of these for you.
For example - https://github.com/code100x/cms/tree/main/prisma/migrations