tezvyn:

Databases & Architecture

SQL, NoSQL, system design, microservices, APIs

33 bites

Databases & Architecture33 sec read

DDL: The Blueprint for Database Objects

DDL is the blueprint for your database. You reach for it when spinning up new tables, indexes, or user permissions, not when querying rows. The footgun is running DROP thinking you are deleting data, not vaporizing the entire table structure.

Databases & Architecture30 sec read

Phantom Reads: When New Rows Appear Mid-Transaction

A phantom read occurs when a transaction repeats a query and finds new rows that match its search criteria, inserted by another committed transaction. It's common in reporting jobs that need a stable set of data.

Databases & Architecture30 sec read

Multi-Region Databases: Resilience, Latency, and Compliance

A multi-region database is a strategy for resilience, low latency, and data compliance. It's used to survive region outages, keep data in-country, and serve reads close to users. The footgun is managing low-level replica placement directly, which is complex.

Databases & Architecture30 sec read

Hash-Based Aggregation: Grouping Data Without Sorting

Hash-based aggregation uses a hash table to group data for functions like COUNT or SUM, avoiding a costly sort. It's used in database query engines for GROUP BY operations, especially when distinct groups fit in memory.

Databases & Architecture30 sec read

Multi-Leader Replication: Enabling Writes Across Datacenters

Multi-leader replication allows multiple nodes to accept writes, avoiding a single-leader bottleneck. It's used in multi-datacenter systems for low-latency local writes and in offline apps. The main footgun is resolving write conflicts from concurrent updates.

Databases & Architecture30 sec read

In-Memory Data Grid: A Shared RAM Pool for Your Cluster

An In-Memory Data Grid (IMDG) pools the RAM of multiple computers into one massive, shared data space. It's for high-speed processing on datasets too large for one machine. The footgun is mistaking it for a simple cache; it also provides parallel computation.

Databases & Architecture30 sec read

Continuous Queries: Automating Time-Series Aggregation

A continuous query automatically aggregates real-time data on a schedule. Use it to create downsampled rollups, like hourly averages from raw sensor data, storing results in a new series.

Databases & Architecture30 sec read

Faceted Search: Guided Drill-Down for Large Datasets

Faceted search turns a massive result list into an interactive drill-down experience, like the filters on a shopping site. It's used in e-commerce and document libraries where items have structured attributes.

Databases & Architecture32 sec read

Cache-Aside Pattern: Your App Owns the Cache

The Cache-Aside pattern makes your application the gatekeeper for the cache. On a read, your code checks the cache first; on a miss, it fetches from the database and writes to the cache. This speeds up read-heavy apps. The key footgun is stale data.

Databases & Architecture30 sec read

Delta Lake: Database Reliability for Your Data Lake

Delta Lake adds a transaction log to your data lake, giving you database-like reliability over raw files. This enables ACID transactions, schema enforcement, and unified batch/streaming pipelines.

Databases & Architecture30 sec read

Lambda Architecture: Batch + Stream for Big Data

Lambda Architecture handles massive datasets by combining slow, accurate batch processing with fast, real-time stream processing. It's used for analytics needing both historical and live views.

Databases & Architecture30 sec read

Data Pipelines: From Raw Data to Actionable Insights

A data pipeline is the plumbing for your data, moving it from raw sources to a refined state for analysis. It feeds dashboards and ML models by cleaning data from APIs and databases. The key footgun is choosing batch processing for real-time needs.

Databases & Architecture30 sec read

AWS DMS: Your Managed Database Migration Engine

AWS DMS is a managed service for migrating databases. It acts like a replication server you point at a source and target, handling the data transfer. It's used for one-time migrations to AWS or for continuous replication.

Databases & Architecture30 sec read

Compute & Storage Separation: Scale One Without the Other

This architecture treats your data warehouse (cheap storage) and query engine (expensive compute) as separate services. You can scale compute for peak demand without overprovisioning storage.

Databases & Architecture30 sec read

Database Proxies: A Manager for Your Database Traffic

A database proxy is a manager between your app and database, handling requests to improve performance and security. It pools connections, caches queries, and balances load, preventing any single server from being overwhelmed.

Databases & Architecture30 sec read

SQL Query Builders: Write SQL Without Writing SQL

An SQL query builder is a translator for your database, converting visual clicks or chained code methods into raw SQL. It's used to write safer, database-agnostic code or to let non-technical users build queries. The footgun is generating inefficient queries.

Databases & Architecture30 sec read

ODBC: The Universal Translator for Databases

ODBC acts as a universal translator, letting one application speak to many different relational databases. Your app uses the standard ODBC interface, and a specific "driver" handles the unique protocol for each database. The footgun is performance overhead.

Databases & Architecture30 sec read

SQL Injection: When User Input Becomes a Command

SQL injection tricks a database into running unintended commands by sneaking them into user input. It's a common attack on websites where user data is directly stitched into SQL queries. The footgun is trusting input; always use prepared statements instead.

Databases & Architecture30 sec read

How Database Indexes Rot and How to Fix Them

Your database indexes rot over time, making queries slower. Frequent writes cause fragmentation (disordered pages) and low page density (half-empty pages), forcing more disk I/O.

Databases & Architecture30 sec read

Two-Phase Commit (2PC): All or Nothing, Together

Two-Phase Commit (2PC) ensures a distributed transaction is atomic: all participants either commit or abort together. A coordinator first asks all nodes to prepare (vote), then issues a final commit or abort.

Databases & Architecture · Tezvyn