[
{
"text": "PostgreSQL is a powerful open-source relational database management system. It's ACID-compliant and supports complex queries, transactions, and foreign keys. Best for: applications requiring strong consistency, complex queries, and structured data. Scales vertically well and horizontally with tools like Citus. Used by: Instagram, Spotify, Reddit. Performance: can handle millions of rows with proper indexing. Cons: vertical scaling limits, complex sharding setup.",
"metadata": {
"category": "database",
"technology": "postgresql",
"type": "relational",
"source": "tech_docs"
}
},
{
"text": "MongoDB is a document-oriented NoSQL database that stores data in flexible JSON-like documents. Best for: rapid development, flexible schemas, and document storage. Excellent horizontal scaling via sharding. Used by: Uber, Lyft, eBay. Performance: handles high write loads well. Cons: weaker consistency guarantees than relational databases, can be memory-intensive. Great for content management, real-time analytics, and IoT applications.",
"metadata": {
"category": "database",
"technology": "mongodb",
"type": "nosql",
"source": "tech_docs"
}
},
{
"text": "Redis is an in-memory key-value store known for extreme performance. Supports rich data structures like strings, hashes, lists, sets, and sorted sets. Best for: caching, session storage, real-time analytics, pub/sub messaging. Performance: millions of operations per second. Used by: Twitter, GitHub, Stack Overflow. Cons: memory-bound, data persistence trade-offs. Essential for reducing database load and improving response times.",
"metadata": {
"category": "database",
"technology": "redis",
"type": "cache",
"source": "tech_docs"
}
},
{
"text": "MySQL is a widely-used open-source relational database. Known for reliability and ease of use. Best for: web applications, e-commerce, and content management systems. Good read performance. Used by: Facebook, YouTube, Shopify. Scales well with read replicas. Cons: limited horizontal scaling, less feature-rich than PostgreSQL. Excellent for LAMP stack applications and WordPress sites.",
"metadata": {
"category": "database",
"technology": "mysql",
"type": "relational",
"source": "tech_docs"
}
},
{
"text": "Cassandra is a wide-column NoSQL database designed for massive scale. Provides linear scalability and no single point of failure. Best for: time-series data, write-heavy workloads, and applications requiring multi-datacenter replication. Used by: Netflix, Apple, Discord. Performance: petabyte-scale with excellent write performance. Cons: eventual consistency, complex for simple queries, steep learning curve.",
"metadata": {
"category": "database",
"technology": "cassandra",
"type": "nosql",
"source": "tech_docs"
}
},
{
"text": "DynamoDB is AWS's fully managed NoSQL database with single-digit millisecond latency at any scale. Best for: serverless applications, mobile backends, gaming. Automatic scaling and built-in security. Used by: Lyft, Airbnb, Samsung. Performance: scales seamlessly. Cons: vendor lock-in, can be expensive at scale, limited query flexibility. Excellent for AWS-native applications.",
"metadata": {
"category": "database",
"technology": "dynamodb",
"type": "nosql",
"source": "tech_docs"
}
},
{
"text": "Elasticsearch is a distributed search and analytics engine built on Apache Lucene. Best for: full-text search, log analytics, and real-time application monitoring. Part of the ELK stack. Used by: Wikipedia, GitHub, Netflix. Performance: near real-time search. Cons: resource-intensive, complex cluster management. Essential for applications requiring powerful search capabilities.",
"metadata": {
"category": "database",
"technology": "elasticsearch",
"type": "search",
"source": "tech_docs"
}
},
{
"text": "For chat applications with 100K+ DAU, consider PostgreSQL for user data and message history with Redis for real-time caching and pub/sub. Use Redis for session management and online user tracking. Scale PostgreSQL with read replicas and partitioning by user ID. This combination provides strong consistency for critical data while maintaining sub-10ms response times for real-time features.",
"metadata": {
"category": "database",
"use_case": "chat_app",
"scale": "100k_dau",
"source": "architecture_patterns"
}
},
{
"text": "E-commerce platforms benefit from PostgreSQL for transactional data (orders, payments) due to ACID guarantees, MongoDB for product catalogs with flexible schemas, and Redis for cart sessions and product recommendations. Use Elasticsearch for product search. This multi-database approach ensures data integrity for financial transactions while providing flexibility for product data.",
"metadata": {
"category": "database",
"use_case": "ecommerce",
"source": "architecture_patterns"
}
},
{
"text": "Time-series data applications like monitoring and IoT should use TimescaleDB (PostgreSQL extension) or InfluxDB for metrics, with Redis for real-time aggregations. For massive scale (billions of data points), consider Cassandra or AWS Timestream. These databases are optimized for time-ordered data with efficient compression and retention policies.",
"metadata": {
"category": "database",
"use_case": "time_series",
"source": "architecture_patterns"
}
}
]