Home / Cursor rules / Database
Database
Database best practices focusing on Prisma and Supabase integration
Cursor rules (.mdc)Public domain (CC0)
–unranked
Install
mkdir -p .cursor/rules && curl -sL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/b044f956f021b6e8877f16781bcfc466a6a120e9/rules/database.mdc -o .cursor/rules/database.mdcDownloads the file at commit b044f956f021 into .cursor/rules/.
To remove it later:
rm .cursor/rules/database.mdcContext cost: ≈517 tokens when used.
Rules file
--- description: "Database best practices focusing on Prisma and Supabase integration" globs: prisma/**/*, src/db/**/*, **/*.prisma, supabase/**/* alwaysApply: false --- # Database Best Practices ## Prisma Setup - Use proper schema design - Implement proper migrations - Use proper relation definitions - Configure proper connection - Implement proper seeding - Use proper client setup ## Prisma Models - Use proper model naming - Implement proper relations - Use proper field types - Define proper indexes - Implement proper constraints - Use proper enums ## Prisma Queries - Use proper query optimization - Implement proper filtering - Use proper relations loading - Handle transactions properly - Implement proper pagination - Use proper aggregations ## Supabase Setup - Configure proper project setup - Implement proper authentication - Use proper database setup - Configure proper storage - Implement proper policies - Use proper client setup ## Supabase Security - Implement proper RLS policies - Use proper authentication - Configure proper permissions - Handle sensitive data properly - Implement proper backups - Use proper encryption ## Supabase Queries - Use proper query optimization - Implement proper filtering - Use proper joins - Handle real-time properly - Implement proper pagination - Use proper functions ## Database Design - Use proper normalization - Implement proper indexing - Use proper constraints - Define proper relations - Implement proper cascades - Use proper data types ## Performance - Use proper connection pooling - Implement proper caching - Use proper query optimization - Handle N+1 queries properly - Implement proper batching - Monitor performance metrics ## Security - Use proper authentication - Implement proper authorization - Handle sensitive data properly - Use proper encryption - Implement proper backups - Monitor security issues ## Best Practices - Follow database conventions - Use proper migrations - Implement proper versioning - Handle errors properly - Document schema properly - Monitor database health
Security
Scanned Nov 4, 2026 at commit b044f956f021, with Cisco's open-source skill-scanner.
None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.
A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan