Guides — 267 and counting

Database guides, no fluff.

Practical answers for PostgreSQL, MySQL, ClickHouse, MongoDB, and friends — connections, SQL patterns, imports, clients, and comparisons.

Database
Connect & How-ToSQL Server

How to Connect to SQL Server from Rust

Connect to Microsoft SQL Server from Rust with tiberius, bb8/deadpool pooling, or ODBC. Working code for connections, @P1 parameters, TLS encryption levels, named instances via SQL Browser, and the sqlx-removed-MSSQL trap.

9 min read
Connect & How-ToMariaDB

How to Connect to MariaDB from Rust

Connect to MariaDB from Rust with the mysql crate, mysql_async, or sqlx. Working code plus the two genuinely MariaDB-specific issues: ed25519/PARSEC authentication plugin support (which varies by crate) and INSERT ... RETURNING.

6 min read
Connect & How-ToSnowflake

How to Connect to Snowflake from Rust

Connect to Snowflake from Rust. There is no official Rust driver, so this covers the realistic paths: snowflake-connector-rs, snowflake-api, the ADBC driver, and the SQL REST API, plus key-pair authentication and the account-identifier trap.

7 min read
Connect & How-ToBigQuery

How to Connect to BigQuery from Rust

Connect to BigQuery from Rust with gcp-bigquery-client or gcloud-bigquery. Auth with service account keys and ADC, parameterized queries, the google-cloud-bigquery renaming confusion, cost controls, and the dataset-location trap.

6 min read
Connect & How-ToClickHouse

How to Connect to ClickHouse from Rust

Connect to ClickHouse from Rust with the official clickhouse crate, klickhouse, or clickhouse-rs. Working code for connections, typed rows with serde, batch inserts, the 8123-vs-9000 port trap, and TLS for ClickHouse Cloud.

6 min read
Connect & How-ToMongoDB

How to Connect to MongoDB from Rust

Connect to MongoDB from Rust with the official mongodb driver. Working code for async and sync APIs, typed collections with serde, connection pooling, Atlas SRV strings, TLS, and the lazy-connection trap.

6 min read
Connect & How-ToSQLite

How to Connect to SQLite from Rust

Connect to SQLite from Rust with rusqlite, tokio-rusqlite, or sqlx. Working code for connections, the bundled-vs-system build choice, parameterized queries, WAL mode, busy_timeout, and the accidental-file-creation trap.

7 min read
Connect & How-ToMySQL

How to Connect to MySQL from Rust

Connect to MySQL from Rust with the mysql crate, mysql_async, sqlx, or Diesel. Working code for connections, built-in pooling, parameterized queries, the named-parameter translation trap, TLS, and caching_sha2_password auth.

7 min read
Connect & How-ToPostgreSQL

How to Connect to PostgreSQL from Rust

Connect to PostgreSQL from Rust with tokio-postgres, sqlx, or Diesel. Working code for connections, pooling with deadpool, parameterized queries, TLS, and the connection-task gotcha that trips up every new tokio-postgres user.

9 min read
migrationPostgreSQL

Migrating from PostgreSQL to BigQuery: Batch Loads, Datastream CDC, and the Type Mapping That Bites

A practical PostgreSQL-to-BigQuery guide: offload framing, one-time batch loads through Cloud Storage, Datastream CDC setup and its REPLICA IDENTITY FULL trap, the full type mapping table, dialect differences, and cost-model changes.

7 min read
migrationPostgreSQL

Migrating from PostgreSQL to Snowflake: Two Different Migrations, One Name

A practical PostgreSQL-to-Snowflake guide: the Snowflake Postgres option (GA February 2026), batch loading through stages with COPY INTO, CDC with the Openflow connector, the type mapping table, and why unenforced constraints surprise everyone.

7 min read
migrationMySQL

Migrating from MySQL to ClickHouse: Analytics Offload, CDC Options, and the MaterializedMySQL Trap

A practical MySQL-to-ClickHouse migration guide: one-time copies with the mysql() table function, CDC via ClickPipes (public beta) or Altinity Sink Connector, why MaterializedMySQL is gone, the type mapping table including unsigned integers, and validation.

7 min read
migrationPostgreSQL

Migrating from PostgreSQL to ClickHouse: Offloading Analytics Without Losing Your System of Record

