Best of DatabaseAugust 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·2y

    MySQL Visual Explain

    Investigate slow query performance through a simple visualization tool instead of deciphering MySQL's complex EXPLAIN output. Most developers find EXPLAIN difficult to read because it was designed for internal use by MySQL developers to debug and tune query execution.

  2. 2
    Article
    Avatar of crunchydataCrunchy Data·2y

    Announcing an Open Source Monitoring Extension...

    Crunchy Data has introduced a new open-source pgMonitor extension aimed at improving PostgreSQL monitoring. The extension enhances query performance and simplifies metric collection by leveraging materialized views and background workers. It offers broad compatibility with various monitoring systems, ensures consistent metric updates, and adapts easily to changes in PostgreSQL versions. Users can also define custom metrics and refresh intervals to meet specific needs.

  3. 3
    Article
    Avatar of hnHacker News·2y

    chartdb/chartdb: Free and Open-source database diagrams editor, visualize and design your DB with a single query.

    ChartDB is a web-based, open-source database diagramming editor that allows you to instantly visualize and customize your database schema using a single query. It features AI-powered export for easy database migrations, supports interactive schema editing, and requires no installations or database passwords. Currently in public beta, it supports PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite.

  4. 4
    Article
    Avatar of hnHacker News·2y

    ChartDB

    ChartDB is a free and open-source database design editor that simplifies the creation of database diagrams. It allows users to import, edit, and export database schemas using a single query, supporting popular relational DBMS like MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, and SQL Lite. Features include a visual query editor, the ability to add tables and notes, and exporting diagrams as SQL scripts or images.

  5. 5
    Article
    Avatar of gcgitconnected·2y

    System Design Interview: Design Twitter (X)

    This post discusses the design of a Twitter-like app, covering functional and non-functional requirements, API endpoints for key features like tweeting and user interactions, and strategies for scalable, read-heavy systems. Key components include client apps, load balancers, API servers, relational databases, caching solutions, object storage, and CDNs. The post also explores techniques for database scaling through read replicas and sharding, and the use of message queues for handling peak loads.

  6. 6
    Article
    Avatar of hnHacker News·2y

    instantdb/instant: The realtime client-side database

    Instant is a client-side database designed to simplify the creation of real-time and collaborative applications. It allows you to write relational queries, handles data fetching, permission checking, offline caching, optimistic updates, and rollbacks. It features multiplayer queries by default and supports ephemeral updates. SDKs are available for Javascript, React, and React Native. Instant uses a Postgres backend with a sync server written in Clojure and offers a free tier for quick startups.

  7. 7
    Article
    Avatar of systemdesigncodexSystem Design Codex·2y

    Database Sharding

    Sharding is a method for horizontally scaling databases by partitioning data into smaller, manageable pieces, known as shards. It can be implemented logically within the same server or physically across different servers. Key-based, range-based, and directory-based sharding are some strategies used depending on the needs. Each has its benefits and drawbacks, and the choice depends on whether read or write optimization is prioritized. Sharding can help improve performance by reducing the quantity of data each query needs to handle but also introduces complexity and potential hotspots.

  8. 8
    Article
    Avatar of supabaseSupabase·2y

    postgres.new: In-browser Postgres with an AI interface

    Introducing postgres.new, an in-browser Postgres sandbox with AI assistance. It allows the creation and management of Postgres databases directly in the browser using PGlite, a WASM version of Postgres. Key features include drag-and-drop CSV import, report generation, chart creation, and database diagram construction. The platform leverages a large language model for autonomous database operations, and it supports semantic search with pgvector. Future enhancements include deploying databases to S3 and supporting more file types.

  9. 9
    Article
    Avatar of devtoDEV·2y

    Project Starter Kit: Neon Postgres Database + ExpressJs + TypeScript and TypeORM

    A comprehensive starter kit incorporating TypeScript, TypeORM, Neon Postgres, and ExpressJs is available for quickly scaffolding backend projects. It provides CRUD operations, entity definitions, and database configurations. The kit includes a CLI tool for easy setup and is well-documented for both beginners and advanced developers. Find it on GitHub and use it to boost productivity and ensure best practices.

  10. 10
    Article
    Avatar of communityCommunity Picks·2y

    holistics/dbml: Database Markup Language (DBML), designed to define and document database structures

    DBML (Database Markup Language) is a versatile, human-readable language designed for defining and documenting database structures. It supports a range of database tools and is not tied to any specific database syntax. Tools include dbdiagram.io for visualizations and dbdocs.io for documentation. Various plugins and parsers for editors like Emacs, Vim, and VSCode, as well as programming languages like Python, Go, and Java, are available.

  11. 11
    Article
    Avatar of neontechNeon·2y

    Top 3 features in Postgres 17

    Postgres 17 introduces significant improvements aimed at enhancing developer experience and performance. Key features include MERGE command with RETURNING support for more efficient queries, enhanced JSON functions for better handling of semi-structured data, and several performance optimizations like improved parallel query processing and faster vacuum operations. Contributions from Neon engineers include detailed query analysis with EXPLAIN (SERIALIZE), parallel builds for BRIN indexes, and enhancements to B-tree index performance.

  12. 12
    Article
    Avatar of phProduct Hunt·2y

    Nabubit - Your Database Design Copilot

    Nabubit is a newly launched tool featured in Developer Tools and Artificial Intelligence categories, aiming to assist with database design. This is its first launch and it hasn't been rated yet.

  13. 13
    Article
    Avatar of communityCommunity Picks·2y

    The 4-chan Go programmer

    Explores an unconventional approach to using channels in Go by creating a highly nested and complex channel structure for performing tasks. Highlights the intricacies of using channels and goroutines, referencing the drawbacks and impracticalities of overly clever concurrency patterns. Provides a practical example, albeit not recommended for real-world use due to its complexity and difficulty in debugging, and touches upon Dolt, a version-controlled SQL database.

  14. 14
    Article
    Avatar of communityCommunity Picks·2y

    How to Create a Good Data Model?

    A data model organizes and manages data, impacting system performance and scalability. This guide explains creating an effective data model using NocoBase as an example. It covers steps like understanding business requirements, identifying data entities, defining relationships, normalizing, testing, optimizing, and maintaining the model. Examples, like a factory management system, illustrate these steps. Using proper tools can simplify the process and maintain data integrity, reducing redundancy and enhancing query performance.

  15. 15
    Article
    Avatar of communityCommunity Picks·2y

    How to Minimise the Impact of Database Latency

    Learn how to minimize the impact of database latency on your application's response times by using Neon's Regional Latency Dashboard and implementing techniques like query optimization, batching queries, leveraging Postgres features, reusing connections, and application-level connection pooling. Understand the significance of placing your backend close to your database and solving the N+1 Problem to enhance performance.

  16. 16
    Article
    Avatar of bytebytegoByteByteGo·2y

    Trillions of Indexes: How Uber’s LedgerStore Supports Such Massive Scale

    Uber's LedgerStore is a custom-built solution to manage trillions of financial transaction records efficiently. It ensures data immutability and supports various types of indexes including strongly consistent, eventually consistent, and time-range indexes. The migration from DynamoDB to LedgerStore for Uber's payment data was driven by the need for cost savings, simplified architecture, improved performance, and tailored features for financial data management. This transition involved handling 1.2 PB of compressed data with zero data inconsistencies detected over six months.

  17. 17
    Video
    Avatar of developedbyeddevelopedbyed·2y

    Don't Make These 10 SQL Mistakes

    Learn about common SQL mistakes and how to avoid them to optimize your database performance. Key topics include selective data retrieval, the importance of proper indexing, preventing SQL injections, normalization practices, handling null values, proper use of update and delete clauses, understanding transactions, and ensuring accurate joins and aggregate functions.

  18. 18
    Video
    Avatar of fireshipFireship·2y

    TimescaleDB in 100 Seconds

  19. 19
    Article
    Avatar of devgeniusDev Genius·2y

    Why I Always Use PostgreSQL Functions For Everything

    The author advocates for using PostgreSQL functions for all database interactions to improve maintainability, readability, security, and availability. They provide a detailed analysis of encapsulating SQL queries within functions to define clear data contracts. The article also discusses handling legacy systems, managing the N+1 query antipattern, migrating to Timescale DB, and optimizing query performance. Additionally, the approach allows easy implementation of least privilege security by limiting database access to executing specific functions only.

  20. 20
    Article
    Avatar of communityCommunity Picks·2y

    Bring Postgres relationships to light

    Entity-relationship diagrams (ERDs) are invaluable for visualizing and managing complex Postgres databases. ERDs showcase entities, attributes, and relationships, making database structures more accessible, especially for non-technical team members. Tools like Outerbase simplify the creation and maintenance of ERDs by automatically generating and updating diagrams for Neon databases. This democratization of data aids developers in understanding, communicating, and scaling database schemas efficiently.

  21. 21
    Article
    Avatar of baeldungBaeldung·2y

    Best Practices for Sizing the JDBC Connection Pool

    Efficiently managing database connections using a JDBC connection pool is crucial for application performance. By maintaining a pool of reusable connections, applications can save time and resources. Deciding the optimal pool size involves balancing performance and resource utilization. Factors such as transaction response time, database query duration, and load testing results should be considered. Key settings to tune include initial, minimum, and maximum pool sizes, idle timeout, connection timeout, and transaction isolation levels. Following best practices for tuning these settings ensures robust and efficient database connectivity.

  22. 22
    Article
    Avatar of materializedviewMaterialized View·2y

    SlateDB: An Embedded Storage Engine Built on Object Storage

    SlateDB is a newly open-sourced, cloud-native embedded storage engine built as a log-structured merge-tree (LSM tree) on object storage like S3 and GCS. It is designed for use cases such as stateful stream processing and serverless functions, offering bottomless storage capacity and high durability at the cost of higher latency and API costs. The project has been well-received with significant community contributions and is licensed under Apache 2.0. Future plans include adding features like on-disk and in-memory caches, snapshots, and range queries.

  23. 23
    Article
    Avatar of kdnuggetsKDnuggets·2y

    Top 5 Free Resources for Learning Advanced SQL Techniques

    Discover five quality resources for learning advanced SQL for free, including tutorials, online courses, and video lectures from reputable sources like Mode Analytics, Stanford University, Kaggle, the University of Tübingen, and Philip Greenspun’s website. Topics covered include indexing, transactions, triggers, window functions, recursive CTEs, and more. Bonus mentions include StrataScratch and LeetCode for practicing SQL interview questions.

  24. 24
    Article
    Avatar of neontechNeon·2y

    Multi-tenancy and Database-per-User Design in Postgres

    The post examines the multi-tenancy strategies in Postgres, emphasizing the database-per-user architecture. It discusses the evolution of multi-tenant architectures, highlights the benefits and challenges of the database-per-user strategy, and contrasts it with schema-per-user and shared schema approaches. The post also introduces the concept of control planes for managing and scaling multiple databases effectively, especially with Neon’s cloud-native capabilities.

  25. 25
    Article
    Avatar of hnHacker News·2y

    Postgres as a search engine

    Learn how to build a robust retrieval system using semantic, full-text, and fuzzy search techniques in Postgres. This guide covers setting up a search engine as a backbone for RAG pipelines, implementing full-text search with tsvector, semantic search with pgvector, and fuzzy matching with pg_trgm. Additionally, it provides tips on fine-tuning search results, debugging rankings, and boosting user experience through personalized and recent results. An overview of BM25 for advanced ranking is also included.