Suppose a comics database shows each series with a count of its issues, and the count is cached so the page doesn’t have to total thousands of rows on every view. The number looks harmless. But the moment someone asks whether a variant cover is an issue, the cached count stops being a number and […]
The ongoing conversation
Category: Database
A Date and a Time Are Not Yet a Timestamp
If an event organizer tells you a run starts at 1:30 a.m. on Sunday, November 1, they have given you a date and a time. What they haven’t given you is a timestamp. In any region that observes daylight saving time, 1:30 a.m. on the first Sunday of November happens twice. When the clocks “fall […]
When a Database’s Encoding Label Is Wrong
Modernizing an older database rarely comes down to changing a configuration switch from Latin-1 to UTF-8. Take an application that has run for fifteen years across several server migrations. You inspect the schema and see columns declared as latin1. But looking at the actual text, you find users have been entering em dashes, smart quotes, accented […]
A Backup Passed Its Checksum. Could the Site Actually Run?
A passing checksum tells you the backup file is the same file you created, but it doesn’t tell you the site can be restored from it. Take a fictional small-business website with a nightly database dump and a copy of its uploaded files. The dump finishes, the copy matches its checksum, and the dashboard turns […]
One Notes Field, Many Rendering Contracts
Adding Markdown to a long-running catalog sounds like a single decision: install a parser and turn plain text into HTML, but in a mature database, “Notes” isn’t one place. In the Grand Comics Database (GCD), there are notes on issue records, creator biographies, brand groups, reprint relationships, and character appearances. Some notes sit in a […]
Zero, Unknown, and Not Applicable Deserve Different Answers
An empty attendance list can mean that nobody came or that nobody entered the attendance. A report that displays zero has chosen one of those explanations; it needs a reason. That distinction comes up in the reporting work for the Dayton Hash website. The pilot’s test cases distinguish confirmed empty attendance from unknown rosters and […]
The Save Worked, But the Browser Never Found Out.
You click Save, the server records your changes, but the response never reaches your browser. The screen can’t confirm the save. Clicking Save again seems reasonable, but that’s awkward if it creates a second copy of what you just saved. In reliability work I did for an existing community application, recovery had to account for […]
Making Data Look Right Without Changing What It Says
In an orienteering mapping project, I wanted to review a GPS track and geotagged photographs against an existing map. No surprise: they didn’t line up neatly. I could move the track, but would the new position mean I had corrected a location, or just changed where I drew it? The mismatch alone couldn’t answer that. […]
Transforming mostly static data to date ranges
I recently had to transform a set of data from typical date & measurement to a more compact date range & measurement format. The data in this case was very static: as the date incremented, the measurement was much more likely to be remain the same than it was to change. So storing the starting […]
Decoding SQL’s Decode
I came across a SQL function I was not familiar with: decode. I looked it up and immediately replaced it with a CASE statement (in addition to other code cleanup). I’m afraid I don’t understand the existence of Oracle SQL’s decode() function: decode(expression, search, result [, search , result]… [, default] ) seems functionally equivalent […]