Latest
MongoDB NoSQL Development
Mongodb Advanced This document provides comprehensive guidelines for mongodb advanced development and best practices. Query Operations Find Find operations with complex criteria Implement proper find operations with complex criteria Follow best practices for optimal results Projection Projection to limit returned fields Implement proper projection to limit returned fields Follow best practices for optimal results Sorting Sorting and limiting results Implement proper sorting and limiting results Follow best practices for optimal results Regular Regular expressions for text matching Implement proper regular expressions for text matching Follow best practices for optimal results Geospatial Geospatial queries for location data Implement proper geospatial queries for location data Follow best practices for optimal results Indexing Strategies Single Single field and compound indexes Implement proper single field and compound indexes Follow best practices for optimal results Text Text indexes for full-text search Implement proper text indexes for full-text search Follow best practices for optimal results Geospatial Geospatial indexes (2d, 2dsphere) Implement proper geospatial indexes (2d, 2dsphere) Follow best practices for optimal results Sparse Sparse and partial indexes Implement proper sparse and partial indexes Follow best practices for optimal results Index Index intersection and optimization Implement proper index intersection and optimization Follow best practices for optimal results Data Modeling Patterns Attribute Attribute pattern for varying schemas Implement proper attribute pattern for varying schemas Follow best practices for optimal results Bucket Bucket pattern for time-series data Implement proper bucket pattern for time-series data Follow best practices for optimal results Subset Subset pattern for large documents Implement proper subset pattern for large documents Follow best practices for optimal results Computed Computed pattern for pre-calculated values Implement proper computed pattern for pre-calculated values Follow best practices for optimal results Tree Tree patterns for hierarchical data Implement proper tree patterns for hierarchical data Follow best practices for optimal results Replication Replica Replica set configuration Implement proper replica set configuration Follow best practices for optimal results Primary Primary and secondary nodes Implement proper primary and secondary nodes Follow best practices for optimal results Read Read preference strategies Implement proper read preference strategies Follow best practices for optimal results Automatic Automatic failover Implement proper automatic failover Follow best practices for optimal results Oplog Oplog monitoring Implement proper oplog monitoring Follow best practices for optimal results Security Authentication Authentication mechanisms Implement proper authentication mechanisms Follow best practices for optimal results Role-based Role-based access control (RBAC) Implement proper role-based access control (rbac) Follow best practices for optimal results Field-level Field-level security Implement proper field-level security Follow best practices for optimal results Encryption Encryption at rest and in transit Implement proper encryption at rest and in transit Follow best practices for optimal results Audit Audit logging Implement proper audit logging Follow best practices for optimal results Development Best Practices Connection Connection management Implement proper connection management Follow best practices for optimal results Error Error handling patterns Implement proper error handling patterns Follow best practices for optimal results Data Data validation strategies Implement proper data validation strategies Follow best practices for optimal results Testing Testing with embedded MongoDB Implement proper testing with embedded mongodb Follow best practices for optimal results Schema Schema evolution patterns Implement proper schema evolution patterns Follow best practices for optimal results Summary Checklist [ ] Core principles implemented [ ] Best practices followed [ ] Performance optimized [ ] Security measures in place [ ] Testing strategy implemented [ ] Documentation completed [ ] Monitoring configured [ ] Production deployment ready Follow these comprehensive guidelines for successful mongodb advanced implementation.
MySQL Database Development
MySQL Database Development This document provides comprehensive guidelines for designing, optimizing, and managing MySQL databases for high-performance applications. Database Design Entity-Relationship Modeling Create clear ER diagrams for complex schemas Define relationships between entities properly Plan for future scalability and changes Normalization and Denormalization Apply normalization rules to reduce redundancy Use strategic denormalization for performance Balance between storage efficiency and query speed Schema Design Best Practices Use appropriate data types for columns Implement proper primary and foreign key constraints Plan table partitioning strategies for large datasets Indexing Strategies Index Types and Usage Implement B-tree indexes for range queries Use hash indexes for exact match lookups Create composite indexes for multi-column queries Index Design Best Practices Create covering indexes to avoid table lookups Use partial indexes for filtered queries Monitor index usage and remove unused indexes Replication and High Availability Replication Setup Configure master-slave replication for read scaling Implement master-master replication for write scaling Monitor replication lag and health Failover and Recovery Design automatic failover procedures Test disaster recovery scenarios regularly Implement proper backup and recovery strategies Security Best Practices Access Control Implement principle of least privilege for users Use strong password policies and rotation Configure SSL/TLS encryption for connections Auditing and Monitoring Enable audit logging for sensitive operations Monitor failed login attempts and suspicious activity Implement database firewall rules Scaling Strategies Horizontal Scaling Implement database sharding for large datasets Configure read replicas for read-heavy workloads Use connection pooling and load balancing Vertical Scaling Monitor resource usage and upgrade hardware Optimize memory allocation and CPU usage Plan for storage capacity growth Development Integration ORM Best Practices Configure connection pooling properly Implement efficient transaction management Use prepared statements to prevent SQL injection Error Handling Implement comprehensive error handling patterns Log database errors appropriately Plan for connection failure scenarios Build robust, high-performance MySQL databases following these comprehensive best practices.
PostgreSQL Database Development
Postgresql Advanced This document provides comprehensive guidelines for postgresql advanced development and best practices. Advanced SQL Window Window functions for analytical queries Implement proper window functions for analytical queries Follow best practices for optimal results Common Common Table Expressions (CTEs) Implement proper common table expressions (ctes) Follow best practices for optimal results Recursive Recursive queries Implement proper recursive queries Follow best practices for optimal results JSONB JSONB operations and indexing Implement proper jsonb operations and indexing Follow best practices for optimal results Full-text Full-text search capabilities Implement proper full-text search capabilities Follow best practices for optimal results Performance Optimization Query Query plan analysis with EXPLAIN Implement proper query plan analysis with explain Follow best practices for optimal results Index Index usage and optimization Implement proper index usage and optimization Follow best practices for optimal results Table Table partitioning strategies Implement proper table partitioning strategies Follow best practices for optimal results Connection Connection pooling with PgBouncer Implement proper connection pooling with pgbouncer Follow best practices for optimal results Query Query optimization techniques Implement proper query optimization techniques Follow best practices for optimal results Data Types & Features JSONB JSONB for semi-structured data Implement proper jsonb for semi-structured data Follow best practices for optimal results Arrays Arrays for list data Implement proper arrays for list data Follow best practices for optimal results UUID UUID for unique identifiers Implement proper uuid for unique identifiers Follow best practices for optimal results Geometric Geometric types for spatial data Implement proper geometric types for spatial data Follow best practices for optimal results Custom Custom enumerated types Implement proper custom enumerated types Follow best practices for optimal results Backup & Recovery pg_dump pg_dump for logical backups Implement proper pg_dump for logical backups Follow best practices for optimal results Continuous Continuous archiving with WAL Implement proper continuous archiving with wal Follow best practices for optimal results Point-in-time Point-in-time recovery (PITR) Implement proper point-in-time recovery (pitr) Follow best practices for optimal results Streaming Streaming replication setup Implement proper streaming replication setup Follow best practices for optimal results Backup Backup verification strategies Implement proper backup verification strategies Follow best practices for optimal results High Availability Master-slave Master-slave replication Implement proper master-slave replication Follow best practices for optimal results Streaming Streaming replication Implement proper streaming replication Follow best practices for optimal results Logical Logical replication Implement proper logical replication Follow best practices for optimal results Connection Connection failover Implement proper connection failover Follow best practices for optimal results Load Load balancing strategies Implement proper load balancing strategies Follow best practices for optimal results Advanced Features Materialized Materialized views for performance Implement proper materialized views for performance Follow best practices for optimal results Foreign Foreign data wrappers (FDW) Implement proper foreign data wrappers (fdw) Follow best practices for optimal results Table Table inheritance Implement proper table inheritance Follow best practices for optimal results Exclusion Exclusion constraints Implement proper exclusion constraints Follow best practices for optimal results Extensions Extensions and custom types Implement proper extensions and custom types Follow best practices for optimal results Follow these comprehensive guidelines for successful postgresql advanced implementation.
Redis Caching & Data Store
Redis Caching This document provides comprehensive guidelines for redis caching development and best practices. Data Types & Operations Strings Strings for simple key-value storage Implement proper strings for simple key-value storage Follow best practices for optimal results Lists Lists for queues and stacks Implement proper lists for queues and stacks Follow best practices for optimal results Sets Sets for unique collections Implement proper sets for unique collections Follow best practices for optimal results Sorted Sorted sets for leaderboards Implement proper sorted sets for leaderboards Follow best practices for optimal results Hashes Hashes for object storage Implement proper hashes for object storage Follow best practices for optimal results Session Management User User session storage Implement proper user session storage Follow best practices for optimal results Shopping Shopping cart persistence Implement proper shopping cart persistence Follow best practices for optimal results Authentication Authentication token storage Implement proper authentication token storage Follow best practices for optimal results Session Session clustering across servers Implement proper session clustering across servers Follow best practices for optimal results Session Session security considerations Implement proper session security considerations Follow best practices for optimal results Performance Optimization Connection Connection pooling strategies Implement proper connection pooling strategies Follow best practices for optimal results Pipeline Pipeline operations for bulk commands Implement proper pipeline operations for bulk commands Follow best practices for optimal results Memory Memory optimization techniques Implement proper memory optimization techniques Follow best practices for optimal results Lua Lua scripting for complex operations Implement proper lua scripting for complex operations Follow best practices for optimal results Redis Redis cluster for scalability Implement proper redis cluster for scalability Follow best practices for optimal results High Availability Master-slave Master-slave replication Implement proper master-slave replication Follow best practices for optimal results Redis Redis Sentinel for failover Implement proper redis sentinel for failover Follow best practices for optimal results Redis Redis Cluster for partitioning Implement proper redis cluster for partitioning Follow best practices for optimal results Backup Backup and recovery strategies Implement proper backup and recovery strategies Follow best practices for optimal results Monitoring Monitoring and alerting Implement proper monitoring and alerting Follow best practices for optimal results Application Integration Node.js Node.js Redis clients (ioredis, redis) Implement proper node.js redis clients (ioredis, redis) Follow best practices for optimal results Python Python integration with redis-py Implement proper python integration with redis-py Follow best practices for optimal results Java Java integration with Jedis/Lettuce Implement proper java integration with jedis/lettuce Follow best practices for optimal results Connection Connection management best practices Implement proper connection management best practices Follow best practices for optimal results Error Error handling and retry logic Implement proper error handling and retry logic Follow best practices for optimal results Deployment Patterns Docker Docker containerization Implement proper docker containerization Follow best practices for optimal results Kubernetes Kubernetes deployment Implement proper kubernetes deployment Follow best practices for optimal results Cloud Cloud provider integrations (AWS ElastiCache) Implement proper cloud provider integrations (aws elasticache) Follow best practices for optimal results Configuration Configuration management Implement proper configuration management Follow best practices for optimal results Scaling Scaling strategies Implement proper scaling strategies Follow best practices for optimal results Summary Checklist [ ] Core principles implemented [ ] Best practices followed [ ] Performance optimized [ ] Security measures in place [ ] Testing strategy implemented [ ] Documentation completed [ ] Monitoring configured [ ] Production deployment ready Follow these comprehensive guidelines for successful redis caching implementation.
Browse Cursor Rules - Cursor IDE Community Prompts & Configurations