Stored totals can drift from their authoritative line amounts. This private demonstration finds two mismatches, retains empty orders and accepts valid credits. It checks decimal range before a private repair and explains why concurrency needs separate proof.
Tagging With a Many-to-Many Table: Storing and Querying Hashtags
Store hashtags in a tag and bridge table, normalize input, query any or all requested tags, and count weekly trends without scans.
Negative Identity Seed and Negative Increment in SQL Server
A Negative Identity seed lets a column start below zero, and a negative increment makes it count down. This post tests IDENTITY(-1,-1) and IDENTITY(-2147483648,1) on SQL Server 2025, shows gaps after a rollback, DBCC CHECKIDENT, and what to do when an int identity runs out. It also shows SEQUENCE as the flexible alternative.
Stop Blaming the User: Let Constraints Catch Bad Data
Blaming the user is the oldest joke in IT. Here’s why it fails, and how NOT NULL, CHECK, UNIQUE and foreign keys stop bad data before it lands.
Unsigned Integers: Safe Type and Range Mapping
Map unsigned integers to SQL Server types without narrowing their range. Keep strict source-text validation separate from destination CHECK constraints.
Indexing Foreign Keys
Indexing foreign keys can speed joins and parent deletes when child-side indexes are missing; learn how to find gaps and test write tradeoffs.