A practical PostgreSQL-to-ClickHouse migration guide: one-time copies with the postgresql() table function, CDC with ClickPipes or self-hosted PeerDB, the type mapping table, why ORDER BY is not a primary key, and validation queries that account for ReplacingMergeTree.

6 min read
migrationMySQL

Migrating from MySQL to MariaDB: Dump, Restore, and the Compatibility Gaps

A practical MySQL-to-MariaDB migration guide: why in-place upgrades from MySQL 8.0+ don't work, the dump/restore workflow, the utf8mb4_0900 collation trap, authentication plugin differences, and GTID incompatibility.

6 min read
migrationPostgreSQL

Migrating from PostgreSQL to MySQL: Tools, Type Mapping, and What You Give Up

A practical PostgreSQL-to-MySQL migration guide: why the tooling is thinner in this direction, MySQL Workbench's Migration Wizard, the full type mapping table including arrays and the TIMESTAMP-2038 trap, and the PostgreSQL features you'll have to rewrite around.

7 min read
migrationMongoDB

Migrating from MongoDB to PostgreSQL: JSONB First, Normalize Later

How to migrate MongoDB to PostgreSQL: the land-in-jsonb-then-normalize strategy, mongoexport's Extended JSON traps, mongo_fdw, ObjectId and Decimal128 conversion, query translation, and when FerretDB is the better answer.

7 min read
migrationSQL Server

Migrating from SQL Server to PostgreSQL: Schema, Data, and the T-SQL Problem

A practical SQL Server-to-PostgreSQL migration guide: pgloader and tds_fdw walkthroughs, the complete type mapping table, why stored procedures are the real cost, Babelfish as the third path, and validation queries.

8 min read
migrationMySQL

Migrating from MySQL to PostgreSQL: Schema, Data, and the Gotchas

A practical MySQL-to-PostgreSQL migration guide: data type mapping, pgloader v4, the tinyint-to-boolean trap, unsigned integers, case-insensitive collations, ON DUPLICATE KEY rewrites, and how to validate the result.

8 min read
migrationSQLite

Migrating from SQLite to PostgreSQL: When, How, and What Breaks

How to migrate SQLite to PostgreSQL: pgloader in one line, why type affinity is the real enemy, datetime storage archaeology, boolean conversion, AUTOINCREMENT to identity, and validating the result.

7 min read
SQL How-ToSQL Server

Splitting Strings and Querying JSON Arrays in SQL Server

How to split delimited strings into rows with STRING_SPLIT and OPENJSON, query JSON arrays stored in columns, and aggregate rows back into strings or arrays with STRING_AGG and JSON_ARRAYAGG.

7 min read
SQL How-ToSQL Server

IDENTITY vs Sequences in SQL Server: Auto-Generated Keys Done Right

T-SQL IDENTITY columns and SEQUENCE objects compared. SCOPE_IDENTITY vs @@IDENTITY vs OUTPUT INSERTED, the identity-cache gap-of-1000 after restarts, IDENTITY_INSERT, DBCC CHECKIDENT reseeding, CREATE SEQUENCE, NEXT VALUE FOR restrictions, and when to use which.

7 min read
SQL How-ToSQL Server

Stored Procedures in SQL Server: CREATE PROCEDURE, Parameters, and the Traps

T-SQL stored procedures explained. CREATE OR ALTER, IN/OUTPUT parameters, table-valued parameters, return codes vs OUTPUT vs result sets, SET NOCOUNT ON, parameter sniffing and its fixes, the sp_ prefix trap, error handling with TRY/CATCH and THROW.

8 min read
SQL How-ToSQL Server

Table Partitioning in SQL Server: Partition Functions, Schemes, and Switching

How table partitioning works in SQL Server. Covers partition functions and schemes, RANGE LEFT vs RIGHT, partition elimination, aligned indexes, SWITCH, sliding windows, and TRUNCATE WITH PARTITIONS.

7 min read
SQL How-ToSQL Server

Triggers in SQL Server: AFTER, INSTEAD OF, and the inserted/deleted Tables

How DML triggers work in SQL Server. Covers AFTER and INSTEAD OF triggers, the inserted and deleted virtual tables, the per-statement firing model, multi-row safety, nesting and recursion, and when not to use triggers at all.

7 min read