πΎ Data Modeling Deep Dive
Intro
Run locally for transcripts
π¨βπΌ Hello, my name is Peter the Product Manager. I'm here to help you get
oriented and to give you your assignments for the day. We're going to have you
working on the data for the Epic Notes app today.
So far our data has just lived in memory but we're finally ready to start
persisting things to a database. We've decided to use SQLite for our database
and Prisma as our ORM. You're going to need to get that all set up. Just as if
you had been hired to work with us today. Throughout the workshop, you'll learn
important foundational skills of full stack development like:
- Creating a Database Schema
- Managing Data Relationships
- Managing Data Migrations
- Seeding Data
- Generating Seed Data
- Querying Data
- Updating Data
- Writing Raw SQL
- Optimizing your models for query performance
It's a big job and there's lots to do, so, let's get started!
You'll be running a lot of terminal commands in this workshop. These terminal
commands need to be run from the
playground
directory of the project. Any
exceptions will be noted.π¦ Prisma Tips:
- If your development database ever gets in a bad state, you can always delete the database file itself and prisma will recreate it for you next time you run something. (Note that you'll lose all your data if you do this, but we're working with fake data anyway so it's fine... Just don't do this with your production database π ).
- Install the VSCode extension for Prisma for syntax highlighting, formatting, and linting of your Prisma Schema
Over time, some things may change in the workshop material from the videos you
watch. You can learn about these changes in the
CHANGELOG.md
file of the
repo.