distal-attribute
distal-attribute
distal-attribute
distal-attribute

Buttons to start/commit/rollback transactions

matsg posted 2 years ago in Feature discussion
Hi,

A long time ago I worked with a larger database, the name of which escapes me for the moment (grrr!), but we had a database editor much like HeidiSQL that had buttons for starting a new transactions, and committing and rolling back the same. It kept track of the state too - sort of an indication that "you're in a transaction now, buddy".

We learned to use that function one day when we accidentally deleted all invoices with a due date of the 29th, instead of just a certain category of invoices with the particular due date. Which I'm sure our bank's customers enjoyed, at least those who paid invoices on the 29th. If we had done it in a transaction, we could just have rolled back the changes with that little button.

I've always looked for a similar feature in MySQL clients, but haven't really found any. I guess manually writing "begin" and "commit" works too.. but, seriously, how fun is that? :)

Just a suggestion.

Thanks
Matt
ansgar posted 2 years ago
Thanks for that suggestion. Yes, I could add buttons for everything on the toolbar, even just for writing "SELECT" or whatever. But does that really save time for the user? Finding a button with the mouse tends to take a bit more eye concentration than just typing it yourself, at least if it's some short thing (like "BEGIN" or "COMMIT"). And I said so some times before, I really don't know where to put even more buttons without confusing new users with too much clutter. There are even some experienced users here in the forum which don't find a particular button, e.g. for suppressing error popups. I want to leave the GUI in some good state especially for new users, which won't ever need such buttons for BEGIN/COMMIT.
matsg posted 2 years ago
I agree with you that screen real-estate is difficult to manage ;)

The advantage of being able to start a transaction with just a push-button is, however, especially advantageous when editing data. I suspect few will switch to the query tab, type "begin", execute it, then head over to the data tab, edit data, and then finally go back to the query tab, type "commit" and execute. So I think such buttons serve a very useful purpose, especially if you get into the habit of doing that. A visual indicator would also make it obvious that you're now working within the scope of a transaction, and what you're doing *can* be rolled back, if you mess up.

I don't know if you're using multiple connections to a database, or if everything is done within one session - the transaction begin/end would affect only editing within that session, of course, so it might be better to tie it visually into the data grid itself somehow.
TTSneko posted 2 years ago
matsg,

with all due respect - you are telling me that you actually use a simple database front-end on live customer data?

Real customer data handling is the job of business management software (e.g. SAP-based products, or Navision, etc). With other words, database front-ends like HeidiSQL are not intended to be used by secretaries to run the monthly billing lists - that is the job of fully-fledged application software that restricts access via accounts or provides matching data entry/alteration masks.

Anse's well-set reluctance against UI clutter is one matter, but HeidiSQL simply is not a BMS replacement.
matsg posted 2 years ago
Well, if we had a professional business system like that, I might reconsider.smileI am the only developer of the software suite we're using internally, so if I want administration tools I have to write them myself... :P

So a lot of my days are spent running SQL queries on, yes, live data... and editing invoice records, customers records, moving tables and fields and God knows what else that I haven't had time to build proper web interfaces for.

I think that, over time, I've developed a healthy balance of backups and safeguards. Even still, sometimes, things to go wrong, and occasionally I wish that I had tiny little buttons for starting and committing transactions.

I'm all for the "right" way of doing things, have proper testing environments, etc ... but sometimes there just aren't the time or resources for that. :(
matsg posted 2 years ago
(P.S. I *have* a testing environment. Just not as extensive as I'd like, but... Just had to add that. :P )

Please login to leave a reply, or register at first.