Database Tutorial #19: ORMs vs Raw SQL — Prisma, SQLAlchemy, GORM

An ORM (Object-Relational Mapper) lets you work with your database using your programming language instead of SQL. It reduces boilerplate and prevents SQL injection. But ORMs also add abstraction — and abstraction can hide performance problems. When to Use an ORM vs Raw SQL Use an ORM when: You do standard CRUD (create, read, update, delete) You want type safety and IDE autocomplete You want schema migrations integrated with your code You are building fast and the query complexity is low Use raw SQL when: ...

August 9, 2026 · 5 min

Database Tutorial #7: PostgreSQL Migrations and Schema Design

Your schema is the foundation of everything. Bad schema decisions are expensive to fix later. Good ones make your application easier to build and scale. Why Migrations? A migration is a versioned SQL file that changes your schema. Instead of running ALTER TABLE manually in production and hoping everyone does the same, migrations track every schema change in version control. Every team member applies the same migrations in the same order. Your CI pipeline applies them automatically. Rollbacks are possible. ...

August 5, 2026 · 6 min