Tag: Database
20 posts
-
Redis Internals and Usage: The Event Loop, Encodings, RDB vs AOF, Replication and Cluster
Deep dive into Redis: single-threaded event loop, SDS and skiplist encodings, RDB vs AOF persistence, PSYNC replication backlog, Sentinel, Cluster.
-
MongoDB Internals for Production: WiredTiger, ESR Indexes, Sharding and Oplog Replication
MongoDB internals: WiredTiger cache and checkpoints, oplog replication, sharding chunks and mongos routing, index strategies (ESR), and production.
-
MySQL Under the Hood: InnoDB Buffer Pool, MVCC Isolation, the Optimizer and Binlog Replication
Deep MySQL guide: InnoDB buffer pool and WAL, MVCC and isolation, cost-based optimizer, binlog replication, plus indexing, partitioning, and production.
-
TypeORM with TypeScript: Entities, Repositories, Relations, Migrations and Transactions
Using TypeORM with SQL databases: configuration, entity definitions, the repository pattern, relations, migrations, transactions, validation and custom repositories.
-
Prisma vs Drizzle vs TypeORM vs Kysely: Type Safety, Performance and Migrations Compared
A comparison of TypeScript ORMs like Prisma, Drizzle, and TypeORM covering type safety, performance, and migrations.
-
MongoDB Modeling with Mongoose: Schemas, Query Operators, Middleware Hooks, Methods and Virtuals
Modeling MongoDB data in Node.js with Mongoose: connections, schema definitions, CRUD, query operators, middleware hooks, instance and static methods, and virtual fields.
-
Drizzle ORM in Production: Transactions, Relational Queries vs Joins, Migrations and Pooling
Drizzle ORM in production: transaction isolation levels, relational query vs. join trade-offs, safe migrations, and connection pooling.
-
C++ DB Engine Fundamentals: Storage Engine and Query Parser
How a database engine fits together: storage engine, SQL parser, executor, and transactions. B-Tree indexes, paging, WAL, ACID, and minimal C++ examples.
-
Database Query Optimization from C++: Index Selection, EXPLAIN Plans and Statistics
C++ query optimization: index selection, EXPLAIN plans, statistics, cost models, and production patterns [#49-3].
-
PostgreSQL Query Optimization: pg_stat_statements, EXPLAIN ANALYZE, Indexes and VACUUM
Find slow PostgreSQL queries with pg_stat_statements and EXPLAIN ANALYZE, then fix them with the right indexes, VACUUM, PgBouncer and postgresql.conf tuning.
-
Prisma ORM in TypeScript: Schema Design, Dev vs Prod Migrations, Relations and Raw SQL
Model data in schema.prisma, use migrate dev locally and migrate deploy in production, query relations with typed results, and fall back to raw SQL.
-
Drizzle ORM Basics: TypeScript Schemas, Type-Safe Queries and drizzle-kit Migrations
Learn Drizzle ORM fundamentals: TypeScript-first schema definition, type-safe queries, and drizzle-kit migrations — no separate schema DSL, no codegen step.
-
Elasticsearch in Practice: Mapping Design, Analyzers, Shard Sizing and Relevance Tuning
Elasticsearch mapping design, analyzer pitfalls, shard sizing trade-offs, and relevance tuning for production search.
-
SQL vs NoSQL: Choosing Between PostgreSQL, MySQL, MongoDB and Redis
A comparison of SQL and NoSQL databases covering data models, consistency guarantees, and when to choose each.
-
MongoDB Schema Design: Embed vs Reference and the Patterns That Follow
MongoDB schema design around access patterns: when to embed vs reference, one-to-few vs one-to-many, bucket, outlier, computed and versioning patterns, indexes, validation, and the trade-offs in write contention and consistency.
-
Reading MySQL EXPLAIN: Index Design, Statistics and Slow Query Fixes
How to read MySQL EXPLAIN and EXPLAIN ANALYZE output, design composite and covering indexes, refresh statistics with ANALYZE TABLE and histograms, and diagnose the queries that still ignore your index.
-
PostgreSQL vs MySQL: Data Types, JSON, Locking, Replication and When to Use Each
PostgreSQL or MySQL? Compare data types, JSON, full-text search, locking, indexes, replication and extensions to decide which one fits your workload.
-
Python Databases | SQLite, PostgreSQL, and ORMs Explained
Work with databases in Python: sqlite3, SQLAlchemy models, CRUD, relationships, and a Flask + SQLAlchemy API example.
-
Node.js Database Integration: MongoDB, PostgreSQL, and MySQL
Connect Node.js to MongoDB (Mongoose), PostgreSQL (pg, Sequelize), and MySQL (mysql2): connection pools, CRUD, transactions, REST examples, indexes.
-
Speeding Up Slow SQL: Index Design, Reading EXPLAIN, N+1 Queries, Joins and Subqueries
How B-Tree indexes work, how to order composite index columns, how to read EXPLAIN, why an existing index sometimes goes unused (functions, leading wildcards, OR, type conversion), fixing N+1 queries, and a find-fix-measure workflow for MySQL and PostgreSQL.