Database
39 articles
Practical Introduction to SQL: Writing Fast and Understandable Queries
Practical Introduction to SQL: Writing Fast and Understandable Queries
What is a Database Index? How It Works and When You Need It
Understand how database indexes work internally—B-tree and hash structures—when to add or avoid indexes, and how to measure index effectiveness using EXPLAIN.
Database ID Design: UUID vs Auto Increment vs ULID — Which to Choose?
Compare auto-increment integers, UUIDs, and ULIDs as database IDs. Learn the trade-offs in performance, sortability, and distributed system compatibility.
NULL in Database Design: Common Pitfalls and Best Practices
Learn how NULL works in relational databases, the three-valued logic problem, common query mistakes with NULL, and schema design strategies to avoid NULL-related bugs.
Notes on Spanner Insights
Explore Cloud Spanner architecture, replication strategies, indexing, and performance optimization for distributed databases.
Exploring Aurora Serverless
Explore Aurora Serverless v2 capabilities including multi-AZ support, auto-scaling, cost optimization, and deployment considerations for databases.
MySQL Transaction Isolation Levels: Preventing Dirty Reads, Phantom Reads, and More
Learn MySQL's four transaction isolation levels, the anomalies each prevents (dirty read, non-repeatable read, phantom read), and how to choose the right level.
Transaction Overview
Understand database transaction fundamentals including ACID properties, concurrency control, and isolation for data integrity.
Sharding vs Partitioning: Key Differences and When to Use Each
Understand the difference between database sharding and partitioning. Learn horizontal and vertical strategies, sharding trade-offs, and when each approach makes sense.
Full-Text Search with MySQL
Implement MySQL full-text search with FULLTEXT INDEX, ngram parsing, and MATCH...AGAINST query patterns.
Exploring NewSQL Resources
A summary of various resources related to NewSQL.
Encountered 'Permission denied' Error When Starting MySQL Container on Ubuntu 20.04.2 LTS
Fix MySQL container permission denied errors on Ubuntu 20.04 by properly configuring docker-compose user UID/GID mappings.
Cannot Start MySQL 8.0.17 Container on M1 Mac
Fix the MySQL container startup failure on Apple M1 Mac (failed to create new OS thread errno=22). Use MySQL 8.0.26+ with --platform=linux/amd64 in the Dockerfile for ARM architecture support.
Tools for Automatically Generating DB Documents (ER Diagrams, etc.) - schemaspy, tbls
Exploring and reviewing open-source tools for automatically generating DB documents.
SQL for Generating Test Data in MySQL
A note on generating test data using only MySQL.
Approaches to Table Design for Many-to-One Relationships with Multiple Tables
Learn how to handle a table related to multiple tables in many-to-one relationships. Compares polymorphic associations (SQL anti-pattern, no FK constraints) with cross/pivot tables.
Types of Relationships in ER Diagrams
Understand the three types of ER diagram relationships: dependent (parent-child, solid line), independent (dotted line), and many-to-many. Includes SQL table design examples for each.
MySQL JOIN vs UNION: Differences, Use Cases, and Examples
Learn the difference between MySQL JOIN and UNION with practical SQL examples. Covers INNER JOIN, LEFT JOIN, FULL OUTER JOIN, and how to combine result sets correctly.
The N+1 Problem Explained: How to Detect and Fix It in Go/Rails
Learn what the N+1 query problem is, why it degrades application performance, how to detect it with query logs, and how to fix it with eager loading in Go and Rails.