Legacy schema traps · Structure and logic outside the tables
The numbers on screen are calculated. Where is the calculation?
In triggers, stored procedures or a nightly batch. The value on screen is computed from several stored values, so reading the stored column gives a different number.
What it looks likeIllustrative
The available quantity on screen is stock minus reservations minus a safety margin, computed in a procedure.
All table and column names are invented.
Why reports and AI agents get it wrong
It returns the stored stock figure.
A first check you can run
List triggers and procedures, and which tables they write to.
Read-only and on the catalogue or aggregates: it looks at structure and value counts, not at individual records.
How Janus Works handles it
The profiler records procedures and triggers; tools reproduce the rule, and the Golden Master compares with the screen.
Every number verified against your own screens. Deviations shown, never hidden.
Common in the Jeeves database.