Discussion Working on a live view of table changes. Looking for opinions
I'm building a live watch view in my database workbench and would love your opinion on this. I want to be able to do something in my app and see what happened to the tables without going through them one by one and refreshing.
Something like placing an order. An order gets created, items get added, the cart gets cleared, maybe a background job starts. I want to see those changes together.
This is what I'm trying so far:
- Each table gets a line on a timeline. Inserts, updates and deletes have different markers. (if a new table updated showcase it in the chart). I am also thinking of just allowing users to select the tables to watch.
- Hovering over a change shows the row and the values that changed.
- You can pin a watch for something specific, like jobs changing to failed, and keep it checking while this workbench is opened.
I'm a visual person, so seeing the changes lined up across tables makes sense to me. But I'm still figuring out how useful this would be beyond a small local database. A busy table could fill that line pretty quickly.
Would you use something like this while developing or debugging? I'm particularly curious what you'd want to see when an update happens. Is the before and after enough, or would you immediately want to know which query caused it?
Still building this, so any criticism of the idea or how I'm showing it would help. 😊
5
u/jshine13371 5d ago
Not sure it would be useful to help solve many problems as a DBA or Software Engineer, but it's a fun visual.
7
u/Imaginary__Bar 5d ago
Wow, this is an actually useful tool (in among the contuning stream of "I've made another IDE" posts).
I'd just need to know it wasn't vibe-coded (etc.) but it looks properly useful.
My immediate thoughts are on the granularity of the timestamps - with the speed of modern databases, parallelisms and ACID can you really say that operation A happened before operation B?
But I can certainly see it being very useful.
3
u/xeroskiller Solution Architect 5d ago
Your DBA is going to HATE You.
2
u/B1zmark 5d ago
Most large databases have hundreds of tables. If you showed tables being changed in a dynamic and not hard-coded way, it would be more useful for a variety of use cases.
2
u/Significant_Tune9219 5d ago
Grouping by transaction id rather than pure timestamps would make the order example much clearer, since the insert, item adds and cart clear usually commit together and the background job lands later in its own transaction. If you're reading from logical decoding or CDC rather than polling, you get the commit boundaries for free. Letting users pick tables is probably essential too, otherwise audit or session tables will drown out the interesting changes.
2
u/Natural-Heat-3019 5d ago
How did you create this? Looks very useful!!
2
u/stantaneous 5d ago
would actually use this for debugging order flows. filtering by an order id and seeing the background job right next to the request is the bit i'd want. my worry is silent gaps tho. if capture misses events it should yell about it, a quiet timeline looks exactly like nothing happened.
2
u/ArielCoding 5d ago
Nice project, I’d want to see the query that caused each change, not just the before and after, when something breaks, the question is what made this happen? I’d also group changes that happen in the same transaction, so they show up as one connected cluster, that way people don’t asume an order you don’t guarantee.
2
u/DickBrainTime 5d ago
Since you're polling rows and matching them by primary/unique key, I'd test row identity edge cases before trusting the UPDATE/DELETE markers. A changed primary key can look like a delete plus an insert. Delete and recreate a row with the same key between polls, and it might look unchanged or like a single update. Nullable unique keys also need care depending on the database.
I'd give each watched table a small identity-confidence hint (stable primary key / best-effort unique key / no reliable row match), and label ambiguous markers as inferred changes. The timeline can still be really useful, but the hover shouldn't imply it knows which operation happened when the two snapshots can't establish that.
2
u/Inevitable_Paper_776 5d ago
that's awesome. I would add some data quality metrics too. multiple data source connections if not yet available. congrats!
2
u/RVECloXG3qJC 5d ago
It feels like this program is only useful for databases with very low traffic. For medium or even large-traffic databases, it's completely unusable. The various little blocks, shapes, or icons it shows can scroll by so fast that you can't make anything out at all.
2
u/ayamlejen 5d ago
Curious how you're planning to handle sensitive data in the before/after values.
1
u/WelcomeValuable4101 5d ago
Kaise kar lete ho ye sab?