Home

Blog

Home

Blog

5 articles tagged with: #Database

Reusable Model Fields in SQLModel with Mixins

September 20, 2025

Reusable Model Fields in SQLModel with Mixins

A Guide to Creating DRY Database Models with Timestamps and Base Models.

Stop repeating id and timestamp fields in your SQLModel models. Learn to use mixins and a base model to write cleaner, more maintainable code for your FastAPI application.

Read More...

Connecting FastAPI to a Database with SQLModel

August 26, 2025

Connecting FastAPI to a Database with SQLModel

A practical guide to building CRUD APIs with FastAPI and SQLModel.

Learn to connect FastAPI to SQL databases using SQLModel. This guide covers creating models, managing sessions, and building a complete CRUD API with practical examples.

Read More...

Running Database Migrations with Alembic in Google Cloud Build

June 30, 2025

Running Database Migrations with Alembic in Google Cloud Build

How to Organize and Load FastAPI Settings from a .env File Using Pydantic v2

Learn how to centralize your FastAPI configuration using Pydantic Settings and a .env file. This post covers setup, usage, and best practices for managing environment variables and secrets in a maintainable way.

Read More...

SQLAlchemy Pooling for Serverless FastAPI: QueuePool vs. NullPool

June 10, 2025

SQLAlchemy Pooling for Serverless FastAPI: QueuePool vs. NullPool

A Guide to Resilient Database Connections with Neon and SQLAlchemy

Compare SQLAlchemy's QueuePool and NullPool for connecting FastAPI to serverless databases like Neon. Learn why NullPool with an external pooler is the recommended and more scalable strategy for production.

Read More...

Full-Text Search: Using the Trigram Tokenizer Algorithm to Match Peoples Names

April 24, 2025

Full-Text Search: Using the Trigram Tokenizer Algorithm to Match Peoples Names

Leveraging Full Text Search and Trigram Tokenization for Efficient Name Matching

This article explains how to use SQLite's FTS5 module with the trigram tokenizer to perform efficient full-text searches, particularly for matching similar names in a large database. It covers setting up the virtual table, normalizing names, bulk inserting data, and executing searches that handle close but not exact matches

Read More...

Contact Me

Have a project in mind? Send me an email at hello@davidmuraya.com and let's bring your ideas to life. I am always available for exciting discussions.

© 2025 David Muraya. All rights reserved.