General
Database

Studio

Learn how to use Prisma Studio to view and interact with your database.

Prisma Studio is a visual database editor that allows you to view and edit your database records directly in your browser.

Start Prisma Studio

To start Prisma Studio, run the following command from the root of your project:

Terminal
npx prisma studio

Make sure your DATABASE_URL is correctly set in your .env file before starting Prisma Studio.

Using Prisma Studio

Prisma Studio allows you to:

  • View all your database tables and data - Browse through all models and see their records
  • Edit records directly in the browser - Update, create, or delete records without writing SQL
  • Run queries and see results - Execute queries and view results
  • Inspect your Prisma schema - See the structure of your models, fields, and relationships

Features

Browse Models

Navigate through all your Prisma models using the sidebar. Click on any model to view its data.

Edit Records

  • Add new records - Click the "Add record" button to create new records
  • Edit existing records - Click on any field to edit its value
  • Delete records - Select records and delete them using the delete button

View Relationships

Prisma Studio shows relationships between models:

  • One-to-many - See related records in nested views
  • Many-to-many - Manage junction table records
  • One-to-one - View linked records

Use the search and filter features to:

  • Find specific records
  • Filter by field values
  • Sort records by any field

Alternative Database Tools

While Prisma Studio is convenient, you can also use other database GUI tools:

  • TablePlus - Modern database management tool
  • DBeaver - Universal database tool
  • pgAdmin - PostgreSQL administration tool
  • Postico - PostgreSQL client for macOS

Troubleshooting

Studio won't start

If Prisma Studio won't start, check:

  1. Database connection - Ensure DATABASE_URL is set correctly in .env
  2. Port availability - Make sure port 5555 is not already in use
  3. Database running - Verify your database server is running
  4. Prisma Client - Run npx prisma generate if you get client errors

Can't see models

If you can't see your models in Prisma Studio:

  1. Check schema - Ensure your schema.prisma file is correct
  2. Run migrations - Make sure all migrations have been applied
  3. Generate client - Run npx prisma generate to regenerate the client
  4. Refresh - Try refreshing the browser