Best of DatabaseApril 2025

  1. 1
    Article
    Avatar of architectureweeklyArchitecture Weekly·1y

    PostgreSQL JSONB - Powerful Storage for Semi-Structured Data

    PostgreSQL JSONB offers a powerful method for storing and querying semi-structured data. JSONB stores data in a binary format, allowing for efficient indexing and querying without the need for repeated parsing. The article discusses the internal structure of JSONB, performance benefits, and various indexing strategies like GIN and B-Tree to optimize JSONB queries. It also covers practical applications, such as using JSONB for managing heterogeneous data models and ensuring query performance. Although JSONB provides flexibility, it's essential to understand its performance implications for large datasets.

  2. 2
    Article
    Avatar of hnHacker News·1y

    Database Relationship Diagrams Design Tool

    Dbdiagram offers a free tool for developers and analysts to design database relationship diagrams using simple DSL language. The platform supports features like ER diagram creation, web-based database documentation, and defining database schemas through code. Users can benefit from a streamlined development workflow for database design and analysis.

  3. 3
    Article
    Avatar of towardsdevTowards Dev·1y

    Introduction to Redis (Part 1)

    Redis is an open-source, in-memory data structure store used as a database, cache, and message broker. It supports various data structures such as strings, hashes, and lists. Redis is known for its high performance, flexibility, and durability. It offers features like in-memory storage with persistence options, multi-language support, and scalability through master-slave replication. Redis can act as both a secondary database for caching and a primary database for modern applications.

  4. 4
    Article
    Avatar of devtoDEV·1y

    📍The Art of Choosing the Right Database

    Choosing the right database involves understanding the underlying storage engines and transaction protocols. This post explores the differences between SQL and NoSQL databases, focusing on B-Trees and LSM Trees. It discusses the strengths and use cases for databases like MySQL, MongoDB, Cassandra, and PostgreSQL, and highlights the importance of considering read vs. write-heavy workloads and transaction requirements.

  5. 5
    Article
    Avatar of rubylaRUBYLAND·1y

    Fix N+1 Queries Without Eager Loading Using SQL Subquery

    Learn how to address the N+1 query problem in Rails without resorting to eager loading. By leveraging SQL subqueries, you can fetch specific associated records directly within your main query, reducing memory consumption and improving performance. The post walks through a real-world example of fetching a member's latest activity timestamp efficiently, discussing various approaches and their trade-offs before demonstrating the optimal SQL subquery solution.

  6. 6
    Article
    Avatar of bytebytegoByteByteGo·1y

    How Meta Built Threads to Support 100 Million Signups in 5 Days

    Meta's Threads platform achieved a rapid growth of 100 million signups by leveraging existing, robust infrastructures like ZippyDB and Async. ZippyDB, a distributed key-value store, ensured scalability and strong consistency, while Async, a serverless computing engine, handled trillions of background tasks to support seamless user experiences. These systems, honed by Meta's experience with Facebook, Instagram, and WhatsApp, allowed Threads to scale effortlessly without the need for bespoke solutions.

  7. 7
    Article
    Avatar of lobstersLobsters·1y

    pgdogdev/pgdog: Horizontal scaling for PostgreSQL with automatic sharding.

    PgDog is a fast, secure transaction pooler and logical replication manager for PostgreSQL that supports automatic sharding. Written in Rust, it can manage hundreds of databases and thousands of connections, offering features like cross-shard queries, health checks, and failover. It includes tools for Docker and Helm deployment, PostgreSQL client compatibility, and detailed configuration files. PgDog is open source and licensed under AGPL v3.

  8. 8
    Article
    Avatar of dailydoseofdsDaily Dose of Data Science | Avi Chawla | Substack·1y

    MCP-powered Agentic RAG

    A demonstration of an MCP-powered Agentic RAG system shows how to use an MCP-driven workflow for searching a vector database and falling back to web search when necessary. The system employs tools such as Qdrant for the vector database, Bright Data for web scraping, and Cursor as the MCP client. The post includes a detailed guide on setting up the MCP server, integrates it with Cursor, and addresses common challenges like IP blocks and bots using Bright Data.

  9. 9
    Article
    Avatar of neontechNeon·1y

    The Noisy Neighbor Problem in Multitenant Architectures

    Neon addresses the noisy neighbor problem in multitenant architectures by using a project-per-tenant model with true isolation. This setup ensures each tenant has its own logically isolated Postgres environment, decoupled storage and compute, and autoscaling to eliminate resource contention. Neon's approach leverages serverless technologies to provide cost-efficient and scalable database solutions, maintaining high performance even during peak tenant workloads.

  10. 10
    Article
    Avatar of neontechNeon·1y

    Make Yourself at Home with Neon Local

    Neon Local simplifies the creation of ephemeral environments for database branches using Docker. It provides a local interface to Neon cloud databases, automatically handling the creation and deletion of database branches. By leveraging instant branching, it offers a fast and safe approach to spinning up isolated environments that mimic production, improving reliability and reproducibility for development and testing. Various configurations, including Docker compose and Docker run, allow integration with Postgres clients and customization options.

  11. 11
    Article
    Avatar of last9Last9·1y

    How to Use MySQL Performance Analyzer

    Dealing with slow MySQL queries? Performance analyzers can help identify bottlenecks and optimize database performance. Understand key metrics such as query response time, CPU usage, and buffer pool efficiency. Discover top tools like Last9, PMM, and MySQL Enterprise Monitor for effective monitoring. Learn setup steps for PMM and essential commands for quick troubleshooting. Explore advanced techniques like partitioning and read/write splitting to further enhance performance.

  12. 12
    Article
    Avatar of twirThis Week In React·1y

    This Week In React #231: React Labs, Compiler, React Router, Next.js, TanStack Query, c15t, RTK, Base UI

    This week, React Labs introduces View Transitions and Activity features for client-side UI animations, along with updates on potential IDE extensions, fragment refs, and a concurrent store. React Compiler is now in Release Candidate, offering Babel-free builds. Highlights from the community include performance tips for Next.js, feature updates in Redux Toolkit 2.7, and the beta release of Base UI 1.0 alpha-8. React-Native updates include improvements to Legend List for infinite lists and React Native Brownfield 1.0 supporting SwiftUI and Jetpack Compose.

  13. 13
    Article
    Avatar of freecodecampfreeCodeCamp·1y

    An Animated Introduction to SQL – Learn to Query Relational Databases

    Learn Structured Query Language (SQL) to query and manage relational databases through an animated, interactive tutorial. This guide covers SQL basics, core concepts, and keywords, along with practice problems using example databases. It also shows how to use SQLite in various programming languages, with a focus on practical, step-by-step examples and code playbacks to reinforce learning.

  14. 14
    Video
    Avatar of dreamsofcodeDreams of Code·1y

    There's more than one way to scale Redis/Valkey to 1M op/s...

    Exploring various strategies to scale Redis or Valkyrie to handle 1 million requests per second, including vertical scaling, horizontal scaling, pipelining, read replication, and using Redis cluster. The post discusses the challenges and benefits of each approach, and introduces Dragonfly DB as a high-performance alternative that can handle requests more efficiently without complex configurations.

  15. 15
    Article
    Avatar of supabaseSupabase·1y

    Declarative Schemas for Simpler Database Management

    Declarative schemas simplify the management and maintenance of complex database schemas by allowing the definition of database structures in clear, centralized, and version-controlled .sql files. This approach reduces redundancy, ensures consistent schema updates across environments, and facilitates concise code reviews. Unlike traditional migrations, declarative schemas provide a single pane of glass to see the entire database schema, making it easier to handle complex and frequently updated schemas. By using tools like `migra` for schema diff, developers can significantly speed up their development process.

  16. 16
    Article
    Avatar of lnLaravel News·1y

    Enhancing Database Error Diagnostics with Laravel's getRawSql

    Laravel's new getRawSql method enhances database error diagnostics by providing fully integrated SQL queries with all bindings. This simplifies and speeds up debugging processes, enabling developers to quickly identify and resolve database issues. The method proves valuable for error monitoring services and can be seamlessly added to Laravel's exception handling system.

  17. 17
    Article
    Avatar of lobstersLobsters·1y

    Fjall 2.8

    Fjall 2.8 is a Rust-based LSM key-value storage engine with enhanced bulk loading and a new unified cache API. The bulk loading API allows faster insertion by writing data directly as sorted disk segments, making it suitable for tasks like schema migration and data restoration. The unified cache API simplifies configuration by merging block and blob caches, leading to more efficient memory usage. Additionally, a change to std::slice::partition_point improves the performance of binary searches in LSM-trees.

  18. 18
    Article
    Avatar of lobstersLobsters·1y

    sqlc-dev/sqlc: Generate type-safe code from SQL

    sqlc converts SQL queries into type-safe code, allowing developers to write application code with type-safe interfaces. To see sqlc in action, an interactive example and an introductory blog post are available. Additional languages can be integrated using plugins, and development is supported by sponsors.

  19. 19
    Article
    Avatar of lnLaravel News·1y

    Post-Process Query Results Elegantly with Laravel's afterQuery Method

    Enhance your Eloquent query handling with Laravel's new afterQuery hook, which enables post-processing of query results directly within the query definition. This method accepts a closure to modify the retrieved models, allowing for cleaner, more maintainable code by encapsulating processing logic and reducing duplication.

  20. 20
    Article
    Avatar of communityCommunity Picks·1y

    RvDstudio/nextjs_drizzle_better-auth: A Next.js starter kit integrating Drizzle ORM for type-safe database operations, Better Auth for secure authentication, and NeonDB for serverless PostgreSQL. This

    A Next.js starter kit that integrates Drizzle ORM for type-safe database operations, Better Auth for secure authentication, and NeonDB for serverless PostgreSQL. Instructions are provided for setting up dependencies, environment variables, and generating the necessary schema files.

  21. 21
    Article
    Avatar of communityCommunity Picks·1y

    Every Caching Strategy Explained in 5 Minutes

    Caching aims to make data retrieval faster and reduce load on primary data sources. The main strategies include Cache-Aside, Read-Through, Write-Through, Write-Behind, and Write-Around, each with specific use cases based on read/write demands and consistency requirements. Choosing the right strategy depends on the application's needs for speed, consistency, and complexity.

  22. 22
    Article
    Avatar of communityCommunity Picks·1y

    lancedb/lancedb: Developer-friendly, embedded retrieval engine for multimodal AI. Search More; Manage Less.

    LanceDB is an open-source database designed for vector-search with persistent storage, making the retrieval, filtering, and management of embeddings easier. Key features include production-scale vector search without server management, support for multiple data types, vector similarity search, full-text search, SQL, and native compatibility with Python and Javascript/Typescript. It offers zero-copy, automatic versioning, and GPU support for building vector indexes, along with integrations with LangChain, LlamaIndex, Apache-Arrow, Pandas, Polars, DuckDB, and others.

  23. 23
    Article
    Avatar of devtoDEV·1y

    ChatGPT custom GPT and C#

    Learn how to use a custom ChatGPT to generate alternative text for images in a C# project, store both images and text in an SQL-Server database, and render them in an ASP.NET Core application. This ensures consistency in alternative text across applications and aids in WCAG AA compliance.

  24. 24
    Video
    Avatar of laraveldailyLaravel Daily·1y

    I've Tried to Seed 10M Rows into MySQL...

    Successfully seeding 10.5 million records into MySQL with Laravel requires careful memory management and batch processing. Testing on both a local MacBook Pro and a $6 Digital Ocean server showed the task is feasible, though the process is slower on cheaper cloud servers. Despite the heavy load, MySQL's performance in querying large datasets remains efficient.